Skip to content

Migrate brush names in MD3 Demo #3846

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/MaterialDesign3.Demo.Wpf/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<materialDesign:PackIcon Margin="3"
Background="Transparent"
Cursor="Hand"
Foreground="{DynamicResource PrimaryHueDarkBrush}"
Foreground="{DynamicResource MaterialDesign.Brush.Primary.Dark}"
Kind="Xml"
ToolTip="View XAML">
<materialDesign:PackIcon.Style>
Expand Down Expand Up @@ -101,7 +101,7 @@
<Grid>
<AdornerDecorator>
<Border Margin="-5"
BorderBrush="{DynamicResource SecondaryHueMidBrush}"
BorderBrush="{DynamicResource MaterialDesign.Brush.Secondary}"
Opacity=".4">
<Border.Style>
<Style TargetType="Border">
Expand Down Expand Up @@ -136,7 +136,7 @@
<Style TargetType="Rectangle" x:Key="PageSectionSeparator">
<Setter Property="Margin" Value="0,24" />
<Setter Property="Height" Value="1" />
<Setter Property="Fill" Value="{DynamicResource MaterialDesignDivider}" />
<Setter Property="Fill" Value="{DynamicResource MaterialDesign.Brush.TextBox.HoverBackground}" />
</Style>

</ResourceDictionary>
Expand Down
10 changes: 5 additions & 5 deletions src/MaterialDesign3.Demo.Wpf/Buttons.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@
</smtx:XamlDisplay>

<smtx:XamlDisplay UniqueKey="buttons_254">
<Button Background="{DynamicResource MaterialDesignTextFieldBoxBackground}"
<Button Background="{DynamicResource MaterialDesign.Brush.TextBox.FilledBackground}"
IsEnabled="{Binding DataContext.ControlsEnabled, RelativeSource={RelativeSource FindAncestor, AncestorType=Window}}"
Style="{StaticResource MaterialDesignIconButton}"
ToolTip="MaterialDesignIconButton">
Expand All @@ -518,7 +518,7 @@
<Rectangle Grid.Row="2"
Height="1"
Margin="0,24,0,0"
Fill="{DynamicResource MaterialDesignDivider}" />
Fill="{DynamicResource MaterialDesign.Brush.TextBox.HoverBackground}" />

<TextBlock Grid.Row="3"
Margin="0,24"
Expand Down Expand Up @@ -584,7 +584,7 @@
<Rectangle Grid.Row="5"
Height="1"
Margin="0,24,0,0"
Fill="{DynamicResource MaterialDesignDivider}" />
Fill="{DynamicResource MaterialDesign.Brush.TextBox.HoverBackground}" />

<TextBlock Grid.Row="6"
Margin="0,24"
Expand Down Expand Up @@ -786,7 +786,7 @@
<Rectangle Grid.Row="8"
Height="1"
Margin="0,24,0,0"
Fill="{DynamicResource MaterialDesignDivider}" />
Fill="{DynamicResource MaterialDesign.Brush.TextBox.HoverBackground}" />

<TextBlock Grid.Row="9"
Margin="0,24"
Expand Down Expand Up @@ -941,7 +941,7 @@
<Rectangle Grid.Row="11"
Height="1"
Margin="0,24,0,0"
Fill="{DynamicResource MaterialDesignDivider}" />
Fill="{DynamicResource MaterialDesign.Brush.TextBox.HoverBackground}" />

<TextBlock Grid.Row="12"
Margin="0,24"
Expand Down
14 changes: 7 additions & 7 deletions src/MaterialDesign3.Demo.Wpf/Cards.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
<materialDesign:Card Width="200"
Padding="0"
Background="#03a9f4"
Foreground="{DynamicResource PrimaryHueDarkForegroundBrush}">
Foreground="{DynamicResource MaterialDesign.Brush.Primary.Dark.Foreground}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
Expand Down Expand Up @@ -222,17 +222,17 @@
UniqueKey="cards_4">
<materialDesign:Card Width="200"
Padding="8"
Background="{DynamicResource PrimaryHueLightBrush}"
Foreground="{DynamicResource PrimaryHueLightForegroundBrush}">
Background="{DynamicResource MaterialDesign.Brush.Primary.Light}"
Foreground="{DynamicResource MaterialDesign.Brush.Primary.Light.Foreground}">
<TextBlock FontSize="16" Text="Boring Text" />
</materialDesign:Card>
</smtx:XamlDisplay>

<smtx:XamlDisplay Margin="4,4,0,16" UniqueKey="cards_5">
<materialDesign:Card Width="200"
Padding="8"
Background="{DynamicResource PrimaryHueDarkBrush}"
Foreground="{DynamicResource PrimaryHueDarkForegroundBrush}"
Background="{DynamicResource MaterialDesign.Brush.Primary.Dark}"
Foreground="{DynamicResource MaterialDesign.Brush.Primary.Dark.Foreground}"
UniformCornerRadius="6">
<TextBlock Text="You can adjust the corner radius" TextWrapping="Wrap" />
</materialDesign:Card>
Expand All @@ -244,8 +244,8 @@
UniqueKey="cards_6">
<materialDesign:Card Width="200"
Padding="8"
Background="{DynamicResource PrimaryHueDarkBrush}"
Foreground="{DynamicResource PrimaryHueDarkForegroundBrush}">
Background="{DynamicResource MaterialDesign.Brush.Primary.Dark}"
Foreground="{DynamicResource MaterialDesign.Brush.Primary.Dark.Foreground}">
<StackPanel>
<TextBlock Margin="16,16,12,8"
FontSize="16"
Expand Down
16 changes: 8 additions & 8 deletions src/MaterialDesign3.Demo.Wpf/Chips.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@

<smtx:XamlDisplay Margin="0,0,4,4" UniqueKey="chips_5">
<materialDesign:Chip Content="Twitter"
IconBackground="{DynamicResource PrimaryHueDarkBrush}"
IconForeground="{DynamicResource PrimaryHueDarkForegroundBrush}">
IconBackground="{DynamicResource MaterialDesign.Brush.Primary.Dark}"
IconForeground="{DynamicResource MaterialDesign.Brush.Primary.Dark.Foreground}">
<materialDesign:Chip.Icon>
<materialDesign:PackIcon Kind="Twitter" />
</materialDesign:Chip.Icon>
Expand Down Expand Up @@ -93,8 +93,8 @@
<smtx:XamlDisplay Margin="0,0,4,4" UniqueKey="chips_9">
<materialDesign:Chip Content="ZNA Inc"
Icon="Z"
IconBackground="{DynamicResource PrimaryHueLightBrush}"
IconForeground="{DynamicResource PrimaryHueLightForegroundBrush}"
IconBackground="{DynamicResource MaterialDesign.Brush.Primary.Light}"
IconForeground="{DynamicResource MaterialDesign.Brush.Primary.Light.Foreground}"
IsDeletable="True" />
</smtx:XamlDisplay>
</WrapPanel>
Expand Down Expand Up @@ -126,8 +126,8 @@

<smtx:XamlDisplay Margin="0,0,4,4" UniqueKey="chips_38">
<materialDesign:Chip Content="Twitter"
IconBackground="{DynamicResource PrimaryHueDarkBrush}"
IconForeground="{DynamicResource PrimaryHueDarkForegroundBrush}"
IconBackground="{DynamicResource MaterialDesign.Brush.Primary.Dark}"
IconForeground="{DynamicResource MaterialDesign.Brush.Primary.Dark.Foreground}"
Style="{StaticResource MaterialDesignOutlineChip}">
<materialDesign:Chip.Icon>
<materialDesign:PackIcon Kind="Twitter" />
Expand All @@ -140,7 +140,7 @@
<StackPanel Grid.Row="2">
<Rectangle Height="1"
Margin="0,24,0,0"
Fill="{DynamicResource MaterialDesignDivider}" />
Fill="{DynamicResource MaterialDesign.Brush.TextBox.HoverBackground}" />
<TextBlock Style="{StaticResource ChipsHeadline}" Text="Filter Chips" />
</StackPanel>

Expand Down Expand Up @@ -257,7 +257,7 @@
<StackPanel Grid.Row="4">
<Rectangle Height="1"
Margin="0,24,0,0"
Fill="{DynamicResource MaterialDesignDivider}" />
Fill="{DynamicResource MaterialDesign.Brush.TextBox.HoverBackground}" />
<TextBlock Style="{StaticResource ChipsHeadline}" Text="Choice Chips" />
</StackPanel>

Expand Down
Loading
Loading