Merge pull request #148 from irihitech/146-togglebutton-styles

DropDownButton typo
This commit is contained in:
Dong Bin 2023-03-25 23:43:46 +08:00 committed by GitHub
commit e193bfc697
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 16 additions and 14 deletions

View File

@ -45,7 +45,7 @@
Danger Danger
</Button> </Button>
</StackPanel> </StackPanel>
<TextBlock>DropdownButton</TextBlock> <TextBlock>DropDownButton</TextBlock>
<StackPanel Orientation="Horizontal" Spacing="8"> <StackPanel Orientation="Horizontal" Spacing="8">
<DropDownButton Content="Submit"> <DropDownButton Content="Submit">
<DropDownButton.Flyout> <DropDownButton.Flyout>
@ -55,7 +55,7 @@
</MenuFlyout> </MenuFlyout>
</DropDownButton.Flyout> </DropDownButton.Flyout>
</DropDownButton> </DropDownButton>
<DropDownButton Content="Submit" Theme="{DynamicResource SolidDropdownButton}"> <DropDownButton Content="Submit" Theme="{DynamicResource SolidDropDownButton}">
<DropDownButton.Flyout> <DropDownButton.Flyout>
<MenuFlyout Placement="BottomEdgeAlignedRight"> <MenuFlyout Placement="BottomEdgeAlignedRight">
<MenuItem Header="Submit All" /> <MenuItem Header="Submit All" />
@ -63,7 +63,7 @@
</MenuFlyout> </MenuFlyout>
</DropDownButton.Flyout> </DropDownButton.Flyout>
</DropDownButton> </DropDownButton>
<DropDownButton Content="Submit" Theme="{DynamicResource BorderlessDropdownButton}"> <DropDownButton Content="Submit" Theme="{DynamicResource BorderlessDropDownButton}">
<DropDownButton.Flyout> <DropDownButton.Flyout>
<MenuFlyout Placement="BottomEdgeAlignedRight"> <MenuFlyout Placement="BottomEdgeAlignedRight">
<MenuItem Header="Submit All" /> <MenuItem Header="Submit All" />

View File

@ -20,7 +20,7 @@
<Setter Property="Button.HorizontalContentAlignment" Value="Center" /> <Setter Property="Button.HorizontalContentAlignment" Value="Center" />
<Setter Property="Button.VerticalContentAlignment" Value="Center" /> <Setter Property="Button.VerticalContentAlignment" Value="Center" />
<Setter Property="Button.MinHeight" Value="12" /> <Setter Property="Button.MinHeight" Value="12" />
<Setter Property="ToggleButton.Cursor" Value="Hand" /> <Setter Property="Button.Cursor" Value="Hand" />
<Setter Property="Button.Template"> <Setter Property="Button.Template">
<ControlTemplate TargetType="Button"> <ControlTemplate TargetType="Button">
<ContentPresenter <ContentPresenter

View File

@ -18,7 +18,7 @@
<ResourceInclude Source="avares://Semi.Avalonia/Controls/ContextMenu.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Controls/ContextMenu.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Controls/DatePicker.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Controls/DatePicker.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Controls/DateTimePickerShared.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Controls/DateTimePickerShared.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Controls/DropdownButton.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Controls/DropDownButton.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Controls/EmbeddableControlRoot.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Controls/EmbeddableControlRoot.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Controls/Expander.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Controls/Expander.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Controls/FlyoutPresenter.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Controls/FlyoutPresenter.axaml" />

View File

@ -16,6 +16,7 @@
<Setter Property="DropDownButton.HorizontalContentAlignment" Value="Center" /> <Setter Property="DropDownButton.HorizontalContentAlignment" Value="Center" />
<Setter Property="DropDownButton.VerticalContentAlignment" Value="Center" /> <Setter Property="DropDownButton.VerticalContentAlignment" Value="Center" />
<Setter Property="DropDownButton.MinHeight" Value="12" /> <Setter Property="DropDownButton.MinHeight" Value="12" />
<Setter Property="DropDownButton.Cursor" Value="Hand" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="DropDownButton"> <ControlTemplate TargetType="DropDownButton">
<Border <Border
@ -43,7 +44,7 @@
Margin="0,0,8,0" Margin="0,0,8,0"
HorizontalAlignment="Right" HorizontalAlignment="Right"
VerticalAlignment="Center" VerticalAlignment="Center"
Data="{DynamicResource DropdownButtonIconGlyph}" Data="{DynamicResource DropDownButtonIconGlyph}"
Foreground="{TemplateBinding Foreground}" Foreground="{TemplateBinding Foreground}"
IsHitTestVisible="False" IsHitTestVisible="False"
UseLayoutRounding="False" /> UseLayoutRounding="False" />
@ -96,7 +97,7 @@
</Style> </Style>
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="SolidDropdownButton" TargetType="DropDownButton"> <ControlTheme x:Key="SolidDropDownButton" TargetType="DropDownButton">
<Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonSolidForeground}" /> <Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonSolidForeground}" />
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidPrimaryBackground}" /> <Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidPrimaryBackground}" />
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidPrimaryBorderBrush}" /> <Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidPrimaryBorderBrush}" />
@ -109,6 +110,7 @@
<Setter Property="DropDownButton.HorizontalContentAlignment" Value="Center" /> <Setter Property="DropDownButton.HorizontalContentAlignment" Value="Center" />
<Setter Property="DropDownButton.VerticalContentAlignment" Value="Center" /> <Setter Property="DropDownButton.VerticalContentAlignment" Value="Center" />
<Setter Property="DropDownButton.MinHeight" Value="12" /> <Setter Property="DropDownButton.MinHeight" Value="12" />
<Setter Property="DropDownButton.Cursor" Value="Hand" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="DropDownButton"> <ControlTemplate TargetType="DropDownButton">
<Border <Border
@ -136,7 +138,7 @@
Margin="0,0,8,0" Margin="0,0,8,0"
HorizontalAlignment="Right" HorizontalAlignment="Right"
VerticalAlignment="Center" VerticalAlignment="Center"
Data="{DynamicResource DropdownButtonIconGlyph}" Data="{DynamicResource DropDownButtonIconGlyph}"
Foreground="{TemplateBinding Foreground}" Foreground="{TemplateBinding Foreground}"
IsHitTestVisible="False" IsHitTestVisible="False"
UseLayoutRounding="False" /> UseLayoutRounding="False" />
@ -223,7 +225,7 @@
</ControlTheme> </ControlTheme>
<ControlTheme <ControlTheme
x:Key="BorderlessDropdownButton" x:Key="BorderlessDropDownButton"
BasedOn="{StaticResource {x:Type DropDownButton}}" BasedOn="{StaticResource {x:Type DropDownButton}}"
TargetType="DropDownButton"> TargetType="DropDownButton">
<Setter Property="DropDownButton.Background" Value="Transparent" /> <Setter Property="DropDownButton.Background" Value="Transparent" />

View File

@ -15,7 +15,7 @@
<Setter Property="RepeatButton.HorizontalContentAlignment" Value="Center" /> <Setter Property="RepeatButton.HorizontalContentAlignment" Value="Center" />
<Setter Property="RepeatButton.VerticalContentAlignment" Value="Center" /> <Setter Property="RepeatButton.VerticalContentAlignment" Value="Center" />
<Setter Property="RepeatButton.MinHeight" Value="12" /> <Setter Property="RepeatButton.MinHeight" Value="12" />
<Setter Property="ToggleButton.Cursor" Value="Hand" /> <Setter Property="RepeatButton.Cursor" Value="Hand" />
<Setter Property="RepeatButton.Template"> <Setter Property="RepeatButton.Template">
<ControlTemplate TargetType="RepeatButton"> <ControlTemplate TargetType="RepeatButton">
<ContentPresenter <ContentPresenter

View File

@ -15,7 +15,7 @@
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/ComboBox.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/ComboBox.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/DatePicker.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/DatePicker.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/DateTimePickerShared.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/DateTimePickerShared.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/DropdownButton.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/DropDownButton.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/Expander.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/Expander.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/GridSplitter.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/GridSplitter.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/Label.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/Label.axaml" />

View File

@ -1,4 +1,4 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- Add Resources Here --> <!-- Add Resources Here -->
<PathGeometry x:Key="DropdownButtonIconGlyph">M4.08045 7.59809C4.66624 7.01231 5.61599 7.01231 6.20177 7.59809L11.8586 13.2549L17.5155 7.59809C18.1013 7.01231 19.051 7.01231 19.6368 7.59809C20.2226 8.18388 20.2226 9.13363 19.6368 9.71941L12.9193 16.4369C12.3335 17.0227 11.3838 17.0227 10.798 16.4369L4.08045 9.71941C3.49467 9.13363 3.49467 8.18388 4.08045 7.59809Z</PathGeometry> <PathGeometry x:Key="DropDownButtonIconGlyph">M4.08045 7.59809C4.66624 7.01231 5.61599 7.01231 6.20177 7.59809L11.8586 13.2549L17.5155 7.59809C18.1013 7.01231 19.051 7.01231 19.6368 7.59809C20.2226 8.18388 20.2226 9.13363 19.6368 9.71941L12.9193 16.4369C12.3335 17.0227 11.3838 17.0227 10.798 16.4369L4.08045 9.71941C3.49467 9.13363 3.49467 8.18388 4.08045 7.59809Z</PathGeometry>
</ResourceDictionary> </ResourceDictionary>

View File

@ -1,4 +1,4 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- Add Resources Here --> <!-- Add Resources Here -->
<PathGeometry x:Key="DropdownButtonIconGlyph">M4.08045 7.59809C4.66624 7.01231 5.61599 7.01231 6.20177 7.59809L11.8586 13.2549L17.5155 7.59809C18.1013 7.01231 19.051 7.01231 19.6368 7.59809C20.2226 8.18388 20.2226 9.13363 19.6368 9.71941L12.9193 16.4369C12.3335 17.0227 11.3838 17.0227 10.798 16.4369L4.08045 9.71941C3.49467 9.13363 3.49467 8.18388 4.08045 7.59809Z</PathGeometry> <PathGeometry x:Key="DropDownButtonIconGlyph">M4.08045 7.59809C4.66624 7.01231 5.61599 7.01231 6.20177 7.59809L11.8586 13.2549L17.5155 7.59809C18.1013 7.01231 19.051 7.01231 19.6368 7.59809C20.2226 8.18388 20.2226 9.13363 19.6368 9.71941L12.9193 16.4369C12.3335 17.0227 11.3838 17.0227 10.798 16.4369L4.08045 9.71941C3.49467 9.13363 3.49467 8.18388 4.08045 7.59809Z</PathGeometry>
</ResourceDictionary> </ResourceDictionary>

View File

@ -14,7 +14,7 @@
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/ComboBox.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/ComboBox.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/DatePicker.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/DatePicker.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/DateTimePickerShared.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/DateTimePickerShared.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/DropdownButton.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/DropDownButton.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/Expander.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/Expander.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/GridSplitter.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/GridSplitter.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/Label.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/Label.axaml" />