Skip to content

Commit

Permalink
Adding support for insider SDK usage, and ListViewItem/GridViewItem v…
Browse files Browse the repository at this point in the history
…isual updates (#3991)

* ListViewItem/GridViewItem Visual Updates - Phase #1

* Incremental work for new insider Windows SDK support

* Incremental work #2 for new insider Windows SDK support

* Incremental work #3 for new insider Windows SDK support

* Incremental work #4 for new insider Windows SDK support

* Incremental work #5 for new insider Windows SDK support

* Incremental work #6 for new insider Windows SDK support

* Upgrading to insider Windows SDK version 10.0.21296.0

* Switching to use more accurate UseInternalSDK instead of UseInsiderSDK

* ListViewItem/GridViewItem: moving High Contrast resources from ResourceKey='AccentAAFillColorDisabledBrush' type to Color='{ThemeResource SystemColorWindowColor}' type.

* Simplifications: no more LatestWithVisualUpdate, LatestWithoutVisualUpdate options, _vu suffix, exception catch, RSx changes

* Deleting unneeded GridViewItem_themeresources.xaml

* Using Insider SDK again

* Using Insider SDK again

* Upgrading CustomTasks.dll version from 1.0.70 to 1.0.71 after its publication

* Also using 21h1_generic.xaml on 21H1 OS
  • Loading branch information
RBrid authored Jan 26, 2021
1 parent 4289186 commit cd20808
Show file tree
Hide file tree
Showing 22 changed files with 1,598 additions and 51 deletions.
15 changes: 7 additions & 8 deletions SdkVersion.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,19 @@
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SDKVersionRS2>10.0.15063.0</SDKVersionRS2>
<SDKVersionRS3>10.0.16299.0</SDKVersionRS3>
<SDKVersionRS4>10.0.17134.0</SDKVersionRS4>
<SDKVersionRS5>10.0.17763.0</SDKVersionRS5>
<SDKVersion19H1>10.0.18362.0</SDKVersion19H1>
<SDKVersionInsider>10.0.18362.0</SDKVersionInsider>
<SDKVersionRS3>10.0.16299.0</SDKVersionRS3>
<SDKVersionRS4>10.0.17134.0</SDKVersionRS4>
<SDKVersionRS5>10.0.17763.0</SDKVersionRS5>
<SDKVersion19H1>10.0.18362.0</SDKVersion19H1>
<SDKVersionInsider>10.0.21296.0</SDKVersionInsider>
</PropertyGroup>
<PropertyGroup>
<UseInsiderSDK>true</UseInsiderSDK>
<!-- By default we use the publicly shipped SDK version which is 19H1 now -->
<MuxSdkVersion Condition="$(UseInsiderSDK) != 'true'">$(SDKVersion19H1)</MuxSdkVersion>

<!-- Setting UseInsiderSDK will allow the code to build to the newest insider SDK
In order to get this from a cmd prompt run
set UseInsiderSDK=true and then launch muxcontrols.sln from that cmd prompt-->
<MuxSdkVersion Condition="$(UseInsiderSDK)=='true'">$(SDKVersionInsider)</MuxSdkVersion>
set UseInsiderSDK=true and then launch muxcontrols.sln from that cmd prompt -->
<MuxSdkVersion Condition="$(UseInsiderSDK) == 'true'">$(SDKVersionInsider)</MuxSdkVersion>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion build/Helix/PrepareHelixPayload.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Copy-Item "$nugetPackagesDir\taef.redist.wlk.10.31.180822002\build\Binaries\$Pla
New-Item -ItemType Directory -Force -Path "$payloadDir\.NETCoreApp2.1\"
Copy-Item "$nugetPackagesDir\runtime.win-$Platform.microsoft.netcore.app.2.1.0\runtimes\win-$Platform\lib\netcoreapp2.1\*" "$payloadDir\.NETCoreApp2.1\"
Copy-Item "$nugetPackagesDir\runtime.win-$Platform.microsoft.netcore.app.2.1.0\runtimes\win-$Platform\native\*" "$payloadDir\.NETCoreApp2.1\"
Copy-Item "$nugetPackagesDir\MUXCustomBuildTasks.1.0.70\tools\$platform\WttLog.dll" $payloadDir
Copy-Item "$nugetPackagesDir\MUXCustomBuildTasks.1.0.71\tools\$platform\WttLog.dll" $payloadDir

function Copy-If-Exists
{
Expand Down
2 changes: 1 addition & 1 deletion build/Helix/packages.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MUXCustomBuildTasks" version="1.0.70" targetFramework="native" />
<package id="MUXCustomBuildTasks" version="1.0.71" targetFramework="native" />
<package id="TAEF.Redist.Wlk" version="10.31.180822002" targetFramework="native" />
<package id="microsoft.windows.apps.test" version="1.0.181203002" targetFramework="native" />
<package id="runtime.win-x86.microsoft.netcore.app" version="2.1.0" targetFramework="native" />
Expand Down
11 changes: 10 additions & 1 deletion dev/CommonStyles/CommonStyles.vcxitems
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@
<UseVisualStyle>Latest</UseVisualStyle>
<Version>RS1</Version>
<Type>ThemeResources</Type>
<UseNonstandardConditionalXAML>true</UseNonstandardConditionalXAML>
</Page>
<Page Include="$(MSBuildThisFileDirectory)ToggleSwitch_themeresources.xaml">
<UseVisualStyle>Latest</UseVisualStyle>
Expand Down Expand Up @@ -127,11 +126,21 @@
<Version>RS1</Version>
<Type>ThemeResources</Type>
</Page>
<Page Include="$(MSBuildThisFileDirectory)GridViewItem_themeresources_21h1.xaml">
<UseVisualStyle>Latest</UseVisualStyle>
<Version>21H1</Version>
<Type>ThemeResources</Type>
</Page>
<Page Include="$(MSBuildThisFileDirectory)ListViewItem_themeresources.xaml">
<UseVisualStyle>Latest</UseVisualStyle>
<Version>RS1</Version>
<Type>ThemeResources</Type>
</Page>
<Page Include="$(MSBuildThisFileDirectory)ListViewItem_themeresources_21h1.xaml">
<UseVisualStyle>Latest</UseVisualStyle>
<Version>21H1</Version>
<Type>ThemeResources</Type>
</Page>
<Page Include="$(MSBuildThisFileDirectory)ListViewItem_themeresources_v2.5.xaml">
<UseVisualStyle>V2dot5</UseVisualStyle>
<Version>RS1</Version>
Expand Down
190 changes: 190 additions & 0 deletions dev/CommonStyles/GridViewItem_themeresources_21h1.xaml

Large diffs are not rendered by default.

1,061 changes: 1,061 additions & 0 deletions dev/CommonStyles/ListViewItem_themeresources_21h1.xaml

Large diffs are not rendered by default.

75 changes: 75 additions & 0 deletions dev/CommonStyles/TestUI/CommonStylesPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,81 @@
<FontIcon Glyph="&#xE781;" />
</Button>
</StackPanel>
<StackPanel Style="{ThemeResource CompactPanelStyle}">
<TextBlock Text="ListViewItem/GridViewItem testing area" Style="{ThemeResource StandardGroupHeader}"/>
<StackPanel Orientation='Horizontal' Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<StackPanel>
<StackPanel Orientation='Horizontal'>
<TextBlock Text='ListView - SelectionMode=' VerticalAlignment='Center' Margin='2'/>
<ComboBox x:Name='cmbListViewSelectionMode' SelectedIndex='2' SelectionChanged="CmbListViewSelectionMode_SelectionChanged">
<ComboBoxItem>None</ComboBoxItem>
<ComboBoxItem>Single</ComboBoxItem>
<ComboBoxItem>Multiple</ComboBoxItem>
<ComboBoxItem>Extended</ComboBoxItem>
</ComboBox>
</StackPanel>
<CheckBox x:Name='chkListViewIsEnabled' Content='IsEnabled?' IsChecked='True' Margin='2' Checked="ChkListViewIsEnabled_Checked" Unchecked="ChkListViewIsEnabled_Unchecked"/>
<ListView x:Name='listView1' CanReorderItems='True' AllowDrop='True' SelectionMode='Multiple' Width='300' HorizontalAlignment='Left' Margin='2'>
<ListViewItem x:Name='listViewItem1' Content='List Item 1'/>
<ListViewItem x:Name='listViewItem2' Content='List Item 2'/>
<ListViewItem x:Name='listViewItem3' Content='List Item 3' IsSelected='true'/>
</ListView>
</StackPanel>
<StackPanel>
<StackPanel Orientation='Horizontal'>
<TextBlock Text='GridView - SelectionMode=' VerticalAlignment='Center' Margin='2'/>
<ComboBox x:Name='cmbGridViewSelectionMode' SelectedIndex='2' SelectionChanged="CmbGridViewSelectionMode_SelectionChanged">
<ComboBoxItem>None</ComboBoxItem>
<ComboBoxItem>Single</ComboBoxItem>
<ComboBoxItem>Multiple</ComboBoxItem>
<ComboBoxItem>Extended</ComboBoxItem>
</ComboBox>
</StackPanel>
<CheckBox x:Name='chkGridViewIsEnabled' Content='IsEnabled?' IsChecked='True' Margin='2' Checked="ChkGridViewIsEnabled_Checked" Unchecked="ChkGridViewIsEnabled_Unchecked"/>
<GridView x:Name='gridView1' CanReorderItems='True' AllowDrop='True' SelectionMode='Multiple' Width='300' HorizontalAlignment='Left' Margin='2'>
<GridViewItem x:Name='gridViewItem1' Content='Item 1' MinWidth='120' MinHeight='60'/>
<GridViewItem x:Name='gridViewItem2' Content='Item 2' MinWidth='120' MinHeight='60'/>
<GridViewItem x:Name='gridViewItem3' Content='Item 3' MinWidth='120' MinHeight='60' IsSelected='true'/>
</GridView>
</StackPanel>
</StackPanel>
<StackPanel Orientation='Horizontal' Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<StackPanel>
<TextBlock Text='ListView - SelectionMode=Extended:' Margin='2'/>
<ListView x:Name='listView2' CanReorderItems='True' AllowDrop='True' SelectionMode='Extended' Width='300' HorizontalAlignment='Left' Margin='2'>
<ListViewItem x:Name='listViewItem4' Content='List Item 4' Height='5'/>
<ListViewItem x:Name='listViewItem5' Content='List Item 5' Height='70'/>
<ListViewItem x:Name='listViewItem6' Content='List Item 6' Height='90' IsSelected='true'/>
</ListView>
</StackPanel>
<StackPanel>
<TextBlock Text='GridView - SelectionMode=Extended:' Margin='2'/>
<GridView x:Name='gridView2' CanReorderItems='True' AllowDrop='True' SelectionMode='Extended' Width='300' HorizontalAlignment='Left' Margin='2'>
<GridViewItem x:Name='gridViewItem4' Content='Item 4' MinWidth='120' MinHeight='60'/>
<GridViewItem x:Name='gridViewItem5' Content='Item 5' MinWidth='120' MinHeight='60'/>
<GridViewItem x:Name='gridViewItem6' Content='Item 6' MinWidth='120' MinHeight='60' IsSelected='true'/>
</GridView>
</StackPanel>
</StackPanel>
<StackPanel Orientation='Horizontal' Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<StackPanel>
<TextBlock Text='ListView - SelectionMode=Single:' Margin='2'/>
<ListView x:Name='listView3' CanReorderItems='True' AllowDrop='True' SelectionMode='Single' Width='300' HorizontalAlignment='Left' Margin='2'>
<ListViewItem x:Name='listViewItem7' Content='List Item 7'/>
<ListViewItem x:Name='listViewItem8' Content='List Item 8'/>
<ListViewItem x:Name='listViewItem9' Content='List Item 9' IsSelected='true'/>
</ListView>
</StackPanel>
<StackPanel>
<TextBlock Text='GridView - SelectionMode=Single:' Margin='2'/>
<GridView x:Name='gridView3' CanReorderItems='True' AllowDrop='True' SelectionMode='Single' Width='300' HorizontalAlignment='Left' Margin='2'>
<GridViewItem x:Name='gridViewItem7' Content='Item 7' MinWidth='120' MinHeight='60'/>
<GridViewItem x:Name='gridViewItem8' Content='Item 8' MinWidth='120' MinHeight='60'/>
<GridViewItem x:Name='gridViewItem9' Content='Item 9' MinWidth='120' MinHeight='60' IsSelected='true'/>
</GridView>
</StackPanel>
</StackPanel>
</StackPanel>
</StackPanel>
<StackPanel>
<TextBlock Text="Validating" Style="{ThemeResource StandardGroupHeader}"/>
Expand Down
47 changes: 47 additions & 0 deletions dev/CommonStyles/TestUI/CommonStylesPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -312,5 +312,52 @@ private void StandardBackground_Click(object sender, RoutedEventArgs e)
RootSampleControlsPanel.Background = new SolidColorBrush(Colors.Transparent);
}

private void CmbListViewSelectionMode_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (listView1 != null)
{
listView1.SelectionMode = (ListViewSelectionMode)(sender as ComboBox).SelectedIndex;
}
}

private void CmbGridViewSelectionMode_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (gridView1 != null)
{
gridView1.SelectionMode = (ListViewSelectionMode)(sender as ComboBox).SelectedIndex;
}
}

private void ChkListViewIsEnabled_Checked(object sender, RoutedEventArgs e)
{
if (listView1 != null)
{
listView1.IsEnabled = true;
}
}

private void ChkListViewIsEnabled_Unchecked(object sender, RoutedEventArgs e)
{
if (listView1 != null)
{
listView1.IsEnabled = false;
}
}

private void ChkGridViewIsEnabled_Checked(object sender, RoutedEventArgs e)
{
if (gridView1 != null)
{
gridView1.IsEnabled = true;
}
}

private void ChkGridViewIsEnabled_Unchecked(object sender, RoutedEventArgs e)
{
if (gridView1 != null)
{
gridView1.IsEnabled = false;
}
}
}
}
Loading

0 comments on commit cd20808

Please sign in to comment.