Skip to content

Commit 96dc185

Browse files
niels9001marcelwgnScottj1s
authored
1.8 branch (#1937)
Updating as new WASDK preview releases come out - Adding sample for the new `SubtleButtonStyle`, and removing the custom style. <img width="723" height="288" alt="image" src="https://github.com/user-attachments/assets/722bc5eb-c8ca-4c5a-8af2-0298b2f809d1" /> - Adding `BodyLargeTextBlockStyle` and `BodyLargeStrongTextBlockStyle` to the type ramp <img width="910" height="728" alt="image" src="https://github.com/user-attachments/assets/654bc012-8969-49d7-b540-c0a213405f7f" /> TO DO: Upgrade to 1.8 stable --------- Co-authored-by: Marcel W. <[email protected]> Co-authored-by: Marcel Wagner <[email protected]> Co-authored-by: Scott Jones <[email protected]>
1 parent c206d44 commit 96dc185

File tree

16 files changed

+87
-216
lines changed

16 files changed

+87
-216
lines changed

.pipelines/azure-pipelines.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ steps:
4545
dir /b /s $(System.DefaultWorkingDirectory)
4646
displayName: 'List contents of ArtifactStagingDirectory and DefaultWorkingDirectory'
4747
48-
- task: VSTest@2
49-
displayName: 'Run Sample Unit Tests'
50-
inputs:
51-
failOnMinTestsNotRun: true
52-
minimumExpectedTests: '3'
53-
testAssemblyVer2: |
54-
**\WinUIGallery.UnitTests.build.appxrecipe
48+
# - task: VSTest@2
49+
# displayName: 'Run Sample Unit Tests'
50+
# inputs:
51+
# failOnMinTestsNotRun: true
52+
# minimumExpectedTests: '3'
53+
# testAssemblyVer2: |
54+
# **\WinUIGallery.UnitTests.build.appxrecipe
5555

5656
- task: PowerShell@2
5757
displayName: Uninstall existing WinUI Gallery packages

Directory.Build.props

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,14 @@
33

44
<!-- Building both in the WinUI repo and standalone, WinUIGallery's dependencies now require latest SDKs -->
55
<PropertyGroup>
6-
<SamplesTargetFrameworkMoniker>net8.0-windows10.0.22621.0</SamplesTargetFrameworkMoniker>
6+
<NoWarn>
7+
NU1605;
8+
$(NoWarn)
9+
</NoWarn>
10+
<SamplesTargetFrameworkMoniker>net8.0-windows10.0.22621.0</SamplesTargetFrameworkMoniker>
711
<WindowsSdkTargetPlatformVersion>10.0.22621.756</WindowsSdkTargetPlatformVersion>
812
<WindowsAppSdkTargetPlatformVersion>10.0.17763.0</WindowsAppSdkTargetPlatformVersion>
9-
<MicrosoftWindowsSDKBuildToolsNugetPackageVersion>10.0.22621.756</MicrosoftWindowsSDKBuildToolsNugetPackageVersion>
13+
<MicrosoftWindowsSDKBuildToolsNugetPackageVersion>10.0.26100.4948</MicrosoftWindowsSDKBuildToolsNugetPackageVersion>
1014
</PropertyGroup>
1115

1216
<!-- If we aren't building in the WinUI repo, import the necessary missing props we'd normally pick up from its Directory.Build.props hierarchy -->

WinUIGallery/App.xaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
<local:ItemTemplates />
2323
<ResourceDictionary Source="ms-appx:///Controls/CopyButton.xaml" />
2424
<ResourceDictionary Source="ms-appx:///Controls/OpacityMaskView.xaml" />
25-
<ResourceDictionary Source="ms-appx:///Styles/Button.xaml" />
2625
<ResourceDictionary Source="ms-appx:///Styles/Grid.xaml" />
2726
<ResourceDictionary Source="ms-appx:///Styles/GridViewItem.xaml" />
2827
<ResourceDictionary Source="ms-appx:///Styles/TextBlock.xaml" />

WinUIGallery/Controls/DesignGuidance/TypographyControl.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<ColumnDefinition Width="272" />
2121
<ColumnDefinition Width="136" />
2222
<ColumnDefinition Width="112" />
23-
<ColumnDefinition Width="164" />
23+
<ColumnDefinition Width="194" />
2424
<ColumnDefinition Width="Auto" />
2525
</Grid.ColumnDefinitions>
2626
<TextBlock

WinUIGallery/MainWindow.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<TitleBar.LeftHeader>
2929
<ImageIcon
3030
Height="16"
31-
Margin="16,0,8,0"
31+
Margin="0,0,8,0"
3232
Source="/Assets/Tiles/GalleryIcon.ico" />
3333
</TitleBar.LeftHeader>
3434
<TitleBar.Content>

WinUIGallery/Package.Dev.appxmanifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
88
IgnorableNamespaces="uap mp uap3">
99
<!--Note: package version and assembly version must be kept in sync-->
10-
<Identity Name="Microsoft.WinUI3ControlsGallery.Debug" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" Version="2.6.0.0" />
10+
<Identity Name="Microsoft.WinUI3ControlsGallery.Debug" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" Version="2.7.0.0" />
1111
<mp:PhoneIdentity PhoneProductId="863667e0-667a-4bb4-ac52-c59656c7333a" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
1212
<Properties>
1313
<DisplayName>WinUI 3 Gallery Dev</DisplayName>

WinUIGallery/Package.appxmanifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
88
IgnorableNamespaces="uap mp uap3">
99
<!--Note: package version and assembly version must be kept in sync-->
10-
<Identity Name="Microsoft.WinUI3ControlsGallery" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" Version="2.6.0.0" />
10+
<Identity Name="Microsoft.WinUI3ControlsGallery" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" Version="2.7.0.0" />
1111
<mp:PhoneIdentity PhoneProductId="863667e0-667a-4bb4-ac52-c59656c7333a" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
1212
<Properties>
1313
<DisplayName>WinUI 3 Gallery</DisplayName>

WinUIGallery/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@
2424
// by using the '*' as shown below:
2525
// [assembly: AssemblyVersion("1.0.*")]
2626
// Note: package version and assembly version must be kept in sync
27-
[assembly: AssemblyVersion("2.6.0.0")]
28-
[assembly: AssemblyFileVersion("2.6.0.0")]
27+
[assembly: AssemblyVersion("2.7.0.0")]
28+
[assembly: AssemblyFileVersion("2.7.0.0")]
2929
[assembly: ComVisible(false)]

WinUIGallery/Samples/ControlPages/ButtonPage.xaml

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,29 @@
8282
</x:String>
8383
</controls:ControlExample.Xaml>
8484
</-->
85+
86+
<controls:ControlExample HeaderText="Built-in styles applied to Button.">
87+
<controls:ControlExample.Example>
88+
<StackPanel Orientation="Horizontal" Spacing="16">
89+
<Button
90+
AutomationProperties.Name="Accent style"
91+
Content="Accent style button"
92+
Style="{StaticResource AccentButtonStyle}" />
93+
<Button
94+
AutomationProperties.Name="Subtle style"
95+
Content="Subtle style button"
96+
Style="{StaticResource SubtleButtonStyle}" />
97+
</StackPanel>
98+
99+
</controls:ControlExample.Example>
100+
<controls:ControlExample.Xaml>
101+
<x:String xml:space="preserve">
102+
&lt;Button Style="{StaticResource AccentButtonStyle}" Content="Accent style button"/&gt;
103+
&lt;Button Style="{StaticResource SubtleButtonStyle}" Content="Subtle style button"/&gt;
104+
</x:String>
105+
</controls:ControlExample.Xaml>
106+
</controls:ControlExample>
107+
85108
<controls:ControlExample HeaderText="Wrapping Buttons with large content">
86109
<StackPanel>
87110
<TextBlock
@@ -126,20 +149,5 @@
126149
</x:String>
127150
</controls:ControlExample.Xaml>
128151
</controls:ControlExample>
129-
130-
<controls:ControlExample HeaderText="Accent style applied to Button.">
131-
<controls:ControlExample.Example>
132-
<Button
133-
AutomationProperties.Name="Accent style"
134-
Content="Accent style button"
135-
Style="{StaticResource AccentButtonStyle}" />
136-
</controls:ControlExample.Example>
137-
<controls:ControlExample.Xaml>
138-
<x:String>
139-
&lt;Button Style="{StaticResource AccentButtonStyle}" Content="Accent style button" /&gt;
140-
</x:String>
141-
</controls:ControlExample.Xaml>
142-
</controls:ControlExample>
143-
144152
</StackPanel>
145153
</Page>

WinUIGallery/Samples/ControlPages/Design/TypographyPage.xaml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@
3939
</Grid.RowDefinitions>
4040
<RichTextBlock>
4141
<Paragraph>
42-
Typography helps provide structure and hierarchy to UI. The default font for Windows is <Hyperlink NavigateUri="https://learn.microsoft.com/windows/apps/design/downloads/#fonts">Segoe UI Variable</Hyperlink>
43-
.
42+
Typography helps provide structure and hierarchy to UI. The default font for Windows is <Hyperlink NavigateUri="https://learn.microsoft.com/windows/apps/design/downloads/#fonts">Segoe UI Variable</Hyperlink>.
4443
Best practice is to use Regular weight for most text, use Semibold for titles. The minimum values should be 12px Regular, 14px Semibold.</Paragraph>
4544
</RichTextBlock>
4645
<controls:ControlExample
@@ -158,7 +157,10 @@
158157
</Canvas>
159158
</ScrollViewer>
160159

161-
<ScrollViewer HorizontalScrollBarVisibility="Auto" HorizontalScrollMode="Auto" VerticalScrollBarVisibility="Hidden">
160+
<ScrollViewer
161+
HorizontalScrollBarVisibility="Auto"
162+
HorizontalScrollMode="Auto"
163+
VerticalScrollBarVisibility="Hidden">
162164
<StackPanel>
163165
<Grid Margin="0,48,0,24" HorizontalAlignment="Stretch">
164166
<Grid.ColumnDefinitions>
@@ -212,6 +214,21 @@
212214
SizeLineHeight="14/20 epx"
213215
VariableFont="Text, SemiBold"
214216
Weight="600" />
217+
<controls:TypographyControl
218+
Example="Body Large"
219+
ExampleStyle="{StaticResource BodyLargeTextBlockStyle}"
220+
ResourceName="BodyLargeTextBlockStyle"
221+
SizeLineHeight="18/24 epx"
222+
VariableFont="Text, Regular"
223+
Weight="400" />
224+
<controls:TypographyControl
225+
Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
226+
Example="Body Large Strong"
227+
ExampleStyle="{StaticResource BodyLargeStrongTextBlockStyle}"
228+
ResourceName="BodyLargeStrongTextBlockStyle"
229+
SizeLineHeight="18/24 epx"
230+
VariableFont="Text, SemiBold"
231+
Weight="600" />
215232
<controls:TypographyControl
216233
Example="Subtitle"
217234
ExampleStyle="{StaticResource SubtitleTextBlockStyle}"

0 commit comments

Comments
 (0)