8 changed files with 92 additions and 37 deletions
@ -1,14 +1,50 @@ |
|||||
<UserControl x:Class="Microsoft.Windows.Controls.PropertyGrid.Editors.CollectionEditor" |
<UserControl x:Class="Microsoft.Windows.Controls.PropertyGrid.Editors.CollectionEditor" |
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||
<Grid> |
xmlns:chrome="clr-namespace:Microsoft.Windows.Controls.Chromes" > |
||||
<Grid.ColumnDefinitions> |
|
||||
<ColumnDefinition Width="*" /> |
<UserControl.Resources> |
||||
<ColumnDefinition Width="Auto" /> |
<Style x:Key="ButtonStyle" TargetType="Button"> |
||||
</Grid.ColumnDefinitions> |
<Setter Property="Background" Value="White"/> |
||||
<TextBlock Text="(Collection)" VerticalAlignment="Center" /> |
<Setter Property="BorderThickness" Value="0" /> |
||||
<Button x:Name="_editorButton" Grid.Column="1" |
<Setter Property="Padding" Value="2,0,0,0" /> |
||||
Content=" ... " |
<Setter Property="HorizontalContentAlignment" Value="Left" /> |
||||
Click="Button_Click"/> |
<Setter Property="VerticalContentAlignment" Value="Center" /> |
||||
</Grid> |
<Setter Property="Template"> |
||||
|
<Setter.Value> |
||||
|
<ControlTemplate TargetType="Button"> |
||||
|
<Grid SnapsToDevicePixels="True"> |
||||
|
|
||||
|
<Grid> |
||||
|
<Grid.ColumnDefinitions> |
||||
|
<ColumnDefinition Width="*"/> |
||||
|
<ColumnDefinition Width="Auto"/> |
||||
|
</Grid.ColumnDefinitions> |
||||
|
|
||||
|
<Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="True"> |
||||
|
<ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" |
||||
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/> |
||||
|
</Border> |
||||
|
|
||||
|
<chrome:ButtonChrome x:Name="ToggleButtonChrome" Grid.Column="1" |
||||
|
CornerRadius="0,2.75,2.75,0" |
||||
|
RenderEnabled="{Binding IsEnabled, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=UserControl}}" |
||||
|
RenderMouseOver="{TemplateBinding IsMouseOver}" > |
||||
|
|
||||
|
<Grid x:Name="arrowGlyph" IsHitTestVisible="False" Grid.Column="1" Margin="5"> |
||||
|
<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> |
||||
|
</ControlTemplate> |
||||
|
</Setter.Value> |
||||
|
</Setter> |
||||
|
</Style> |
||||
|
</UserControl.Resources> |
||||
|
|
||||
|
<Button Grid.Column="1" IsTabStop="True" MinHeight="22" SnapsToDevicePixels="True" |
||||
|
Content="(Collection)" |
||||
|
Style="{StaticResource ButtonStyle}" Click="Button_Click" /> |
||||
</UserControl> |
</UserControl> |
||||
|
|||||
Loading…
Reference in new issue