Skip to content

Deprecate TabView, RadialGradientBrush, Singleton, FacebookService #3315

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Microsoft.Toolkit.Uwp.SampleApp/SamplePages/samples.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
"Name": "TabView",
"Type": "TabViewPage",
"Subcategory": "Layout",
"BadgeUpdateVersionRequired": "DEPRECATED",
"DeprecatedWarning": "Please migrate to the TabView control from WinUI, this control will be removed in a future release. https://aka.ms/winui",
"About": "A control for displaying multiple items in the same space and allows a user to easily switch between them.",
"CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/TabView",
"XamlCodeFile": "TabViewXaml.bind",
Expand Down Expand Up @@ -663,7 +665,7 @@
"CodeFile": "FacebookCode.bind",
"Icon": "/SamplePages/Facebook Service/FacebookLogo.png",
"BadgeUpdateVersionRequired": "DEPRECATED",
"DeprecatedWarning": "These helpers will be removed in the next release.",
"DeprecatedWarning": "The underlying library, winsdkfb, which the FacebookService relies on is not currently maintained.",
"DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/services/Facebook.md"
},
{
Expand Down Expand Up @@ -1095,6 +1097,8 @@
{
"Name": "RadialGradientBrush",
"Type": "RadialGradientBrushPage",
"BadgeUpdateVersionRequired": "DEPRECATED",
"DeprecatedWarning": "Please migrate to the RadialGradientBrush control from WinUI, this control will be removed in a future release. https://aka.ms/winui",
"About": "A composition brush which creates a radial gradient effect.",
"CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Media/Brushes/RadialGradientBrush.cs",
"XamlCodeFile": "RadialGradientBrushXaml.bind",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ namespace Microsoft.Toolkit.Uwp.Services.Facebook
/// <summary>
/// Class for connecting to Facebook.
/// </summary>
[Obsolete("The underlying library, winsdkfb, which the FacebookService relies on is not currently maintained.")]
public class FacebookService
{
/// <summary>
Expand Down
1 change: 1 addition & 0 deletions Microsoft.Toolkit.Uwp.UI.Controls/TabView/TabView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
/// <summary>
/// TabView is a control for displaying a set of tabs and their content.
/// </summary>
[Obsolete("Please migrate to the TabView control from WinUI, this control will be removed in a future release. https://aka.ms/winui")]
[TemplatePart(Name = TabContentPresenterName, Type = typeof(ContentPresenter))]
[TemplatePart(Name = TabViewContainerName, Type = typeof(Grid))]
[TemplatePart(Name = TabsItemsPresenterName, Type = typeof(ItemsPresenter))]
Expand Down
2 changes: 2 additions & 0 deletions Microsoft.Toolkit.Uwp.UI.Media/Brushes/RadialGradientBrush.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

//// UWP Replacement for WPF RadialGradientBrush: https://msdn.microsoft.com/en-us/library/system.windows.media.radialgradientbrush(v=vs.110).aspx.

using System;
using System.Numerics;
using Microsoft.Graphics.Canvas;
using Microsoft.Graphics.Canvas.Brushes;
Expand All @@ -18,6 +19,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Media
/// RadialGradientBrush - This GradientBrush defines its Gradient as an interpolation
/// within an Ellipse.
/// </summary>
[Obsolete("Please migrate to the RadialGradientBrush control from WinUI, this control will be removed in a future release. https://aka.ms/winui")]
[ContentProperty(Name = nameof(GradientStops))]
public partial class RadialGradientBrush : CanvasBrushBase
{
Expand Down
15 changes: 6 additions & 9 deletions Microsoft.Toolkit/Helpers/Singleton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,20 @@
namespace Microsoft.Toolkit.Helpers
{
/// <summary>
/// Provides an easy-to-use thread-safe Singleton Pattern via <see cref="System.Collections.Concurrent.ConcurrentDictionary{TKey, TValue}">ConcurrentDictionary</see>.
/// Obsolete see https://github.com/windows-toolkit/WindowsCommunityToolkit/issues/3134.
/// </summary>
/// <typeparam name="T">The type to be used for creating the Singleton instance.</typeparam>
/// <example>
/// Use by adding a static property to your class for a traditional access pattern:
/// Instead of this helper, migrate your code to this pattern instead:
/// <code>
/// // Setup Singleton
/// public static class MyClass {
/// public static MyClass Instance => Singleton&lt;MyClass&gt;.Instance;
///
/// public void MyMethod() { }
/// public class MyClass
/// {
/// public static MyClass Instance { get; } = new MyClass();
/// }
///
/// // Use Singleton Instance
/// MyClass.Instance.MyMethod();
/// </code>
/// </example>
[Obsolete("This helper will be removed in a future release, see example tag for code replacement. https://github.com/windows-toolkit/WindowsCommunityToolkit/issues/3134")]
public static class Singleton<T>
where T : new()
{
Expand Down