Skip to content

Commit

Permalink
feat: Point users to implemented versions of obsolete WUX controls
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinZikmund committed Nov 20, 2021
1 parent 2d35d99 commit 9cdaacb
Show file tree
Hide file tree
Showing 11 changed files with 94 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ public string Caption
typeof(global::Windows.UI.Xaml.Controls.RatingControl),
new FrameworkPropertyMetadata(default(double)));
#endif
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false || false || false || false || false || false || false
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public RatingControl() : base()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#pragma warning disable 114 // new keyword hiding
namespace Windows.UI.Xaml.Controls
{
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented]
#endif
public partial class SplitButton : global::Windows.UI.Xaml.Controls.ContentControl
Expand Down Expand Up @@ -73,7 +73,7 @@ public object CommandParameter
typeof(global::Windows.UI.Xaml.Controls.SplitButton),
new FrameworkPropertyMetadata(default(global::Windows.UI.Xaml.Controls.Primitives.FlyoutBase)));
#endif
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public SplitButton() : base()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#pragma warning disable 114 // new keyword hiding
namespace Windows.UI.Xaml.Controls
{
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented]
#endif
public partial class ToggleSplitButton : global::Windows.UI.Xaml.Controls.SplitButton
Expand All @@ -21,7 +21,7 @@ public bool IsChecked
}
}
#endif
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public ToggleSplitButton() : base()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ public bool CanDragItems
typeof(global::Windows.UI.Xaml.Controls.TreeView),
new FrameworkPropertyMetadata(default(object)));
#endif
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false || false || false || false || false || false || false
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public TreeView() : base()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#pragma warning disable 114 // new keyword hiding
namespace Windows.UI.Xaml.Controls
{
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented]
#endif
public partial class TwoPaneView : global::Windows.UI.Xaml.Controls.Control
Expand Down Expand Up @@ -223,7 +223,7 @@ public double MinTallModeHeight
typeof(global::Windows.UI.Xaml.Controls.TwoPaneView),
new FrameworkPropertyMetadata(default(global::Windows.UI.Xaml.Controls.TwoPaneViewWideModeConfiguration)));
#endif
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false || false || false || false || false || false || false
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public TwoPaneView() : base()
{
Expand Down
16 changes: 16 additions & 0 deletions src/Uno.UI/UI/Xaml/Controls/Unsupported/RatingControl.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using System;

namespace Windows.UI.Xaml.Controls;

[Obsolete(
"The Windows.UI.Xaml.Controls version of this control is not supported. " +
"Please use Microsoft.UI.Xaml.Controls.RatingControl instead.")]
public partial class RatingControl
{
public RatingControl()
{
throw new NotImplementedException(
"The Windows.UI.Xaml.Controls version of this control is not supported. " +
"Please use Microsoft.UI.Xaml.Controls.RatingControl instead.");
}
}
16 changes: 16 additions & 0 deletions src/Uno.UI/UI/Xaml/Controls/Unsupported/SplitButton.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using System;

namespace Windows.UI.Xaml.Controls;

[Obsolete(
"The Windows.UI.Xaml.Controls version of this control is not supported. " +
"Please use Microsoft.UI.Xaml.Controls.SplitButton instead.")]
public partial class SplitButton
{
public SplitButton()
{
throw new NotImplementedException(
"The Windows.UI.Xaml.Controls version of this control is not supported. " +
"Please use Microsoft.UI.Xaml.Controls.SplitButton instead.");
}
}
16 changes: 16 additions & 0 deletions src/Uno.UI/UI/Xaml/Controls/Unsupported/ToggleSplitButton.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using System;

namespace Windows.UI.Xaml.Controls;

[Obsolete(
"The Windows.UI.Xaml.Controls version of this control is not supported. " +
"Please use Microsoft.UI.Xaml.Controls.ToggleSplitButton instead.")]
public partial class ToggleSplitButton
{
public ToggleSplitButton()
{
throw new NotImplementedException(
"The Windows.UI.Xaml.Controls version of this control is not supported. " +
"Please use Microsoft.UI.Xaml.Controls.ToggleSplitButton instead.");
}
}
16 changes: 16 additions & 0 deletions src/Uno.UI/UI/Xaml/Controls/Unsupported/TreeView.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using System;

namespace Windows.UI.Xaml.Controls;

[Obsolete(
"The Windows.UI.Xaml.Controls version of this control is not supported. " +
"Please use Microsoft.UI.Xaml.Controls.TreeView instead.")]
public partial class TreeView
{
public TreeView()
{
throw new NotImplementedException(
"The Windows.UI.Xaml.Controls version of this control is not supported. " +
"Please use Microsoft.UI.Xaml.Controls.TreeView instead.");
}
}
16 changes: 16 additions & 0 deletions src/Uno.UI/UI/Xaml/Controls/Unsupported/TwoPaneView.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using System;

namespace Windows.UI.Xaml.Controls;

[Obsolete(
"The Windows.UI.Xaml.Controls version of this control is not supported. " +
"Please use Microsoft.UI.Xaml.Controls.TwoPaneView instead.")]
public partial class TwoPaneView
{
public TwoPaneView()
{
throw new NotImplementedException(
"The Windows.UI.Xaml.Controls version of this control is not supported. " +
"Please use Microsoft.UI.Xaml.Controls.TwoPaneView instead.");
}
}
7 changes: 6 additions & 1 deletion src/Uno.WinUIRevert/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,12 @@ static void Main(string[] args)
Path.Combine(basePath, @"src\Uno.UI\UI\Xaml\Controls\Icon\SymbolIconSource.cs"),
Path.Combine(basePath, @"src\Uno.UI\UI\Xaml\Controls\Icon\PathIconSource.cs"),
Path.Combine(basePath, @"src\Uno.UI\UI\Xaml\Controls\Icon\FontIconSource.cs"),
Path.Combine(basePath, @"src\Uno.UI\UI\Xaml\Controls\Icon\IconSource.cs")
Path.Combine(basePath, @"src\Uno.UI\UI\Xaml\Controls\Icon\IconSource.cs"),
Path.Combine(basePath, @"src\Uno.UI\UI\Xaml\Controls\Unsupported\RatingControl.cs"),
Path.Combine(basePath, @"src\Uno.UI\UI\Xaml\Controls\Unsupported\SplitButton.cs"),
Path.Combine(basePath, @"src\Uno.UI\UI\Xaml\Controls\Unsupported\ToggleSplitButton.cs"),
Path.Combine(basePath, @"src\Uno.UI\UI\Xaml\Controls\Unsupported\TreeView.cs"),
Path.Combine(basePath, @"src\Uno.UI\UI\Xaml\Controls\Unsupported\TwoPaneView.cs"),
};
DeleteFiles(duplicatedImplementations);

Expand Down

0 comments on commit 9cdaacb

Please sign in to comment.