Skip to content

Commit 953f7fd

Browse files
committed
chore: update MahApps.Metro to v3.0.0-rc0516
1 parent 16c0791 commit 953f7fd

File tree

5 files changed

+46
-43
lines changed

5 files changed

+46
-43
lines changed

src/IconPacks.Browser/Controls/SideBar.xaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,10 @@
9797
<ctrls:CopyToClipboardTextBox TextToCopy="{Binding SelectedIcon.Description}" />
9898
</mah:MetroHeader>
9999
<mah:MetroHeader Header="Homepage">
100-
<TextBox Style="{DynamicResource IconPacksBrowser.Styles.TextBox.Hyperlink}"
101-
Text="{Binding SelectedIcon.MetaData.ProjectUrl, Mode=OneWay}" />
100+
<TextBox Style="{DynamicResource IconPacksBrowser.Styles.TextBox.Hyperlink}" Text="{Binding SelectedIcon.MetaData.ProjectUrl, Mode=OneWay}" />
102101
</mah:MetroHeader>
103102
<mah:MetroHeader Header="License URL">
104-
<TextBox Style="{DynamicResource IconPacksBrowser.Styles.TextBox.Hyperlink}"
105-
Text="{Binding SelectedIcon.MetaData.LicenseUrl, Mode=OneWay}" />
103+
<TextBox Style="{DynamicResource IconPacksBrowser.Styles.TextBox.Hyperlink}" Text="{Binding SelectedIcon.MetaData.LicenseUrl, Mode=OneWay}" />
106104
</mah:MetroHeader>
107105
</StackPanel>
108106
</Expander>

src/IconPacks.Browser/IconPacks.Browser.csproj

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,15 @@
1919
</PropertyGroup>
2020

2121
<ItemGroup>
22-
<PackageReference Include="JetBrains.Annotations" Version="2024.2.0" />
22+
<PackageReference Include="JetBrains.Annotations" Version="2025.2.0" />
2323
<PackageReference Include="WpfAnalyzers" Version="4.1.1">
2424
<PrivateAssets>all</PrivateAssets>
2525
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
2626
</PackageReference>
27-
<PackageReference Include="MahApps.Metro.IconPacks" Version="5.0.0" />
28-
<PackageReference Include="MahApps.Metro" Version="2.4.10" />
29-
<PackageReference Include="MahApps.Metro" Version="3.0.0-alpha0492" />
27+
<PackageReference Include="MahApps.Metro" Version="3.0.0-rc0516" />
3028
<PackageReference Include="AsyncAwaitBestPractices.MVVM" Version="8.0.0" />
3129
<PackageReference Include="Microsoft-WindowsAPICodePack-Shell" Version="1.1.5" />
32-
<PackageReference Include="VirtualizingWrapPanel" Version="2.0.11" />
30+
<PackageReference Include="VirtualizingWrapPanel" Version="2.3.1" />
3331

3432
<PackageReference Include="MaterialDesignThemes" Version="3.0.1" Condition=" $(DefineConstants.Contains(NETCOREAPP)) == false " />
3533
<PackageReference Include="MaterialDesignColors" Version="1.2.7" Condition=" $(DefineConstants.Contains(NETCOREAPP)) == false " />

src/IconPacks.Browser/MainWindow.xaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
<mah:MetroWindow x:Class="IconPacks.Browser.MainWindow"
1+
<mah:MetroWindow x:Class="IconPacks.Browser.MainWindow"
22
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
44
xmlns:controls="clr-namespace:WpfToolkit.Controls;assembly=VirtualizingWrapPanel"
5+
xmlns:controlzex="urn:controlzex"
56
xmlns:converter="http://metro.mahapps.com/winfx/xaml/shared"
67
xmlns:ctrls="clr-namespace:IconPacks.Browser.Controls"
78
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
@@ -14,12 +15,11 @@
1415
Height="800"
1516
MinWidth="600"
1617
MinHeight="400"
18+
controlzex:WindowBackdropManager.BackdropType="None"
1719
d:DataContext="{d:DesignInstance viewModels:MainViewModel}"
1820
d:DesignHeight="400"
1921
d:DesignWidth="600"
2022
mah:DialogParticipation.Register="{Binding}"
21-
BorderBrush="{DynamicResource MahApps.Brushes.Accent}"
22-
GlowColor="{DynamicResource MahApps.Colors.Accent}"
2323
ResizeMode="CanResizeWithGrip"
2424
TitleCharacterCasing="Normal"
2525
WindowStartupLocation="CenterScreen"
@@ -296,9 +296,9 @@
296296
<controls:VirtualizingWrapPanel IsItemsHost="True"
297297
ItemSize="128,128"
298298
MouseWheelDelta="1"
299+
MouseWheelDeltaItem="1"
299300
Orientation="Horizontal"
300301
ScrollLineDelta="1"
301-
MouseWheelDeltaItem="1"
302302
SpacingMode="BetweenItemsOnly"
303303
StretchItems="False" />
304304
</ItemsPanelTemplate>

src/IconPacks.Browser/Styles/NavigationListBox.xaml

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@
5050
Focusable="False"
5151
Opacity="0.0" />
5252
</Grid>
53-
<materialDesign:Ripple Padding="{TemplateBinding Padding}"
53+
<materialDesign:Ripple x:Name="ContentPresenter"
54+
Padding="{TemplateBinding Padding}"
5455
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
5556
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
5657
Content="{TemplateBinding Content}"
@@ -63,34 +64,42 @@
6364
</Grid>
6465
<ControlTemplate.Triggers>
6566
<Trigger Property="IsSelected" Value="True">
66-
<Setter Property="Foreground" Value="{Binding RelativeSource={RelativeSource Self}, Path=(mah:ItemHelper.SelectedForegroundBrush), Mode=OneWay}" />
6767
<Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mah:ItemHelper.SelectedBackgroundBrush), Mode=OneWay}" />
68+
<Setter TargetName="Border" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mah:ItemHelper.SelectedBorderBrush), Mode=OneWay}" />
69+
<Setter TargetName="ContentPresenter" Property="Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mah:ItemHelper.SelectedForegroundBrush), Mode=OneWay}" />
70+
<Setter TargetName="SelectionIndicator" Property="Fill" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mah:ItemHelper.SelectedForegroundBrush), Mode=OneWay}" />
6871
<Setter TargetName="SelectionIndicator" Property="Opacity" Value="1.0" />
6972
</Trigger>
7073
<MultiTrigger>
7174
<MultiTrigger.Conditions>
7275
<Condition Property="IsSelected" Value="True" />
7376
<Condition Property="Selector.IsSelectionActive" Value="True" />
7477
</MultiTrigger.Conditions>
75-
<Setter Property="Foreground" Value="{Binding RelativeSource={RelativeSource Self}, Path=(mah:ItemHelper.ActiveSelectionForegroundBrush), Mode=OneWay}" />
7678
<Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mah:ItemHelper.ActiveSelectionBackgroundBrush), Mode=OneWay}" />
79+
<Setter TargetName="Border" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mah:ItemHelper.ActiveSelectionBorderBrush), Mode=OneWay}" />
80+
<Setter TargetName="ContentPresenter" Property="Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mah:ItemHelper.ActiveSelectionForegroundBrush), Mode=OneWay}" />
81+
<Setter TargetName="SelectionIndicator" Property="Fill" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mah:ItemHelper.ActiveSelectionForegroundBrush), Mode=OneWay}" />
7782
</MultiTrigger>
7883

7984
<MultiTrigger>
8085
<MultiTrigger.Conditions>
8186
<Condition Property="IsMouseOver" Value="True" />
8287
<Condition Property="IsSelected" Value="True" />
8388
</MultiTrigger.Conditions>
84-
<Setter Property="Foreground" Value="{Binding RelativeSource={RelativeSource Self}, Path=(mah:ItemHelper.HoverSelectedForegroundBrush), Mode=OneWay}" />
8589
<Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mah:ItemHelper.HoverSelectedBackgroundBrush), Mode=OneWay}" />
90+
<Setter TargetName="Border" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mah:ItemHelper.HoverSelectedBorderBrush), Mode=OneWay}" />
91+
<!-- <Setter TargetName="ContentPresenter" Property="Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mah:ItemHelper.HoverSelectedForegroundBrush), Mode=OneWay}" /> -->
92+
<Setter TargetName="SelectionIndicator" Property="Fill" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mah:ItemHelper.HoverSelectedForegroundBrush), Mode=OneWay}" />
8693
</MultiTrigger>
8794
<MultiTrigger>
8895
<MultiTrigger.Conditions>
8996
<Condition Property="IsMouseOver" Value="True" />
9097
<Condition Property="IsSelected" Value="False" />
9198
</MultiTrigger.Conditions>
92-
<Setter Property="Foreground" Value="{Binding RelativeSource={RelativeSource Self}, Path=(mah:ItemHelper.HoverForegroundBrush), Mode=OneWay}" />
9399
<Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mah:ItemHelper.HoverBackgroundBrush), Mode=OneWay}" />
100+
<Setter TargetName="Border" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mah:ItemHelper.HoverBorderBrush), Mode=OneWay}" />
101+
<Setter TargetName="ContentPresenter" Property="Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mah:ItemHelper.HoverForegroundBrush), Mode=OneWay}" />
102+
<Setter TargetName="SelectionIndicator" Property="Fill" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mah:ItemHelper.HoverForegroundBrush), Mode=OneWay}" />
94103
</MultiTrigger>
95104

96105
<Trigger Property="IsEnabled" Value="False">
@@ -110,16 +119,16 @@
110119
</Setter.Value>
111120
</Setter>
112121
<Setter Property="VerticalContentAlignment" Value="Center" />
113-
<Setter Property="mah:ItemHelper.ActiveSelectionBackgroundBrush" Value="Transparent" />
114-
<Setter Property="mah:ItemHelper.ActiveSelectionForegroundBrush" Value="{DynamicResource MahApps.Brushes.AccentBase}" />
122+
<Setter Property="mah:ItemHelper.ActiveSelectionBackgroundBrush" Value="{DynamicResource MahApps.Brushes.Accent}" />
123+
<Setter Property="mah:ItemHelper.ActiveSelectionForegroundBrush" Value="{DynamicResource MahApps.Brushes.IdealForeground}" />
115124
<Setter Property="mah:ItemHelper.DisabledForegroundBrush" Value="{DynamicResource MahApps.Brushes.Gray}" />
116125
<Setter Property="mah:ItemHelper.DisabledSelectedBackgroundBrush" Value="Transparent" />
117126
<Setter Property="mah:ItemHelper.DisabledSelectedForegroundBrush" Value="{DynamicResource MahApps.Brushes.Gray}" />
118-
<Setter Property="mah:ItemHelper.HoverBackgroundBrush" Value="{DynamicResource MahApps.Brushes.Gray9}" />
119-
<Setter Property="mah:ItemHelper.HoverSelectedBackgroundBrush" Value="{DynamicResource MahApps.Brushes.Gray9}" />
127+
<Setter Property="mah:ItemHelper.HoverBackgroundBrush" Value="{DynamicResource MahApps.Brushes.Gray.SemiTransparent}" />
128+
<Setter Property="mah:ItemHelper.HoverSelectedBackgroundBrush" Value="{DynamicResource MahApps.Brushes.SemiTransparent}" />
120129
<Setter Property="mah:ItemHelper.HoverSelectedForegroundBrush" Value="{DynamicResource MahApps.Brushes.AccentBase}" />
121-
<Setter Property="mah:ItemHelper.SelectedBackgroundBrush" Value="Transparent" />
122-
<Setter Property="mah:ItemHelper.SelectedForegroundBrush" Value="{DynamicResource MahApps.Brushes.AccentBase}" />
130+
<Setter Property="mah:ItemHelper.SelectedBackgroundBrush" Value="{DynamicResource MahApps.Brushes.Accent}" />
131+
<Setter Property="mah:ItemHelper.SelectedForegroundBrush" Value="{DynamicResource MahApps.Brushes.IdealForeground}" />
123132
</Style>
124133

125134
<Style x:Key="IconPacksBrowser.Styles.ListBox.Navigation"

0 commit comments

Comments
 (0)