Skip to content

Commit c762fea

Browse files
Merge pull request #55 from AndrewKeepCoding/scrollbar-extensions-nuget-packages
Update ScrollBarExtensions to WinAppSDK v1.8
2 parents 3da24a4 + 5f415fb commit c762fea

19 files changed

Lines changed: 365 additions & 471 deletions

AK.Toolkit.sln

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AK.Toolkit.WinUI3.ButtonExt
4646
EndProject
4747
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AK.Toolkit.WinUI3.ButtonExtensionsSampleApp", "AK.Toolkit.WinUI3.ButtonExtensionsSampleApp\AK.Toolkit.WinUI3.ButtonExtensionsSampleApp.csproj", "{C58364A2-840A-4D37-8DFB-960A562F7DD0}"
4848
EndProject
49+
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "AK.Toolkit.WinUI3.Shared", "WinUI3\AK.Toolkit.WinUI3.Shared\AK.Toolkit.WinUI3.Shared.shproj", "{31DAE469-2B03-4087-828C-712388602F70}"
50+
EndProject
4951
Global
5052
GlobalSection(SolutionConfigurationPlatforms) = preSolution
5153
Debug|Any CPU = Debug|Any CPU
@@ -398,8 +400,12 @@ Global
398400
{DCDA10E1-12BB-4437-AADE-1BA1D79F1E00} = {EDEB400F-756D-4F11-895A-4A8D2C72176A}
399401
{3D24D1D2-5AAE-4C2C-9F24-0AB0C2E84FCF} = {7F954F26-CA57-40C7-9268-51868AAE52D7}
400402
{C58364A2-840A-4D37-8DFB-960A562F7DD0} = {EDEB400F-756D-4F11-895A-4A8D2C72176A}
403+
{31DAE469-2B03-4087-828C-712388602F70} = {7F954F26-CA57-40C7-9268-51868AAE52D7}
401404
EndGlobalSection
402405
GlobalSection(ExtensibilityGlobals) = postSolution
403406
SolutionGuid = {5291613D-E375-45A4-ACBB-E655A7307CCC}
404407
EndGlobalSection
408+
GlobalSection(SharedMSBuildProjectFiles) = preSolution
409+
WinUI3\AK.Toolkit.WinUI3.Shared\AK.Toolkit.WinUI3.Shared.projitems*{31dae469-2b03-4087-828c-712388602f70}*SharedItemsImports = 13
410+
EndGlobalSection
405411
EndGlobal

Samples/AK.Toolkit.Samples.WinUI3.ScrollBarExtensions/AK.Toolkit.Samples.WinUI3.ScrollBarExtensions.csproj

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>WinExe</OutputType>
4-
<TargetFramework>net7.0-windows10.0.19041.0</TargetFramework>
4+
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
55
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
66
<RootNamespace>AK.Toolkit.Samples.WinUI3.ScrollBarExtensions</RootNamespace>
77
<ApplicationManifest>app.manifest</ApplicationManifest>
88
<Platforms>x86;x64;arm64</Platforms>
9-
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
10-
<PublishProfile>win10-$(Platform).pubxml</PublishProfile>
9+
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
10+
<PublishProfile>win-$(Platform).pubxml</PublishProfile>
1111
<UseWinUI>true</UseWinUI>
1212
<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
1313
<Nullable>enable</Nullable>
@@ -33,12 +33,12 @@
3333
</ItemGroup>
3434

3535
<ItemGroup>
36-
<PackageReference Include="AK.Toolkit.WinUI3.NumberBoxEx" Version="1.0.0" />
37-
<PackageReference Include="Bogus" Version="34.0.2" />
38-
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.0.0" />
36+
<PackageReference Include="AK.Toolkit.WinUI3.NumberBoxEx" Version="1.0.1" />
37+
<PackageReference Include="Bogus" Version="35.6.4" />
38+
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
3939
<PackageReference Include="CommunityToolkit.WinUI.UI.Controls.DataGrid" Version="7.1.2" />
40-
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.2.230118.102" />
41-
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.755" />
40+
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.8.251003001" />
41+
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.26100.6584" />
4242
<Manifest Include="$(ApplicationManifest)" />
4343
</ItemGroup>
4444

Samples/AK.Toolkit.Samples.WinUI3.ScrollBarExtensions/AnnotationsPage.xaml

Lines changed: 48 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -29,51 +29,60 @@
2929
AutoGenerateColumns="False"
3030
ItemsSource="{x:Bind Users}">
3131
<controls:DataGrid.Columns>
32-
<controls:DataGridTextColumn
33-
Binding="{Binding Id}"
34-
Header="ID" />
35-
<controls:DataGridTextColumn
36-
Binding="{Binding FirstName}"
37-
Header="First Name" />
38-
<controls:DataGridTextColumn
39-
Binding="{Binding LastName}"
40-
Header="Last Name" />
41-
<controls:DataGridTextColumn
42-
Binding="{Binding Address}"
43-
Header="Address" />
32+
<controls:DataGridTextColumn Binding="{Binding Id}" Header="ID" />
33+
<controls:DataGridTextColumn Binding="{Binding FirstName}" Header="First Name" />
34+
<controls:DataGridTextColumn Binding="{Binding LastName}" Header="Last Name" />
35+
<controls:DataGridTextColumn Binding="{Binding Address}" Header="Address" />
4436
</controls:DataGrid.Columns>
4537
</controls:DataGrid>
4638

4739
<StackPanel
4840
Grid.Row="1"
4941
Grid.Column="1"
50-
Spacing="20">
51-
<TextBox Text="{x:Bind RedAnnotationsText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
52-
<TextBox.Header>
53-
<TextBlock
54-
Margin="0"
55-
Padding="0"
56-
Foreground="HotPink"
57-
Text="Red annotations" />
58-
</TextBox.Header>
59-
</TextBox>
60-
<TextBox Text="{x:Bind GreenAnnotationsText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
61-
<TextBox.Header>
62-
<TextBlock
63-
Foreground="LightGreen"
64-
Text="Green annotations" />
65-
</TextBox.Header>
66-
</TextBox>
67-
<TextBox Text="{x:Bind BlueAnnotationsText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
68-
<TextBox.Header>
69-
<TextBlock
70-
Foreground="SkyBlue"
71-
Text="Blue annotations" />
72-
</TextBox.Header>
73-
</TextBox>
74-
<toolkit:NumberBoxEx
75-
Header="Annotations height"
76-
Value="{x:Bind AnnotationsHeight, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
42+
MinWidth="200"
43+
Spacing="8">
44+
45+
<TextBlock Text="Annotations" />
46+
<ItemsControl ItemsSource="{x:Bind AnnotationSettingsList}">
47+
<ItemsControl.ItemTemplate>
48+
<DataTemplate x:DataType="local:AnnotationSettings">
49+
<TextBox TextChanged="AnnotationSettingsTextBox_TextChanged">
50+
<TextBox.Header>
51+
<TextBlock Foreground="{x:Bind local:AnnotationsPage.ToBrush(Color)}" Text="{x:Bind Name}" />
52+
</TextBox.Header>
53+
</TextBox>
54+
</DataTemplate>
55+
</ItemsControl.ItemTemplate>
56+
</ItemsControl>
57+
58+
<StackPanel>
59+
<Grid ColumnDefinitions="*,Auto">
60+
<TextBlock Grid.Column="0" Text="Height" />
61+
<TextBlock Grid.Column="1" Text="{x:Bind local:AnnotationsPage.ToString(AnnotationHeightSlider.Value, 0), Mode=OneWay}" />
62+
</Grid>
63+
<Slider
64+
x:Name="AnnotationHeightSlider"
65+
Maximum="16"
66+
Minimum="1"
67+
SnapsTo="StepValues"
68+
StepFrequency="1"
69+
ValueChanged="AnnotationHeightSlider_ValueChanged" />
70+
</StackPanel>
71+
72+
<StackPanel>
73+
<Grid ColumnDefinitions="*,Auto">
74+
<TextBlock Grid.Column="0" Text="Opacity" />
75+
<TextBlock Grid.Column="1" Text="{x:Bind local:AnnotationsPage.ToString(AnnotationOpacitySlider.Value, 1), Mode=OneWay}" />
76+
</Grid>
77+
<Slider
78+
x:Name="AnnotationOpacitySlider"
79+
Maximum="1"
80+
Minimum="0.1"
81+
SnapsTo="StepValues"
82+
StepFrequency="0.1"
83+
ValueChanged="AnnotationOpacitySlider_ValueChanged" />
84+
</StackPanel>
85+
7786
</StackPanel>
7887
</Grid>
7988

0 commit comments

Comments
 (0)