Skip to content

Commit

Permalink
[TokenView] Fix crash due to unknown brushes (#423)
Browse files Browse the repository at this point in the history
* Using the correct WinUI brushes

* Bump version number

* Remove unused paramaters from sample
  • Loading branch information
niels9001 authored Apr 17, 2023
1 parent 2eaaa48 commit c55b3a8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
4 changes: 1 addition & 3 deletions components/TokenView/samples/TokenViewBasicSample.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
mc:Ignorable="d">

<Grid>
<labs:TokenView AllowDrop="True"
CanReorderItems="True"
IsWrapped="{x:Bind IsWrapped, Mode=OneWay}"
<labs:TokenView IsWrapped="{x:Bind IsWrapped, Mode=OneWay}"
SelectedIndex="2"
SelectionMode="{x:Bind local:TokenViewBasicSample.ConvertStringToListViewSelectionMode(SelectionMode), Mode=OneWay}">
<labs:TokenItem Content="All" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<ToolkitComponentName>TokenView</ToolkitComponentName>
<Description>This package contains TokenView.</Description>
<Version>0.0.4</Version>
<Version>0.0.5</Version>

<!-- Rns suffix is required for namespaces shared across projects. See https://github.com/CommunityToolkit/Labs-Windows/issues/152 -->
<RootNamespace>CommunityToolkit.Labs.WinUI.TokenViewRns</RootNamespace>
Expand Down
10 changes: 5 additions & 5 deletions components/TokenView/src/TokenItem/TokenItem.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@
Padding="2"
CornerRadius="99"
IsTabStop="False"
Style="{StaticResource SubtleButtonStyle}"
Style="{StaticResource SubtleAccentButtonStyle}"
Visibility="Collapsed">
<FontIcon FontSize="12"
Glyph="&#xE10A;" />
Expand All @@ -307,7 +307,7 @@

<Style x:Key="SubtleAccentButtonStyle"
TargetType="Button">
<Setter Property="Background" Value="{ThemeResource SubtleButtonBackground}" />
<Setter Property="Background" Value="{ThemeResource SubtleFillColorTransparent}" />
<Setter Property="BackgroundSizing" Value="InnerBorderEdge" />
<Setter Property="Foreground" Value="{ThemeResource TextOnAccentFillColorPrimaryBrush}" />
<Setter Property="BorderThickness" Value="0" />
Expand Down Expand Up @@ -349,7 +349,7 @@
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0"
Value="{ThemeResource SubtleButtonBackgroundPointerOver}" />
Value="{ThemeResource SubtleFillColorSecondary}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
Storyboard.TargetProperty="Foreground">
Expand All @@ -367,7 +367,7 @@
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0"
Value="{ThemeResource SubtleButtonBackgroundPressed}" />
Value="{ThemeResource SubtleFillColorTertiary}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
Storyboard.TargetProperty="Foreground">
Expand All @@ -385,7 +385,7 @@
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0"
Value="{ThemeResource SubtleButtonBackgroundDisabled}" />
Value="{ThemeResource ControlFillColorDisabled}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
Storyboard.TargetProperty="Foreground">
Expand Down

0 comments on commit c55b3a8

Please sign in to comment.