25 changed files with 895 additions and 108 deletions
|
Before Width: | Height: | Size: 601 B After Width: | Height: | Size: 601 B |
@ -0,0 +1,58 @@ |
|||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:local="clr-namespace:Microsoft.Windows.Controls" |
|||
xmlns:chrome="clr-namespace:Microsoft.Windows.Controls.Chromes" |
|||
xmlns:coreConverters="clr-namespace:Microsoft.Windows.Controls.Core.Converters"> |
|||
|
|||
<Style TargetType="{x:Type local:CheckListBox}"> |
|||
<Setter Property="BorderBrush" Value="#FF707070" /> |
|||
<Setter Property="BorderThickness" Value="1" /> |
|||
<Setter Property="KeyboardNavigation.TabNavigation" Value="Once"/> |
|||
<Setter Property="Template"> |
|||
<Setter.Value> |
|||
<ControlTemplate TargetType="{x:Type local:CheckListBox}"> |
|||
<Border Background="{TemplateBinding Background}" |
|||
BorderBrush="{TemplateBinding BorderBrush}" |
|||
BorderThickness="{TemplateBinding BorderThickness}"> |
|||
<ScrollViewer Padding="{TemplateBinding Padding}" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"> |
|||
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /> |
|||
</ScrollViewer> |
|||
</Border> |
|||
</ControlTemplate> |
|||
</Setter.Value> |
|||
</Setter> |
|||
</Style> |
|||
|
|||
<Style TargetType="{x:Type local:CheckListBoxItem}" > |
|||
<Setter Property="Template"> |
|||
<Setter.Value> |
|||
<ControlTemplate TargetType="{x:Type local:CheckListBoxItem}"> |
|||
<Border x:Name="_background" |
|||
Background="{TemplateBinding Background}" |
|||
BorderBrush="{TemplateBinding BorderBrush}" |
|||
BorderThickness="{TemplateBinding BorderThickness}"> |
|||
<Grid> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="Auto"/> |
|||
<ColumnDefinition Width="*" /> |
|||
</Grid.ColumnDefinitions> |
|||
<CheckBox Name="PART_CheckBox" IsChecked="{Binding IsChecked, RelativeSource={RelativeSource TemplatedParent}}" |
|||
VerticalAlignment="Center" Focusable="False" Margin="3,1,5,1"/> |
|||
<Border Grid.Column="1"> |
|||
<ContentPresenter Margin="2" ContentSource="Content" /> |
|||
</Border> |
|||
</Grid> |
|||
</Border> |
|||
|
|||
<ControlTemplate.Triggers> |
|||
<Trigger Property="IsMouseOver" Value="true"> |
|||
<Setter TargetName="_background" Property="Background" Value="Blue"/> |
|||
<Setter Property="Foreground" Value="White"/> |
|||
</Trigger> |
|||
</ControlTemplate.Triggers> |
|||
</ControlTemplate> |
|||
</Setter.Value> |
|||
</Setter> |
|||
</Style> |
|||
|
|||
</ResourceDictionary> |
|||
|
After Width: | Height: | Size: 682 B |
@ -0,0 +1,126 @@ |
|||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:local="clr-namespace:Microsoft.Windows.Controls" |
|||
xmlns:coreConverters="clr-namespace:Microsoft.Windows.Controls.Core.Converters" |
|||
xmlns:chrome="clr-namespace:Microsoft.Windows.Controls.Chromes" |
|||
xmlns:propertyGrid="clr-namespace:Microsoft.Windows.Controls.PropertyGrid"> |
|||
|
|||
<coreConverters:InverseBoolConverter x:Key="InverseBoolConverter" /> |
|||
<coreConverters:ObjectTypeToNameConverter x:Key="ObjectTypeToNameConverter" /> |
|||
|
|||
<Style x:Key="CollectionEditorButtonStyle" TargetType="{x:Type Button}"> |
|||
<Style.Triggers> |
|||
<Trigger Property="IsEnabled" Value="false"> |
|||
<Setter Property="Opacity" Value="0.6" /> |
|||
</Trigger> |
|||
</Style.Triggers> |
|||
<Setter Property="HorizontalContentAlignment" Value="Center" /> |
|||
<Setter Property="VerticalContentAlignment" Value="Center" /> |
|||
<Setter Property="Height" Value="26" /> |
|||
<Setter Property="Width" Value="26" /> |
|||
</Style> |
|||
|
|||
<Style TargetType="{x:Type local:CollectionEditor}"> |
|||
<Setter Property="Template"> |
|||
<Setter.Value> |
|||
<ControlTemplate TargetType="{x:Type local:CollectionEditor}"> |
|||
<Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"> |
|||
<Grid> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="*" /> |
|||
<ColumnDefinition Width="1.5*" /> |
|||
</Grid.ColumnDefinitions> |
|||
<Grid> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition /> |
|||
<ColumnDefinition Width="Auto" /> |
|||
<ColumnDefinition Width="Auto" /> |
|||
</Grid.ColumnDefinitions> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition /> |
|||
</Grid.RowDefinitions> |
|||
<TextBlock Margin="0,0,0,5" Text="Select type:" /> |
|||
<ComboBox x:Name="_newItemTypes" Grid.Row="1" Margin="0,0,0,3" HorizontalAlignment="Stretch" |
|||
ItemsSource="{Binding NewItemTypes, RelativeSource={RelativeSource TemplatedParent}}" |
|||
DisplayMemberPath="Name" |
|||
SelectedIndex="0"/> |
|||
<Button Margin="3,0,0,3" Grid.Row="1" Grid.Column="1" Padding="5,0" Content="Add" |
|||
Command="New" CommandParameter="{Binding SelectedItem, ElementName=_newItemTypes}" /> |
|||
<ListBox x:Name="_itemsListBox" Grid.Row="2" Grid.ColumnSpan="2" |
|||
ItemsSource="{Binding Items, RelativeSource={RelativeSource TemplatedParent}}" |
|||
SelectedItem="{Binding SelectedItem, RelativeSource={RelativeSource TemplatedParent}}" |
|||
SelectedIndex="0"> |
|||
<ListBox.ItemTemplate> |
|||
<DataTemplate> |
|||
<TextBlock Text="{Binding Converter={StaticResource ObjectTypeToNameConverter}}" /> |
|||
</DataTemplate> |
|||
</ListBox.ItemTemplate> |
|||
</ListBox> |
|||
<StackPanel Margin="7,2,0,0" VerticalAlignment="Top" Grid.Column="2" Grid.Row="2"> |
|||
<Button Style="{StaticResource CollectionEditorButtonStyle}" |
|||
Command="ComponentCommands.MoveUp" CommandParameter="{Binding SelectedItem, ElementName=_itemsListBox}"> |
|||
<Path Fill="#FF404040" Data="F0 M 6,0 L 12,7 8,7 8,12 4,12 4,7 0,7 Z" /> |
|||
</Button> |
|||
<Button Margin="0,1,0,0" Style="{StaticResource CollectionEditorButtonStyle}" |
|||
Command="ComponentCommands.MoveDown" CommandParameter="{Binding SelectedItem, ElementName=_itemsListBox}"> |
|||
<Path Fill="#FF404040" Data="F0 M 4,0 L 8,0 8,5 12,5 6,12 0,5 4,5 Z" /> |
|||
</Button> |
|||
<Button Margin="0,7,0,0" Style="{StaticResource CollectionEditorButtonStyle}" |
|||
Command="Delete" CommandParameter="{Binding SelectedItem, ElementName=_itemsListBox}"> |
|||
<Image Stretch="None" Height="16" Width="16" Margin="1" Source="/WPFToolkit.Extended;component/CollectionEditors/Images/Delete16.png" /> |
|||
</Button> |
|||
</StackPanel> |
|||
</Grid> |
|||
<Grid Column="1" Margin="20,0,0,0"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition /> |
|||
</Grid.RowDefinitions> |
|||
<TextBlock Grid.Column="1" Text="Properties:" /> |
|||
<propertyGrid:PropertyGrid Grid.Row="1" Grid.Column="1" Margin="0,5,0,0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" |
|||
SelectedObject="{Binding SelectedItem, RelativeSource={RelativeSource TemplatedParent}}"/> |
|||
</Grid> |
|||
</Grid> |
|||
</Border> |
|||
</ControlTemplate> |
|||
</Setter.Value> |
|||
</Setter> |
|||
</Style> |
|||
|
|||
|
|||
<Style TargetType="{x:Type local:PrimitiveTypeCollectionEditor}"> |
|||
<Setter Property="BorderBrush"> |
|||
<Setter.Value> |
|||
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> |
|||
<GradientStop Color="#FFA3AEB9" Offset="0" /> |
|||
<GradientStop Color="#FF8399A9" Offset="0.375" /> |
|||
<GradientStop Color="#FF718597" Offset="0.375" /> |
|||
<GradientStop Color="#FF617584" Offset="1" /> |
|||
</LinearGradientBrush> |
|||
</Setter.Value> |
|||
</Setter> |
|||
<Setter Property="Background" Value="Transparent" /> |
|||
<Setter Property="BorderThickness" Value="1,1,0,1" /> |
|||
<Setter Property="Focusable" Value="False" /> |
|||
<Setter Property="Padding" Value="2,0,0,0" /> |
|||
<Setter Property="VerticalContentAlignment" Value="Center" /> |
|||
<Setter Property="Template"> |
|||
<Setter.Value> |
|||
<ControlTemplate TargetType="{x:Type local:PrimitiveTypeCollectionEditor}"> |
|||
<local:MultiLineTextEditor Background="{TemplateBinding Background}" |
|||
BorderBrush="{TemplateBinding BorderBrush}" |
|||
BorderThickness="{TemplateBinding BorderThickness}" |
|||
Content="{TemplateBinding Content}" |
|||
Padding="{TemplateBinding Padding}" |
|||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" |
|||
IsOpen="{TemplateBinding IsOpen}" |
|||
Text="{Binding Text, RelativeSource={RelativeSource TemplatedParent}}" |
|||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/> |
|||
</ControlTemplate> |
|||
</Setter.Value> |
|||
</Setter> |
|||
</Style> |
|||
|
|||
</ResourceDictionary> |
|||
@ -0,0 +1,82 @@ |
|||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:chrome="clr-namespace:Microsoft.Windows.Controls.Chromes" |
|||
xmlns:coreConverters="clr-namespace:Microsoft.Windows.Controls.Core.Converters" |
|||
xmlns:local="clr-namespace:Microsoft.Windows.Controls" > |
|||
|
|||
<coreConverters:InverseBoolConverter x:Key="InverseBoolConverter" /> |
|||
|
|||
<LinearGradientBrush x:Key="PopupDarkBorderBrush" EndPoint="0.5,1" StartPoint="0.5,0"> |
|||
<GradientStop Color="#FFA3AEB9" Offset="0"/> |
|||
<GradientStop Color="#FF8399A9" Offset="0.375"/> |
|||
<GradientStop Color="#FF718597" Offset="0.375"/> |
|||
<GradientStop Color="#FF617584" Offset="1"/> |
|||
</LinearGradientBrush> |
|||
|
|||
<LinearGradientBrush x:Key="PopupBackgroundBrush" StartPoint="0,0" EndPoint="0,1"> |
|||
<LinearGradientBrush.GradientStops> |
|||
<GradientStopCollection> |
|||
<GradientStop Offset="0" Color="#FFffffff"/> |
|||
<GradientStop Offset="1" Color="#FFE8EBED"/> |
|||
</GradientStopCollection> |
|||
</LinearGradientBrush.GradientStops> |
|||
</LinearGradientBrush> |
|||
|
|||
<Style TargetType="{x:Type local:DropDownButton}"> |
|||
<Setter Property="BorderThickness" Value="1"/> |
|||
<Setter Property="IsTabStop" Value="False" /> |
|||
<Setter Property="HorizontalContentAlignment" Value="Center" /> |
|||
<Setter Property="VerticalContentAlignment" Value="Center" /> |
|||
<Setter Property="Padding" Value="3"/> |
|||
<Setter Property="Template"> |
|||
<Setter.Value> |
|||
<ControlTemplate TargetType="{x:Type local:DropDownButton}"> |
|||
<Grid x:Name="MainGrid" SnapsToDevicePixels="True"> |
|||
<ToggleButton x:Name="PART_DropDownButton" 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" |
|||
RenderChecked="{TemplateBinding IsOpen}" |
|||
RenderEnabled="{TemplateBinding IsEnabled}" |
|||
RenderMouseOver="{Binding IsMouseOver, ElementName=PART_DropDownButton}" |
|||
RenderPressed="{Binding IsPressed, ElementName=PART_DropDownButton}" > |
|||
<Grid> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="*" /> |
|||
<ColumnDefinition Width="Auto" /> |
|||
</Grid.ColumnDefinitions> |
|||
<ContentPresenter Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="true" /> |
|||
<Grid x:Name="arrowGlyph" IsHitTestVisible="False" Margin="4,3,4,3" Grid.Column="1"> |
|||
<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> |
|||
</Grid> |
|||
</chrome:ButtonChrome> |
|||
</Grid> |
|||
</ToggleButton> |
|||
|
|||
<Popup x:Name="PART_Popup" |
|||
HorizontalOffset="1" |
|||
VerticalOffset="1" |
|||
AllowsTransparency="True" |
|||
StaysOpen="False" |
|||
Placement="Bottom" |
|||
Focusable="False" |
|||
IsOpen="{Binding IsChecked, ElementName=PART_DropDownButton}"> |
|||
<Border BorderThickness="1" Background="{StaticResource PopupBackgroundBrush}" BorderBrush="{StaticResource PopupDarkBorderBrush}" > |
|||
<ContentPresenter Content="{TemplateBinding DropDownContent}" /> |
|||
</Border> |
|||
</Popup> |
|||
|
|||
</Grid> |
|||
</ControlTemplate> |
|||
</Setter.Value> |
|||
</Setter> |
|||
</Style> |
|||
|
|||
</ResourceDictionary> |
|||
|
After Width: | Height: | Size: 601 B |
@ -0,0 +1,124 @@ |
|||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:local="clr-namespace:Microsoft.Windows.Controls" |
|||
xmlns:chrome="clr-namespace:Microsoft.Windows.Controls.Chromes" |
|||
xmlns:coreConverters="clr-namespace:Microsoft.Windows.Controls.Core.Converters"> |
|||
|
|||
<coreConverters:InverseBoolConverter x:Key="InverseBoolConverter" /> |
|||
|
|||
<LinearGradientBrush x:Key="PopupDarkBorderBrush" EndPoint="0.5,1" StartPoint="0.5,0"> |
|||
<GradientStop Color="#FFA3AEB9" Offset="0"/> |
|||
<GradientStop Color="#FF8399A9" Offset="0.375"/> |
|||
<GradientStop Color="#FF718597" Offset="0.375"/> |
|||
<GradientStop Color="#FF617584" Offset="1"/> |
|||
</LinearGradientBrush> |
|||
|
|||
<LinearGradientBrush x:Key="PopupBackgroundBrush" StartPoint="0,0" EndPoint="0,1"> |
|||
<LinearGradientBrush.GradientStops> |
|||
<GradientStopCollection> |
|||
<GradientStop Offset="0" Color="#FFffffff"/> |
|||
<GradientStop Offset="1" Color="#FFE8EBED"/> |
|||
</GradientStopCollection> |
|||
</LinearGradientBrush.GradientStops> |
|||
</LinearGradientBrush> |
|||
|
|||
<Style x:Key="ToggleButtonStyle" TargetType="ToggleButton"> |
|||
<Setter Property="Template"> |
|||
<Setter.Value> |
|||
<ControlTemplate TargetType="ToggleButton"> |
|||
<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" |
|||
RenderChecked="{Binding IsOpen, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:MultiLineTextEditor}}" |
|||
RenderEnabled="{Binding IsEnabled, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:MultiLineTextEditor}}" |
|||
RenderMouseOver="{TemplateBinding IsMouseOver}" |
|||
RenderPressed="{TemplateBinding IsPressed}" > |
|||
|
|||
<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> |
|||
|
|||
<Image x:Key="ImageContent" Height="16" Width="18" Source="/WPFToolkit.Extended;component/MultiLineTextEditor/Images/Notes16.png" /> |
|||
|
|||
<Style TargetType="{x:Type local:MultiLineTextEditor}"> |
|||
<Setter Property="Background" Value="White"/> |
|||
<Setter Property="BorderBrush"> |
|||
<Setter.Value> |
|||
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> |
|||
<GradientStop Color="#FFA3AEB9" Offset="0" /> |
|||
<GradientStop Color="#FF8399A9" Offset="0.375" /> |
|||
<GradientStop Color="#FF718597" Offset="0.375" /> |
|||
<GradientStop Color="#FF617584" Offset="1" /> |
|||
</LinearGradientBrush> |
|||
</Setter.Value> |
|||
</Setter> |
|||
<Setter Property="BorderThickness" Value="1,1,0,1" /> |
|||
<Setter Property="Content" Value="{StaticResource ImageContent}" /> |
|||
<Setter Property="Focusable" Value="False" /> |
|||
<Setter Property="Padding" Value="2,0,0,0" /> |
|||
<Setter Property="HorizontalContentAlignment" Value="Center" /> |
|||
<Setter Property="VerticalContentAlignment" Value="Center" /> |
|||
<Setter Property="Template"> |
|||
<Setter.Value> |
|||
<ControlTemplate TargetType="{x:Type local:MultiLineTextEditor}"> |
|||
<Grid x:Name="Root"> |
|||
<ToggleButton x:Name="PART_DropDownButton" Grid.Column="1" IsTabStop="True" MinHeight="22" SnapsToDevicePixels="True" |
|||
Background="{TemplateBinding Background}" |
|||
BorderBrush="{TemplateBinding BorderBrush}" |
|||
BorderThickness="{TemplateBinding BorderThickness}" |
|||
Padding="{TemplateBinding Padding}" |
|||
Content="{TemplateBinding Content}" |
|||
ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" |
|||
IsChecked="{Binding IsOpen, RelativeSource={RelativeSource TemplatedParent}}" |
|||
Style="{StaticResource ToggleButtonStyle}" |
|||
IsHitTestVisible="{Binding IsOpen, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InverseBoolConverter}}" |
|||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"/> |
|||
<Popup IsOpen="{Binding IsChecked, ElementName=PART_DropDownButton}" StaysOpen="False" |
|||
Placement="Bottom" SnapsToDevicePixels="True" AllowsTransparency="True" Focusable="False" PopupAnimation="Slide" |
|||
Width="{TemplateBinding DropDownWidth}" Height="{TemplateBinding DropDownHeight}"> |
|||
<Border BorderThickness="1" Background="{StaticResource PopupBackgroundBrush}" BorderBrush="{StaticResource PopupDarkBorderBrush}"> |
|||
<Grid> |
|||
<TextBox x:Name="PART_TextBox" AcceptsReturn="true" TextWrapping="{TemplateBinding TextWrapping}" Padding="{TemplateBinding Padding}" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" |
|||
SpellCheck.IsEnabled="{TemplateBinding IsSpellCheckEnabled}" |
|||
Text="{Binding Text, RelativeSource={RelativeSource TemplatedParent}}" |
|||
TextAlignment="{TemplateBinding TextAlignment}" |
|||
Margin="3" /> |
|||
<Thumb x:Name="PART_ResizeThumb" HorizontalAlignment="Right" VerticalAlignment="Bottom" Cursor="SizeNWSE"> |
|||
<Thumb.Template> |
|||
<ControlTemplate TargetType="{x:Type Thumb}"> |
|||
<Grid Background="Transparent"> |
|||
<Path Data="M0.5,6.5 L6.5,0.5 M6.5,3.5 L3.5,6.5" Stroke="Black" StrokeThickness="1" /> |
|||
</Grid> |
|||
</ControlTemplate> |
|||
</Thumb.Template> |
|||
</Thumb> |
|||
</Grid> |
|||
</Border> |
|||
</Popup> |
|||
</Grid> |
|||
</ControlTemplate> |
|||
</Setter.Value> |
|||
</Setter> |
|||
</Style> |
|||
|
|||
</ResourceDictionary> |
|||
|
After Width: | Height: | Size: 794 B |
@ -1,25 +1,29 @@ |
|||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:sys="clr-namespace:System;assembly=mscorlib"> |
|||
|
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> |
|||
<ResourceDictionary.MergedDictionaries> |
|||
<ResourceDictionary Source="/WPFToolkit.Extended;component/Chromes/Themes/Generic.xaml" /> |
|||
<ResourceDictionary Source="/WPFToolkit.Extended;component/BusyIndicator/Themes/Generic.xaml" /> |
|||
<ResourceDictionary Source="/WPFToolkit.Extended;component/ButtonSpinner/Themes/Generic.xaml" /> |
|||
<ResourceDictionary Source="/WPFToolkit.Extended;component/Calculator/Themes/Generic.xaml" /> |
|||
<ResourceDictionary Source="/WPFToolkit.Extended;component/CalculatorUpDown/Themes/Generic.xaml" /> |
|||
<ResourceDictionary Source="/WPFToolkit.Extended;component/CheckListBox/Themes/Generic.xaml" /> |
|||
<ResourceDictionary Source="/WPFToolkit.Extended;component/ChildWindow/Themes/Generic.xaml" /> |
|||
<ResourceDictionary Source="/WPFToolkit.Extended;component/ColorCanvas/Themes/Generic.xaml" /> |
|||
<ResourceDictionary Source="/WPFToolkit.Extended;component/ColorPicker/Themes/Generic.xaml" /> |
|||
<ResourceDictionary Source="/WPFToolkit.Extended;component/CollectionEditors/Themes/Generic.xaml" /> |
|||
<ResourceDictionary Source="/WPFToolkit.Extended;component/DropDownButton/Themes/Generic.xaml" /> |
|||
<ResourceDictionary Source="/WPFToolkit.Extended;component/Magnifier/Themes/Generic.xaml" /> |
|||
<ResourceDictionary Source="/WPFToolkit.Extended;component/MessageBox/Themes/Generic.xaml" /> |
|||
<ResourceDictionary Source="/WPFToolkit.Extended;component/DateTimeUpDown/Themes/Generic.xaml" /> |
|||
<ResourceDictionary Source="/WPFToolkit.Extended;component/DateTimePicker/Themes/Generic.xaml" /> |
|||
<ResourceDictionary Source="/WPFToolkit.Extended;component/MultiLineTextEditor/Themes/Generic.xaml" /> |
|||
<ResourceDictionary Source="/WPFToolkit.Extended;component/NumericUpDown/Themes/Generic.xaml" /> |
|||
<ResourceDictionary Source="/WPFToolkit.Extended;component/SplitButton/Themes/Generic.xaml" /> |
|||
<ResourceDictionary Source="/WPFToolkit.Extended;component/PropertyGrid/Themes/Generic.xaml" /> |
|||
<ResourceDictionary Source="/WPFToolkit.Extended;component/TimePicker/Themes/Generic.xaml" /> |
|||
<ResourceDictionary Source="/WPFToolkit.Extended;component/WatermarkTextBox/Themes/Generic.xaml" /> |
|||
<ResourceDictionary Source="/WPFToolkit.Extended;component/Wizard/Themes/Generic.xaml" /> |
|||
</ResourceDictionary.MergedDictionaries> |
|||
|
|||
|
|||
</ResourceDictionary> |
|||
|
|||
@ -0,0 +1,182 @@ |
|||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:local="clr-namespace:Microsoft.Windows.Controls" |
|||
xmlns:coreConverters="clr-namespace:Microsoft.Windows.Controls.Core.Converters"> |
|||
|
|||
<coreConverters:WizardPageButtonVisibilityConverter x:Key="WizardPageButtonVisibilityConverter" /> |
|||
|
|||
<Style TargetType="{x:Type local:Wizard}"> |
|||
<Setter Property="Background" Value="#F0F0F0" /> |
|||
<Setter Property="BorderBrush" Value="#A0A0A0" /> |
|||
<Setter Property="BorderThickness" Value="1" /> |
|||
<Setter Property="ItemsPanel"> |
|||
<Setter.Value> |
|||
<ItemsPanelTemplate> |
|||
<Grid /> |
|||
</ItemsPanelTemplate> |
|||
</Setter.Value> |
|||
</Setter> |
|||
<Setter Property="Template"> |
|||
<Setter.Value> |
|||
<ControlTemplate TargetType="{x:Type local:Wizard}"> |
|||
<Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"> |
|||
<Grid Background="{TemplateBinding Background}"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="*" /> |
|||
<RowDefinition Height="Auto" /> |
|||
</Grid.RowDefinitions> |
|||
|
|||
<ContentPresenter Content="{Binding CurrentPage, RelativeSource={RelativeSource TemplatedParent}}" /> |
|||
|
|||
<Border Grid.Row="1" Background="#F0F0F0" BorderBrush="#A0A0A0" BorderThickness="0,1,0,0" Padding="7" > |
|||
<StackPanel Background="{TemplateBinding Background}"> |
|||
<Grid Margin="{TemplateBinding Padding}"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="Auto" /> |
|||
<ColumnDefinition Width="*" /> |
|||
</Grid.ColumnDefinitions> |
|||
<Button Name="PART_HelpButton" Grid.Column="0" MinWidth="75" |
|||
Command="local:WizardCommands.Help" |
|||
Content="{TemplateBinding HelpButtonContent}"> |
|||
<Button.Visibility> |
|||
<MultiBinding Converter="{StaticResource WizardPageButtonVisibilityConverter}" > |
|||
<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="HelpButtonVisibility" /> |
|||
<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="CurrentPage.HelpButtonVisibility" /> |
|||
</MultiBinding> |
|||
</Button.Visibility> |
|||
</Button> |
|||
<StackPanel Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Right"> |
|||
<Button Name="PART_CancelButton" Margin="0,0,7,0" MinWidth="75" |
|||
Command="local:WizardCommands.Cancel" |
|||
Content="{TemplateBinding CancelButtonContent}" > |
|||
<Button.Visibility> |
|||
<MultiBinding Converter="{StaticResource WizardPageButtonVisibilityConverter}" > |
|||
<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="CancelButtonVisibility" /> |
|||
<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="CurrentPage.CancelButtonVisibility" /> |
|||
</MultiBinding> |
|||
</Button.Visibility> |
|||
</Button> |
|||
<Button Name="PART_BackButton" MinWidth="75" |
|||
Command="local:WizardCommands.PreviousPage" |
|||
Content="{TemplateBinding BackButtonContent}" > |
|||
<Button.Visibility> |
|||
<MultiBinding Converter="{StaticResource WizardPageButtonVisibilityConverter}" > |
|||
<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="BackButtonVisibility" /> |
|||
<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="CurrentPage.BackButtonVisibility" /> |
|||
</MultiBinding> |
|||
</Button.Visibility> |
|||
</Button> |
|||
<Button Name="PART_NextButton" MinWidth="75" |
|||
Command="local:WizardCommands.NextPage" |
|||
Content="{TemplateBinding NextButtonContent}" > |
|||
<Button.Visibility> |
|||
<MultiBinding Converter="{StaticResource WizardPageButtonVisibilityConverter}" > |
|||
<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="NextButtonVisibility" /> |
|||
<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="CurrentPage.NextButtonVisibility" /> |
|||
</MultiBinding> |
|||
</Button.Visibility> |
|||
</Button> |
|||
<Button Name="PART_FinishButton" Margin="7,0,0,0" MinWidth="75" |
|||
Command="local:WizardCommands.Finish" |
|||
Content="{TemplateBinding FinishButtonContent}" > |
|||
<Button.Visibility> |
|||
<MultiBinding Converter="{StaticResource WizardPageButtonVisibilityConverter}" > |
|||
<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="FinishButtonVisibility" /> |
|||
<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="CurrentPage.FinishButtonVisibility" /> |
|||
</MultiBinding> |
|||
</Button.Visibility> |
|||
</Button> |
|||
</StackPanel> |
|||
</Grid> |
|||
</StackPanel> |
|||
</Border> |
|||
</Grid> |
|||
</Border> |
|||
</ControlTemplate> |
|||
</Setter.Value> |
|||
</Setter> |
|||
</Style> |
|||
|
|||
<ControlTemplate x:Key="BlankWizardPageTemplate" TargetType="{x:Type local:WizardPage}"> |
|||
<Border SnapsToDevicePixels="true" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}"> |
|||
<Grid Background="{TemplateBinding Background}"> |
|||
<ContentPresenter Margin="14" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" /> |
|||
</Grid> |
|||
</Border> |
|||
</ControlTemplate> |
|||
|
|||
<ControlTemplate x:Key="ExteriorWizardPageTemplate" TargetType="{x:Type local:WizardPage}"> |
|||
<Grid Background="{TemplateBinding Background}"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="Auto" /> |
|||
<ColumnDefinition Width="*" /> |
|||
</Grid.ColumnDefinitions> |
|||
<Border SnapsToDevicePixels="true" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}"> |
|||
<Grid Grid.Column="0" Background="{TemplateBinding ExteriorPanelBackground}" MinWidth="{Binding ExteriorPanelMinWidth, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:Wizard}}" > |
|||
<ContentControl Content="{TemplateBinding ExteriorPanelContent}" /> |
|||
</Grid> |
|||
</Border> |
|||
<Grid Column="1" Margin="14"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="*" /> |
|||
</Grid.RowDefinitions> |
|||
<TextBlock Grid.Row="0" TextWrapping="Wrap" Margin="0,0,0,14" FontSize="16" FontWeight="Bold" Text="{TemplateBinding Title}" /> |
|||
<TextBlock Grid.Row="1" TextWrapping="Wrap" Margin="0,0,0,14" Text="{TemplateBinding Description}" /> |
|||
<ContentPresenter Grid.Row="2" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" /> |
|||
</Grid> |
|||
</Grid> |
|||
</ControlTemplate> |
|||
|
|||
<ControlTemplate x:Key="InteriorWizardPageTemplate" TargetType="{x:Type local:WizardPage}"> |
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="*" /> |
|||
</Grid.RowDefinitions> |
|||
|
|||
<Grid Background="{TemplateBinding HeaderBackground}" MinHeight="56" > |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="*" /> |
|||
<ColumnDefinition Width="Auto" /> |
|||
</Grid.ColumnDefinitions> |
|||
<StackPanel> |
|||
<TextBlock Margin="16,9,0,1" TextWrapping="Wrap" FontWeight="Bold" Text="{TemplateBinding Title}" /> |
|||
<TextBlock Margin="32,0,0,3" TextWrapping="Wrap" Text="{TemplateBinding Description}" /> |
|||
</StackPanel> |
|||
<Image Grid.Column="1" Margin="4" Source="{TemplateBinding HeaderImage}" Stretch="None" HorizontalAlignment="Center" VerticalAlignment="Center" /> |
|||
</Grid> |
|||
|
|||
<Border Grid.Row="1" SnapsToDevicePixels="true" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}"> |
|||
<Grid Background="{TemplateBinding Background}"> |
|||
<ContentPresenter Margin="14" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" /> |
|||
</Grid> |
|||
</Border> |
|||
</Grid> |
|||
</ControlTemplate> |
|||
|
|||
<Style TargetType="{x:Type local:WizardPage}"> |
|||
<Style.Triggers> |
|||
<Trigger Property="PageType" Value="Blank"> |
|||
<Setter Property="Background" Value="#FFF0F0F0" /> |
|||
<Setter Property="BorderThickness" Value="0" /> |
|||
<Setter Property="Template" Value="{StaticResource BlankWizardPageTemplate}" /> |
|||
</Trigger> |
|||
<Trigger Property="PageType" Value="Exterior"> |
|||
<Setter Property="Background" Value="#FFFFFF" /> |
|||
<Setter Property="BorderThickness" Value="0" /> |
|||
<Setter Property="ExteriorPanelBackground" Value="#E3EFFF" /> |
|||
<Setter Property="Template" Value="{StaticResource ExteriorWizardPageTemplate}" /> |
|||
</Trigger> |
|||
<Trigger Property="PageType" Value="Interior"> |
|||
<Setter Property="Background" Value="#FFF0F0F0" /> |
|||
<Setter Property="BorderBrush" Value="{x:Static SystemColors.ActiveBorderBrush}" /> |
|||
<Setter Property="BorderThickness" Value="0,1,0,0" /> |
|||
<Setter Property="HeaderBackground" Value="#FFFFFF" /> |
|||
<Setter Property="Template" Value="{StaticResource InteriorWizardPageTemplate}" /> |
|||
</Trigger> |
|||
</Style.Triggers> |
|||
</Style> |
|||
|
|||
</ResourceDictionary> |
|||
Loading…
Reference in new issue