Skip to content

Commit 1c5a2f4

Browse files
authored
Merge pull request #15 from windows-toolkit/feature/sample-app
Upgraded dependencies to Preview2 packages
2 parents d8fbfe5 + bcebeb0 commit 1c5a2f4

File tree

4 files changed

+5
-36
lines changed

4 files changed

+5
-36
lines changed

samples/MvvmSampleUwp/MvvmSampleUwp/MvvmSampleUwp.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,13 +260,13 @@
260260
<Version>6.2.10</Version>
261261
</PackageReference>
262262
<PackageReference Include="Microsoft.Toolkit">
263-
<Version>7.0.0-build.152</Version>
263+
<Version>7.0.0-preview2</Version>
264264
</PackageReference>
265265
<PackageReference Include="Microsoft.Toolkit.Mvvm">
266-
<Version>7.0.0-build.149</Version>
266+
<Version>7.0.0-preview2</Version>
267267
</PackageReference>
268268
<PackageReference Include="Microsoft.Toolkit.Uwp.UI.Controls">
269-
<Version>7.0.0-build.152</Version>
269+
<Version>7.0.0-preview2</Version>
270270
</PackageReference>
271271
<PackageReference Include="Microsoft.UI.Xaml">
272272
<Version>2.4.2</Version>

samples/MvvmSampleUwp/MvvmSampleUwp/Views/AsyncRelayCommandPage.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
xmlns:toolkit="using:Microsoft.Toolkit.Uwp.UI.Controls"
88
xmlns:controls="using:MvvmSampleUwp.Controls"
99
xmlns:viewModels="using:MvvmSampleUwp.ViewModels"
10-
xmlns:views="using:MvvmSampleUwp.Views"
1110
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
1211
xmlns:interactivity="using:Microsoft.Xaml.Interactivity"
1312
xmlns:core="using:Microsoft.Xaml.Interactions.Core"
13+
xmlns:converters="using:Microsoft.Toolkit.Uwp.UI.Converters"
1414
mc:Ignorable="d"
1515
NavigationCacheMode="Enabled">
1616
<Page.DataContext>
@@ -22,7 +22,7 @@
2222
</core:EventTriggerBehavior>
2323
</interactivity:Interaction.Behaviors>
2424
<Page.Resources>
25-
<views:TaskResultConverter x:Key="TaskResultConverter"/>
25+
<converters:TaskResultConverter x:Key="TaskResultConverter"/>
2626
</Page.Resources>
2727

2828
<ScrollViewer Padding="16" CanContentRenderOutsideBounds="True">

samples/MvvmSampleUwp/MvvmSampleUwp/Views/AsyncRelayCommandPage.xaml.cs

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5-
using System;
6-
using System.Threading.Tasks;
75
using Windows.UI.Xaml.Controls;
8-
using Windows.UI.Xaml.Data;
96

107
namespace MvvmSampleUwp.Views
118
{
@@ -19,26 +16,4 @@ public AsyncRelayCommandPage()
1916
this.InitializeComponent();
2017
}
2118
}
22-
23-
// TODO: replace this with the one from the toolkit, when https://github.com/windows-toolkit/WindowsCommunityToolkit/pull/3410 is merged
24-
public sealed class TaskResultConverter : IValueConverter
25-
{
26-
/// <inheritdoc/>
27-
public object Convert(object value, Type targetType, object parameter, string language)
28-
{
29-
if (value is Task task &&
30-
task.IsCompletedSuccessfully)
31-
{
32-
return task.GetType().GetProperty(nameof(Task<object>.Result))?.GetValue(task);
33-
}
34-
35-
return null;
36-
}
37-
38-
/// <inheritdoc/>
39-
public object ConvertBack(object value, Type targetType, object parameter, string language)
40-
{
41-
throw new NotImplementedException();
42-
}
43-
}
4419
}

samples/MvvmSampleUwp/nuget.config

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)