|
|
@ -13,6 +13,7 @@ |
|
|
|
|
|
|
|
|
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" /> |
|
|
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" /> |
|
|
<converters:InverseBoolConverter x:Key="InverseBoolConverter" /> |
|
|
<converters:InverseBoolConverter x:Key="InverseBoolConverter" /> |
|
|
|
|
|
<converters:ExpandableObjectMarginConverter x:Key="ExpandableObjectMarginConverter" /> |
|
|
<pgConverters:ValueSourceToImagePathConverter x:Key="ValueSourceToImagePathConverter" /> |
|
|
<pgConverters:ValueSourceToImagePathConverter x:Key="ValueSourceToImagePathConverter" /> |
|
|
<pgConverters:ValueSourceToToolTipConverter x:Key="ValueSourceToToolTipConverter" /> |
|
|
<pgConverters:ValueSourceToToolTipConverter x:Key="ValueSourceToToolTipConverter" /> |
|
|
|
|
|
|
|
|
@ -299,20 +300,26 @@ |
|
|
<Border BorderThickness="0.5" BorderBrush="#FFF0F0F0" x:Name="PART_Name"> |
|
|
<Border BorderThickness="0.5" BorderBrush="#FFF0F0F0" x:Name="PART_Name"> |
|
|
<Grid Margin="2,2,2,2"> |
|
|
<Grid Margin="2,2,2,2"> |
|
|
<Grid.ColumnDefinitions> |
|
|
<Grid.ColumnDefinitions> |
|
|
<ColumnDefinition Width="15" /> |
|
|
|
|
|
<ColumnDefinition Width="*" /> |
|
|
<ColumnDefinition Width="*" /> |
|
|
<ColumnDefinition Width="Auto" /> |
|
|
<ColumnDefinition Width="Auto" /> |
|
|
</Grid.ColumnDefinitions> |
|
|
</Grid.ColumnDefinitions> |
|
|
|
|
|
|
|
|
<Border Grid.Column="0" > |
|
|
<Grid Margin="{Binding Level, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ExpandableObjectMarginConverter}}"> |
|
|
<ToggleButton Template="{StaticResource ExpanderToggleButton}" OverridesDefaultStyle="True" |
|
|
<Grid.ColumnDefinitions> |
|
|
|
|
|
<ColumnDefinition Width="15" /> |
|
|
|
|
|
<ColumnDefinition Width="*" /> |
|
|
|
|
|
</Grid.ColumnDefinitions> |
|
|
|
|
|
|
|
|
|
|
|
<Border Grid.Column="0" > |
|
|
|
|
|
<ToggleButton Template="{StaticResource ExpanderToggleButton}" OverridesDefaultStyle="True" |
|
|
IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" |
|
|
IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" |
|
|
Visibility="{Binding HasChildProperties, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}"/> |
|
|
Visibility="{Binding HasChildProperties, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}"/> |
|
|
</Border> |
|
|
</Border> |
|
|
|
|
|
|
|
|
<TextBlock Grid.Column="1" Text="{Binding DisplayName, RelativeSource={RelativeSource TemplatedParent}}" HorizontalAlignment="Stretch" TextTrimming="CharacterEllipsis"/> |
|
|
<TextBlock Grid.Column="1" Text="{Binding DisplayName, RelativeSource={RelativeSource TemplatedParent}}" HorizontalAlignment="Stretch" TextTrimming="CharacterEllipsis"/> |
|
|
|
|
|
</Grid> |
|
|
|
|
|
|
|
|
<Grid Grid.Column="2" HorizontalAlignment="Right" Margin="5,0,5,0" Visibility="{Binding ShowAdvancedOptions, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:PropertyGrid}, Converter={StaticResource BooleanToVisibilityConverter}}" |
|
|
<Grid Grid.Column="1" HorizontalAlignment="Right" Margin="5,0,5,0" Visibility="{Binding ShowAdvancedOptions, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:PropertyGrid}, Converter={StaticResource BooleanToVisibilityConverter}}" |
|
|
utilities:ContextMenuUtilities.OpenOnMouseLeftButtonClick="True" |
|
|
utilities:ContextMenuUtilities.OpenOnMouseLeftButtonClick="True" |
|
|
ContextMenu="{Binding AdvancedOptionsMenu, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:PropertyGrid}}" > |
|
|
ContextMenu="{Binding AdvancedOptionsMenu, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:PropertyGrid}}" > |
|
|
|
|
|
|
|
|
@ -328,7 +335,7 @@ |
|
|
</Border> |
|
|
</Border> |
|
|
|
|
|
|
|
|
<Expander x:Name="_propertyExpander" Grid.ColumnSpan="2" Grid.Row="1" IsExpanded="{TemplateBinding IsExpanded}" Style="{StaticResource PropertyExpanderStyle}" IsEnabled="True"> |
|
|
<Expander x:Name="_propertyExpander" Grid.ColumnSpan="2" Grid.Row="1" IsExpanded="{TemplateBinding IsExpanded}" Style="{StaticResource PropertyExpanderStyle}" IsEnabled="True"> |
|
|
<ItemsControl ItemsSource="{Binding Properties, RelativeSource={RelativeSource TemplatedParent}}" IsTabStop="False" Focusable="False" Margin="15,0,0,0" > |
|
|
<ItemsControl ItemsSource="{Binding Properties, RelativeSource={RelativeSource TemplatedParent}}" IsTabStop="False" Focusable="False" > |
|
|
<ItemsControl.ItemsPanel> |
|
|
<ItemsControl.ItemsPanel> |
|
|
<ItemsPanelTemplate> |
|
|
<ItemsPanelTemplate> |
|
|
<VirtualizingStackPanel /> |
|
|
<VirtualizingStackPanel /> |
|
|
@ -364,72 +371,6 @@ |
|
|
</Setter> |
|
|
</Setter> |
|
|
</Style> |
|
|
</Style> |
|
|
|
|
|
|
|
|
<!--<Style TargetType="{x:Type local:PropertyItem}"> |
|
|
|
|
|
<Setter Property="BorderBrush" Value="#FFF0F0F0" /> |
|
|
|
|
|
<Setter Property="BorderThickness" Value="1" /> |
|
|
|
|
|
<Setter Property="Focusable" Value="True"/> |
|
|
|
|
|
<Setter Property="IsTabStop" Value="False" /> |
|
|
|
|
|
<Setter Property="Template"> |
|
|
|
|
|
<Setter.Value> |
|
|
|
|
|
<ControlTemplate TargetType="{x:Type local:PropertyItem}"> |
|
|
|
|
|
<Border Background="White" ContextMenu="{Binding AdvancedOptionsMenu, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:PropertyGrid}}" ContextMenuService.Placement="Bottom"> |
|
|
|
|
|
<Grid VerticalAlignment="Center" HorizontalAlignment="Stretch"> |
|
|
|
|
|
<Grid.ColumnDefinitions> |
|
|
|
|
|
<ColumnDefinition Width="{Binding NameColumnWidth, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PropertyGrid}}}"/> |
|
|
|
|
|
<ColumnDefinition Width="*"/> |
|
|
|
|
|
</Grid.ColumnDefinitions> |
|
|
|
|
|
|
|
|
|
|
|
<Border BorderThickness="0.5" BorderBrush="#FFF0F0F0" x:Name="PART_Name"> |
|
|
|
|
|
<Grid Margin="7,2,2,2"> |
|
|
|
|
|
<Grid.ColumnDefinitions> |
|
|
|
|
|
<ColumnDefinition Width="*" /> |
|
|
|
|
|
<ColumnDefinition Width="Auto" /> |
|
|
|
|
|
</Grid.ColumnDefinitions> |
|
|
|
|
|
|
|
|
|
|
|
<TextBlock Text="{Binding DisplayName, RelativeSource={RelativeSource TemplatedParent}}" HorizontalAlignment="Stretch" TextTrimming="CharacterEllipsis"/> |
|
|
|
|
|
|
|
|
|
|
|
<Grid Grid.Column="1" HorizontalAlignment="Right" Margin="5,0,5,0" Visibility="{Binding ShowAdvancedOptions, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:PropertyGrid}, Converter={StaticResource BooleanToVisibilityConverter}}" |
|
|
|
|
|
utilities:ContextMenuUtilities.OpenOnMouseLeftButtonClick="True" |
|
|
|
|
|
ContextMenu="{Binding AdvancedOptionsMenu, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:PropertyGrid}}" > |
|
|
|
|
|
|
|
|
|
|
|
<Image x:Name="_optionsImage" Width="11" Height="11" |
|
|
|
|
|
Source="{Binding ValueSource, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ValueSourceToImagePathConverter}}" |
|
|
|
|
|
ToolTip="{Binding ValueSource, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ValueSourceToToolTipConverter}}" /> |
|
|
|
|
|
</Grid> |
|
|
|
|
|
</Grid> |
|
|
|
|
|
</Border> |
|
|
|
|
|
|
|
|
|
|
|
<Border BorderThickness="0.5" BorderBrush="#FFF0F0F0" x:Name="PART_Editor" Grid.Column="1" Background="Transparent"> |
|
|
|
|
|
<ContentControl Content="{TemplateBinding Editor}" VerticalAlignment="Center" Focusable="False" IsTabStop="False" /> |
|
|
|
|
|
</Border> |
|
|
|
|
|
</Grid> |
|
|
|
|
|
</Border> |
|
|
|
|
|
<ControlTemplate.Triggers> |
|
|
|
|
|
<DataTrigger Binding="{Binding IsDataBound, RelativeSource={RelativeSource Self}}" Value="True"> |
|
|
|
|
|
<Setter TargetName="_optionsImage" Property="Source" Value="/WPFToolkit.Extended;component/PropertyGrid/Images/Database11.png" /> |
|
|
|
|
|
<Setter TargetName="_optionsImage" Property="ToolTip" Value="Databinding" /> |
|
|
|
|
|
</DataTrigger> |
|
|
|
|
|
<DataTrigger Binding="{Binding IsDynamicResource, RelativeSource={RelativeSource Self}}" Value="True"> |
|
|
|
|
|
<Setter TargetName="_optionsImage" Property="Source" Value="/WPFToolkit.Extended;component/PropertyGrid/Images/Resource11.png" /> |
|
|
|
|
|
<Setter TargetName="_optionsImage" Property="ToolTip" Value="Resource" /> |
|
|
|
|
|
</DataTrigger> |
|
|
|
|
|
<DataTrigger Binding="{Binding HasResourceApplied, RelativeSource={RelativeSource Self}}" Value="True"> |
|
|
|
|
|
<Setter TargetName="_optionsImage" Property="Source" Value="/WPFToolkit.Extended;component/PropertyGrid/Images/Resource11.png" /> |
|
|
|
|
|
<Setter TargetName="_optionsImage" Property="ToolTip" Value="Resource" /> |
|
|
|
|
|
</DataTrigger> |
|
|
|
|
|
<Trigger Property="IsMouseOver" Value="True"> |
|
|
|
|
|
<Setter TargetName="PART_Name" Property="Background" Value="#CED4DF" /> |
|
|
|
|
|
</Trigger> |
|
|
|
|
|
<Trigger Property="IsSelected" Value="True"> |
|
|
|
|
|
<Setter TargetName="PART_Name" Property="Background" Value="#43577B" /> |
|
|
|
|
|
<Setter TargetName="PART_Name" Property="TextElement.Foreground" Value="White" /> |
|
|
|
|
|
</Trigger> |
|
|
|
|
|
</ControlTemplate.Triggers> |
|
|
|
|
|
</ControlTemplate> |
|
|
|
|
|
</Setter.Value> |
|
|
|
|
|
</Setter> |
|
|
|
|
|
</Style>--> |
|
|
|
|
|
|
|
|
|
|
|
<Style TargetType="{x:Type local:PropertyGrid}"> |
|
|
<Style TargetType="{x:Type local:PropertyGrid}"> |
|
|
<Setter Property="AdvancedOptionsMenu" Value="{StaticResource DefaultAdvancedOptionsMenu}" /> |
|
|
<Setter Property="AdvancedOptionsMenu" Value="{StaticResource DefaultAdvancedOptionsMenu}" /> |
|
|
<Setter Property="Background" Value="#CED4DF" /> |
|
|
<Setter Property="Background" Value="#CED4DF" /> |
|
|
|