|
|
|
@ -36,50 +36,53 @@ |
|
|
|
<Setter.Value> |
|
|
|
<ControlTemplate TargetType="{x:Type local:SplitButton}"> |
|
|
|
<Grid x:Name="MainGrid" SnapsToDevicePixels="True"> |
|
|
|
<chrome:ButtonChrome x:Name="ControlChrome" RenderEnabled="{TemplateBinding IsEnabled}"/> |
|
|
|
<Grid> |
|
|
|
<Grid.ColumnDefinitions> |
|
|
|
<ColumnDefinition Width="*" /> |
|
|
|
<ColumnDefinition Width="Auto" /> |
|
|
|
</Grid.ColumnDefinitions> |
|
|
|
<Button x:Name="PART_ActionButton" Margin="0" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Padding="{TemplateBinding Padding}" > |
|
|
|
<Button.Template> |
|
|
|
<ControlTemplate TargetType="Button"> |
|
|
|
<ContentPresenter /> |
|
|
|
</ControlTemplate> |
|
|
|
</Button.Template> |
|
|
|
<Grid> |
|
|
|
<chrome:ButtonChrome x:Name="ActionButtonChrome" |
|
|
|
<chrome:ButtonChrome x:Name="ControlChrome" RenderEnabled="{TemplateBinding IsEnabled}"> |
|
|
|
<Grid> |
|
|
|
<Grid.ColumnDefinitions> |
|
|
|
<ColumnDefinition Width="*" /> |
|
|
|
<ColumnDefinition Width="Auto" /> |
|
|
|
</Grid.ColumnDefinitions> |
|
|
|
<Button x:Name="PART_ActionButton" Margin="0" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Padding="{TemplateBinding Padding}" > |
|
|
|
<Button.Template> |
|
|
|
<ControlTemplate TargetType="Button"> |
|
|
|
<ContentPresenter /> |
|
|
|
</ControlTemplate> |
|
|
|
</Button.Template> |
|
|
|
<Grid> |
|
|
|
<chrome:ButtonChrome x:Name="ActionButtonChrome" |
|
|
|
CornerRadius="2.75, 0, 0, 2.75" |
|
|
|
RenderNormal="False" |
|
|
|
RenderEnabled="{TemplateBinding IsEnabled}" |
|
|
|
RenderMouseOver="{Binding IsMouseOver, ElementName=PART_ActionButton}" |
|
|
|
RenderPressed="{Binding IsPressed, ElementName=PART_ActionButton}" /> |
|
|
|
<ContentPresenter Name="ActionButtonContent" Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="true" /> |
|
|
|
</Grid> |
|
|
|
</Button> |
|
|
|
<ToggleButton x:Name="PART_ToggleButton" Grid.Column="1" IsTabStop="False" |
|
|
|
RenderPressed="{Binding IsPressed, ElementName=PART_ActionButton}" > |
|
|
|
<ContentPresenter Name="ActionButtonContent" Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="true" /> |
|
|
|
</chrome:ButtonChrome> |
|
|
|
</Grid> |
|
|
|
</Button> |
|
|
|
<ToggleButton x:Name="PART_ToggleButton" Grid.Column="1" IsTabStop="False" |
|
|
|
IsChecked="{Binding IsOpen, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" |
|
|
|
IsHitTestVisible="{Binding IsOpen, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InverseBoolConverter}}" > |
|
|
|
<ToggleButton.Template> |
|
|
|
<ControlTemplate TargetType="ToggleButton"> |
|
|
|
<ContentPresenter /> |
|
|
|
</ControlTemplate> |
|
|
|
</ToggleButton.Template> |
|
|
|
<Grid> |
|
|
|
<chrome:ButtonChrome x:Name="ToggleButtonChrome" |
|
|
|
<ToggleButton.Template> |
|
|
|
<ControlTemplate TargetType="ToggleButton"> |
|
|
|
<ContentPresenter /> |
|
|
|
</ControlTemplate> |
|
|
|
</ToggleButton.Template> |
|
|
|
<Grid> |
|
|
|
<chrome:ButtonChrome x:Name="ToggleButtonChrome" |
|
|
|
CornerRadius="0, 2.75, 2.75, 0" |
|
|
|
RenderNormal="False" |
|
|
|
RenderChecked="{TemplateBinding IsOpen}" |
|
|
|
RenderEnabled="{TemplateBinding IsEnabled}" |
|
|
|
RenderMouseOver="{Binding IsMouseOver, ElementName=PART_ToggleButton}" |
|
|
|
RenderPressed="{Binding IsPressed, ElementName=PART_ToggleButton}" /> |
|
|
|
<Grid x:Name="arrowGlyph" IsHitTestVisible="False" Margin="4,3,4,3"> |
|
|
|
<Path Width="7" Height="4" Data="M 0,1 C0,1 0,0 0,0 0,0 3,0 3,0 3,0 3,1 3,1 3,1 4,1 4,1 4,1 4,0 4,0 4,0 7,0 7,0 7,0 7,1 7,1 7,1 6,1 6,1 6,1 6,2 6,2 6,2 5,2 5,2 5,2 5,3 5,3 5,3 4,3 4,3 4,3 4,4 4,4 4,4 3,4 3,4 3,4 3,3 3,3 3,3 2,3 2,3 2,3 2,2 2,2 2,2 1,2 1,2 1,2 1,1 1,1 1,1 0,1 0,1 z" Fill="#FF000000"/> |
|
|
|
RenderPressed="{Binding IsPressed, ElementName=PART_ToggleButton}" > |
|
|
|
<Grid x:Name="arrowGlyph" IsHitTestVisible="False" Margin="4,3,4,3"> |
|
|
|
<Path Width="7" Height="4" Data="M 0,1 C0,1 0,0 0,0 0,0 3,0 3,0 3,0 3,1 3,1 3,1 4,1 4,1 4,1 4,0 4,0 4,0 7,0 7,0 7,0 7,1 7,1 7,1 6,1 6,1 6,1 6,2 6,2 6,2 5,2 5,2 5,2 5,3 5,3 5,3 4,3 4,3 4,3 4,4 4,4 4,4 3,4 3,4 3,4 3,3 3,3 3,3 2,3 2,3 2,3 2,2 2,2 2,2 1,2 1,2 1,2 1,1 1,1 1,1 0,1 0,1 z" Fill="#FF000000"/> |
|
|
|
</Grid> |
|
|
|
</chrome:ButtonChrome> |
|
|
|
</Grid> |
|
|
|
</Grid> |
|
|
|
</ToggleButton> |
|
|
|
</Grid> |
|
|
|
</ToggleButton> |
|
|
|
</Grid> |
|
|
|
</chrome:ButtonChrome> |
|
|
|
|
|
|
|
<Popup x:Name="PART_Popup" |
|
|
|
HorizontalOffset="1" |
|
|
|
|