feat: add separator support, fix various issues.
This commit is contained in:
@@ -44,6 +44,7 @@
|
||||
Margin="8,0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource SemiColorText2}"
|
||||
Content="{TemplateBinding Header}"
|
||||
ContentTemplate="{TemplateBinding HeaderTemplate}"
|
||||
DockPanel.Dock="Left"
|
||||
@@ -94,6 +95,7 @@
|
||||
Margin="8,0"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Top"
|
||||
Foreground="{DynamicResource SemiColorText2}"
|
||||
Content="{TemplateBinding Header}"
|
||||
ContentTemplate="{TemplateBinding HeaderTemplate}"
|
||||
DockPanel.Dock="Top"
|
||||
@@ -112,7 +114,7 @@
|
||||
IsOpen="{Binding #button.IsChecked, Mode=TwoWay}"
|
||||
Placement="{TemplateBinding PopupPlacement}"
|
||||
PlacementTarget="{Binding #button}">
|
||||
<Border Theme="{DynamicResource CardBorder}">
|
||||
<Border Theme="{DynamicResource CardBorder}" Padding="2">
|
||||
<StackPanel Name="{x:Static u:ToolBar.PART_OverflowPanel}" />
|
||||
</Border>
|
||||
</Popup>
|
||||
@@ -130,4 +132,23 @@
|
||||
<Setter Property="IsVisible" Value="True"></Setter>
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme x:Key="{x:Type u:ToolBarSeparator}" TargetType="u:ToolBarSeparator">
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate>
|
||||
<Rectangle Name="PART_Rect" Margin="4 " Fill="{DynamicResource SemiColorBorder}"></Rectangle>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
<Style Selector="^ /template/ Rectangle#PART_Rect">
|
||||
<Setter Property="Width" Value="1"/>
|
||||
<Setter Property="VerticalAlignment" Value="Stretch"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||
</Style>
|
||||
<Style Selector="^:vertical /template/ Rectangle#PART_Rect">
|
||||
<Setter Property="Height" Value="1"></Setter>
|
||||
<Setter Property="Width" Value="{x:Static x:Double.NaN}" />
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
||||
<Setter Property="VerticalAlignment" Value="Center"></Setter>
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
|
||||
Reference in New Issue
Block a user