Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Kinnara authored Nov 4, 2023
1 parent 1e23c5a commit 143d110
Show file tree
Hide file tree
Showing 9 changed files with 128 additions and 87 deletions.
6 changes: 3 additions & 3 deletions ModernWpf.Controls/DropDownButton/DropDownButton.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />

<ui:FontIconFallback
x:Name="ChevronTextBlock"
x:Name="ChevronIcon"
Grid.Column="1"
FontFamily="{DynamicResource SymbolThemeFontFamily}"
FontSize="8"
Expand All @@ -74,13 +74,13 @@
<Setter TargetName="RootBorder" Property="Background" Value="{DynamicResource ButtonBackgroundPressed}" />
<Setter TargetName="RootBorder" Property="BorderBrush" Value="{DynamicResource ButtonBorderBrushPressed}" />
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource ButtonForegroundPressed}" />
<Setter TargetName="ChevronTextBlock" Property="Foreground" Value="{DynamicResource DropDownButtonForegroundSecondaryPressed}" />
<Setter TargetName="ChevronIcon" Property="Foreground" Value="{DynamicResource DropDownButtonForegroundSecondaryPressed}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="RootBorder" Property="Background" Value="{DynamicResource ButtonBackgroundDisabled}" />
<Setter TargetName="RootBorder" Property="BorderBrush" Value="{DynamicResource ButtonBorderBrushDisabled}" />
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource ButtonForegroundDisabled}" />
<Setter TargetName="ChevronTextBlock" Property="Foreground" Value="{DynamicResource ButtonForegroundDisabled}" />
<Setter TargetName="ChevronIcon" Property="Foreground" Value="{DynamicResource ButtonForegroundDisabled}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
Expand Down
26 changes: 23 additions & 3 deletions ModernWpf.Controls/NavigationView/NavigationView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,19 @@
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpandCollapseChevron" Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}" />
</ObjectAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="ExpandCollapseChevronRotateTransform" Storyboard.TargetProperty="Angle">
<DiscreteDoubleKeyFrame KeyTime="0" Value="180" />
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="ChevronVisibleClosed">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpandCollapseChevron" Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}" />
</ObjectAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="ExpandCollapseChevronRotateTransform" Storyboard.TargetProperty="Angle">
<DiscreteDoubleKeyFrame KeyTime="0" Value="0" />
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
Expand Down Expand Up @@ -302,7 +308,10 @@
Margin="{DynamicResource NavigationViewItemExpandChevronMargin}"
Background="Transparent">
<ui:FontIconFallback
Width="12"
Height="12"
RenderTransformOrigin="0.5, 0.5"
x:Name="ExpandCollapseChevronIcon"
Foreground="{DynamicResource NavigationViewItemForeground}"
FontSize="{DynamicResource NavigationViewItemExpandedGlyphFontSize}"
Data="{DynamicResource NavigationViewItemExpandedPath}"
Expand Down Expand Up @@ -516,13 +525,19 @@
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpandCollapseChevron" Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}" />
</ObjectAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="ExpandCollapseChevronRotateTransform" Storyboard.TargetProperty="Angle">
<DiscreteDoubleKeyFrame KeyTime="0" Value="180" />
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="ChevronVisibleClosed">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpandCollapseChevron" Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}" />
</ObjectAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="ExpandCollapseChevronRotateTransform" Storyboard.TargetProperty="Angle">
<DiscreteDoubleKeyFrame KeyTime="0" Value="0" />
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
Expand Down Expand Up @@ -569,15 +584,18 @@
Margin="{DynamicResource TopNavigationViewItemExpandChevronMargin}"
Background="Transparent">
<ui:FontIconFallback
Width="12"
Height="12"
Foreground="{DynamicResource NavigationViewItemForeground}"
RenderTransformOrigin="0.5, 0.5"
x:Name="ExpandCollapseChevronIcon"
FontSize="{DynamicResource NavigationViewItemExpandedGlyphFontSize}"
Data="{DynamicResource NavigationViewItemExpandedPath}"
FontFamily="{DynamicResource SymbolThemeFontFamily}"
VerticalAlignment="Center"
HorizontalAlignment="Center">
<ui:FontIconFallback.RenderTransform>
<RotateTransform x:Name="ExpandCollapseChevronRotateTransform"/>
<RotateTransform x:Name="ExpandCollapseChevronRotateTransform" Angle="0"/>
</ui:FontIconFallback.RenderTransform>
</ui:FontIconFallback>
</Grid>
Expand Down Expand Up @@ -776,15 +794,17 @@
<Border Padding="{DynamicResource TopNavigationViewItemOnOverflowExpandChevronPadding}">
<ui:FontIconFallback
Foreground="{DynamicResource NavigationViewItemForeground}"
Width="12" Height="12"
Width="12"
Height="12"
RenderTransformOrigin="0.5, 0.5"
x:Name="ExpandCollapseChevronIcon"
FontSize="{DynamicResource NavigationViewItemExpandedGlyphFontSize}"
Data="{DynamicResource NavigationViewItemExpandedPath}"
FontFamily="{DynamicResource SymbolThemeFontFamily}"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<ui:FontIconFallback.RenderTransform>
<RotateTransform x:Name="ExpandCollapseChevronRotateTransform"/>
<RotateTransform x:Name="ExpandCollapseChevronRotateTransform" Angle="0"/>
</ui:FontIconFallback.RenderTransform>
</ui:FontIconFallback>
</Border>
Expand Down
8 changes: 5 additions & 3 deletions ModernWpf/Styles/AutoSuggestBox.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
</ResourceDictionary.MergedDictionaries>

<Thickness x:Key="AutoSuggestBoxTopHeaderMargin">0,0,0,8</Thickness>
<Thickness x:Key="AutoSuggestBoxInnerButtonMargin">0,4,0,4</Thickness>
<Thickness x:Key="AutoSuggestBoxInnerButtonMargin">0,3</Thickness>
<Thickness x:Key="AutoSuggestBoxQueryButtonPadding">3,2</Thickness>
<sys:Double x:Key="AutoSuggestBoxRightButtonMargin">4</sys:Double>

<Style TargetType="TextBox" x:Key="AutoSuggestBoxTextBoxStyle">
Expand Down Expand Up @@ -224,7 +225,7 @@
Grid.Column="1"
Visibility="Collapsed"
FontSize="{TemplateBinding FontSize}"
Width="30"
Width="32"
VerticalAlignment="Stretch"
primitives:TextBoxHelper.IsDeleteButton="True" />
<Button
Expand All @@ -237,7 +238,8 @@
Focusable="False"
Grid.Column="2"
FontSize="{TemplateBinding FontSize}"
Width="30"
Width="32"
Height="28"
VerticalAlignment="Stretch" />
<ContentPresenter
x:Name="DescriptionPresenter"
Expand Down
Loading

0 comments on commit 143d110

Please sign in to comment.