Skip to content

Commit c381151

Browse files
Merge branch 'master' into mhawker/winui-2.4
2 parents 54b9861 + 971c68f commit c381151

31 files changed

+344
-88
lines changed

Directory.Build.props

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)toolkit.snk</AssemblyOriginatorKeyFile>
2525
</PropertyGroup>
2626

27+
<PropertyGroup Condition="'$(TF_BUILD)' == 'true'">
28+
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
29+
</PropertyGroup>
30+
2731
<Choose>
2832
<When Condition="'$(IsTestProject)' != 'true' and '$(IsSampleProject)' != 'true' and '$(IsDesignProject)' != 'true'">
2933
<PropertyGroup>
@@ -41,7 +45,7 @@
4145
</Choose>
4246

4347
<Choose>
44-
<When Condition="'$(IsTestProject)' != 'true' and '$(SourceLinkEnabled)' != 'false' and '$(IsSampleProject)' != 'true' and '$(IsDesignProject)' != 'true'">
48+
<When Condition="'$(SourceLinkEnabled)' != 'false' and '$(IsSampleProject)' != 'true'">
4549
<PropertyGroup>
4650
<!-- Optional: Declare that the Repository URL can be published to NuSpec -->
4751
<PublishRepositoryUrl>true</PublishRepositoryUrl>

Directory.Build.targets

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
<PropertyGroup>
66
<TargetPlatformVersion>10.0.$(DefaultTargetPlatformVersion).0</TargetPlatformVersion>
77
<TargetPlatformMinVersion>10.0.$(DefaultTargetPlatformMinVersion).0</TargetPlatformMinVersion>
8-
<DebugType>Full</DebugType>
8+
</PropertyGroup>
9+
10+
<PropertyGroup Condition="'$(DebugType)' == ''">
11+
<DebugType>Portable</DebugType>
912
</PropertyGroup>
1013

1114
<ItemGroup>

Microsoft.Toolkit.HighPerformance/Microsoft.Toolkit.HighPerformance.csproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@
2121
- NullableRef&lt;T&gt;: a stack-only struct similar to Ref&lt;T&gt;, which also supports nullable references.
2222
</Description>
2323
<PackageTags>UWP Toolkit Windows core standard unsafe span memory string array stream buffer extensions helpers parallel performance</PackageTags>
24-
25-
<!-- This is a temporary workaround for https://github.com/dotnet/sdk/issues/955 -->
26-
<DebugType>Full</DebugType>
2724
</PropertyGroup>
2825
<Choose>
2926
<When Condition=" '$(TargetFramework)' == 'netstandard1.4' ">

Microsoft.Toolkit.Parsers/Microsoft.Toolkit.Parsers.csproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212

1313
</Description>
1414
<PackageTags>UWP Toolkit Windows Parsers Parsing Markdown RSS</PackageTags>
15-
16-
<!-- This is a temporary workaround for https://github.com/dotnet/sdk/issues/955 -->
17-
<DebugType>Full</DebugType>
1815
</PropertyGroup>
1916

2017
<ItemGroup>

Microsoft.Toolkit.Services/Microsoft.Toolkit.Services.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@
1111
</Description>
1212
<PackageTags>UWP Community Toolkit Windows Microsoft Graph OneDrive Twitter Translator LinkedIn service login OAuth</PackageTags>
1313

14-
<!-- This is a temporary workaround for https://github.com/dotnet/sdk/issues/955 -->
15-
<DebugType>Full</DebugType>
1614
<NoWarn>CS8002;CS0618</NoWarn>
15+
<DeterministicSourcePaths Condition="'$(EnableSourceLink)' == ''">false</DeterministicSourcePaths>
1716
</PropertyGroup>
1817

1918
<PropertyGroup Condition="'$(TargetFramework)' == 'uap10.0.16299'">

Microsoft.Toolkit.Uwp.Notifications/Microsoft.Toolkit.Uwp.Notifications.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858

5959
<PropertyGroup Condition="'$(TargetFramework)' == 'native'">
6060
<OutputType>winmdobj</OutputType>
61+
<DebugType>Full</DebugType>
6162
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
6263
<!-- Workaround for issue NuGet/Home#8388; change behavior during NuGet restore time vs. final build to avoid NuGet conflict in VS 2019 -->
6364
<NugetTargetMoniker Condition="'$(DesignTimeBuild)' == 'true'">native</NugetTargetMoniker>

Microsoft.Toolkit.Uwp.PlatformSpecificAnalyzer/Microsoft.Toolkit.Uwp.PlatformSpecificAnalyzer.csproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
<PackageTags>UWP Toolkit Windows Platform Specific Analyzer</PackageTags>
88

99
<IncludeBuildOutput>false</IncludeBuildOutput>
10-
11-
<!-- This is a temporary workaround for https://github.com/dotnet/sdk/issues/955 -->
12-
<DebugType>Full</DebugType>
1310
</PropertyGroup>
1411

1512
<ItemGroup>

Microsoft.Toolkit.Uwp.SampleApp/SamplePages/ListViewExtensions/ListViewExtensionsCode.bind

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
x:Name="SampleListView"
2323
Margin="12"
2424
ItemTemplate="{StaticResource NormalTemplate}"
25+
IsItemClickEnabled="True"
26+
extensions:ListViewExtensions.Command="{Binding SampleCommand}"
2527
extensions:ListViewExtensions.AlternateColor="#33AAAAAA"
2628
extensions:ListViewExtensions.AlternateItemTemplate="{StaticResource AlternateTemplate}"
2729
extensions:ListViewExtensions.StretchItemContainerDirection="Both">
Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,32 @@
1-
<Page
2-
x:Class="Microsoft.Toolkit.Uwp.SampleApp.SamplePages.ListViewExtensionsPage"
3-
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4-
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5-
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
6-
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
7-
xmlns:extensions="using:Microsoft.Toolkit.Uwp.UI.Extensions"
8-
mc:Ignorable="d">
1+
<Page x:Class="Microsoft.Toolkit.Uwp.SampleApp.SamplePages.ListViewExtensionsPage"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5+
xmlns:extensions="using:Microsoft.Toolkit.Uwp.UI.Extensions"
6+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
7+
mc:Ignorable="d">
98

109
<Page.Resources>
1110
<DataTemplate x:Name="NormalTemplate">
12-
<TextBlock Text="{Binding Title}" Foreground="Green"></TextBlock>
11+
<TextBlock Foreground="Green"
12+
Text="{Binding Title}" />
1313
</DataTemplate>
1414

1515
<DataTemplate x:Name="AlternateTemplate">
16-
<TextBlock Text="{Binding Title}" Foreground="Red"></TextBlock>
16+
<TextBlock Foreground="Red"
17+
Text="{Binding Title}" />
1718
</DataTemplate>
1819
</Page.Resources>
1920

2021
<Grid>
2122

22-
<ListView
23-
x:Name="SampleListView"
24-
Margin="12"
25-
ItemTemplate="{StaticResource NormalTemplate}"
26-
extensions:ListViewExtensions.AlternateColor="#33AAAAAA"
27-
extensions:ListViewExtensions.AlternateItemTemplate="{StaticResource AlternateTemplate}"
28-
extensions:ListViewExtensions.StretchItemContainerDirection="Both">
29-
</ListView>
23+
<ListView x:Name="SampleListView"
24+
Margin="12"
25+
extensions:ListViewExtensions.AlternateColor="#33AAAAAA"
26+
extensions:ListViewExtensions.AlternateItemTemplate="{StaticResource AlternateTemplate}"
27+
extensions:ListViewExtensions.Command="{Binding SampleCommand}"
28+
extensions:ListViewExtensions.StretchItemContainerDirection="Both"
29+
IsItemClickEnabled="True"
30+
ItemTemplate="{StaticResource NormalTemplate}" />
3031
</Grid>
3132
</Page>

Microsoft.Toolkit.Uwp.SampleApp/SamplePages/ListViewExtensions/ListViewExtensionsPage.xaml.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
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.Windows.Input;
7+
using Microsoft.Toolkit.Uwp.SampleApp.Common;
8+
using Microsoft.Toolkit.Uwp.SampleApp.Data;
59
using Microsoft.Toolkit.Uwp.UI.Extensions;
10+
using Windows.UI.Popups;
611
using Windows.UI.Xaml;
712
using Windows.UI.Xaml.Controls;
813

@@ -15,6 +20,8 @@ public ListViewExtensionsPage()
1520
this.InitializeComponent();
1621
}
1722

23+
public ICommand SampleCommand => new DelegateCommand<PhotoDataItem>(OnExecuteSampleCommand);
24+
1825
public async void OnXamlRendered(FrameworkElement control)
1926
{
2027
var sampleListView = control.FindChildByName("SampleListView") as ListView;
@@ -23,6 +30,14 @@ public async void OnXamlRendered(FrameworkElement control)
2330
{
2431
sampleListView.ItemsSource = await new Data.PhotosDataSource().GetItemsAsync();
2532
}
33+
34+
// Transfer Data Context so we can access SampleCommand
35+
control.DataContext = this;
36+
}
37+
38+
private async void OnExecuteSampleCommand(PhotoDataItem item)
39+
{
40+
await new MessageDialog($"You clicked {item.Title} via the 'ListViewExtensions.Command' binding", "Item Clicked").ShowAsync();
2641
}
2742
}
2843
}

0 commit comments

Comments
 (0)