Skip to content

Commit

Permalink
Deprecated AppPinManager
Browse files Browse the repository at this point in the history
  • Loading branch information
nmetulev committed Feb 19, 2018
1 parent b5fcb64 commit fd8a937
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 173 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,6 @@
</Content>
<Content Include="SamplePages\HeaderedItemsControl\HeaderedItemsControlXaml.bind" />
<Content Include="SamplePages\HeaderedContentControl\HeaderedContentControlXaml.bind" />
<Content Include="SamplePages\AppPinManager\AppPinManagerHelperCode.bind" />
<Content Include="SamplePages\Mouse\MouseCursorPage.bind" />
<Content Include="SamplePages\FrameworkElementExtensions\FrameworkElementExtensionsCode.bind">
<SubType>Designer</SubType>
Expand Down Expand Up @@ -499,9 +498,6 @@
<Compile Include="SamplePages\AdvancedCollectionView\AdvancedCollectionViewPage.xaml.cs">
<DependentUpon>AdvancedCollectionViewPage.xaml</DependentUpon>
</Compile>
<Compile Include="SamplePages\AppPinManager\AppPinManagerHelperPage.xaml.cs">
<DependentUpon>AppPinManagerHelperPage.xaml</DependentUpon>
</Compile>
<Compile Include="SamplePages\BluetoothLEHelper\BluetoothLEHelperPage.xaml.cs">
<DependentUpon>BluetoothLEHelperPage.xaml</DependentUpon>
</Compile>
Expand Down Expand Up @@ -796,10 +792,6 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="SamplePages\AppPinManager\AppPinManagerHelperPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="SamplePages\Carousel\CarouselPage.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

10 changes: 0 additions & 10 deletions Microsoft.Toolkit.Uwp.SampleApp/SamplePages/samples.json
Original file line number Diff line number Diff line change
Expand Up @@ -550,16 +550,6 @@
"Icon": "/Assets/Helpers.png",
"DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/UWPCommunityToolkit/master/docs/helpers/BackgroundTaskHelper.md"
},
{
"About": "The AppPinManager helps easily add app shortcuts to the Start Menu or the Taskbar",
"CodeFile": "AppPinManagerHelperCode.bind",
"CodeUrl": "https://github.com/Microsoft/UWPCommunityToolkit/blob/master/Microsoft.Toolkit.Uwp/Helpers/AppPinManager/AppPinManager.cs",
"DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/UWPCommunityToolkit/master/docs/helpers/AppPinManager.md",
"Icon": "/Assets/Helpers.png",
"Name": "AppPinManager",
"Type": "AppPinManagerHelperPage",
"BadgeUpdateVersionRequired": "Creators Update required"
},
{
"Name": "NetworkHelper",
"Type": "NetworkHelperPage",
Expand Down
5 changes: 5 additions & 0 deletions Microsoft.Toolkit.Uwp/Helpers/AppPinManager/AppPinManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ namespace Microsoft.Toolkit.Uwp.Helpers
/// <summary>
/// This class provides static helper methods help to add the app in startmenu or TaskBar.
/// </summary>
[Obsolete("This helper will be removed in future releases. Please use the platform APIs directly")]
public static class AppPinManager
{
/// <summary>
/// Pin the current app in Windows TaskBar
/// </summary>
/// <returns>PinResult</returns>
[Obsolete("This helper will be removed in future releases. Please use the Windows.UI.Shel.TaskbarManager APIs directly")]
public static async Task<PinResult> PinCurrentAppToTaskBarAsync()
{
var resultPinResult = PinResult.UnsupportedOs;
Expand Down Expand Up @@ -70,6 +72,7 @@ public static async Task<PinResult> PinCurrentAppToTaskBarAsync()
/// </summary>
/// <param name="appListEntry">AppListEntry</param>
/// <returns>PinResult</returns>
[Obsolete("This helper will be removed in future releases. Please use the Windows.UI.Shel.TaskbarManager APIs directly")]
public static async Task<PinResult> PinSpecificAppToTaskBarAsync(AppListEntry appListEntry)
{
var resultPinResult = PinResult.UnsupportedOs;
Expand Down Expand Up @@ -111,6 +114,7 @@ public static async Task<PinResult> PinSpecificAppToTaskBarAsync(AppListEntry ap
/// </summary>
/// <param name="entry">AppListEntry</param>
/// <returns>PinResult</returns>
[Obsolete("This helper will be removed in future releases. Please use the Windows.UI.StartScreen.StartScreenManager APIs directly")]
public static async Task<PinResult> PinSpecificAppToStartMenuAsync(AppListEntry entry)
{
var resultPinResult = PinResult.UnsupportedOs;
Expand Down Expand Up @@ -146,6 +150,7 @@ public static async Task<PinResult> PinSpecificAppToStartMenuAsync(AppListEntry
/// <param name="user">User</param>
/// <param name="entry">AppListEntry</param>
/// <returns>PinResult</returns>
[Obsolete("This helper will be removed in future releases. Please use the Windows.UI.StartScreen.StartScreenManager APIs directly")]
public static async Task<PinResult> PinUserSpecificAppToStartMenuAsync(User user, AppListEntry entry)
{
var resultPinResult = PinResult.UnsupportedOs;
Expand Down
3 changes: 3 additions & 0 deletions docs/helpers/AppPinManager.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ keywords: windows 10, uwp, uwp community toolkit, uwp toolkit, StartMenu, TaskBa

# AppPinManager

> [!NOTE]
The AppPinManager is deprecated and will be removed in the next major release. Please use the platform APIs ([TaskbarManager](https://docs.microsoft.com/en-us/uwp/api/windows.ui.shell.taskbarmanager) and [StartScreenManager](https://docs.microsoft.com/en-us/uwp/api/windows.ui.startscreen.startscreenmanager)) directly.

The **AppPinManager** is a class used to add the application shortcut in StartMenu or TaskBar.

## Syntax
Expand Down
1 change: 0 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ Once you search you should see a list similar to the one below (versions may be

### Helpers
* [AdvancedCollectionView](https://docs.microsoft.com/windows/uwpcommunitytoolkit/helpers/AdvancedCollectionView/)
* [AppPinManager](https://docs.microsoft.com/windows/uwpcommunitytoolkit/helpers/AppPinManager/)
* [BackgroundTaskHelper](https://docs.microsoft.com/windows/uwpcommunitytoolkit/helpers/BackgroundTaskHelper/)
* [BindableValueHolder](https://docs.microsoft.com/windows/uwpcommunitytoolkit/helpers/BindableValueHolder/)
* [BluetoothLEHelper](https://docs.microsoft.com/windows/uwpcommunitytoolkit/helpers/BluetoothLEHelper/)
Expand Down

2 comments on commit fd8a937

@rvinothrajendran
Copy link
Contributor

@rvinothrajendran rvinothrajendran commented on fd8a937 Feb 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @nmetulev ,
Please let me know , why this helper class has removed
Thanks
Vinoth.

@nmetulev
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We removed the helper by request from the platform team that owns the platform APIs. Even though the helper was very simple to use, the actual platform APIs are also already very simple to use. However, they improve every release and continue to add different functionality that is not exposed through the helper, and the new functionality might not be discoverable.

Please sign in to comment.