Hello. I was created custom theme for RadColorPicker, but when I apply this custom theme i receive exception (see attached picture)
Note I use latest version (Q1 2010) of WPF controls
Here my code
Note I use latest version (Q1 2010) of WPF controls
Here my code
<ResourceDictionary |
xmlns:customTheme="clr-namespace:BlackTheme_WPF" |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
xmlns:primitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls" |
xmlns:telerikInput="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input" |
xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" |
xmlns:animation="clr-namespace:Telerik.Windows.Controls.Animation;assembly=Telerik.Windows.Controls" |
xmlns:telerikChromes="clr-namespace:Telerik.Windows.Controls.Chromes;assembly=Telerik.Windows.Controls"> |
<customTheme:BlackTheme x:Key="Theme" /> |
<LinearGradientBrush x:Key="ControlOuterBorder_Pressed" EndPoint="0.5,1" StartPoint="0.5,0"> |
<GradientStop Color="#FF282828"/> |
<GradientStop Color="#FF5F5F5F" Offset="1"/> |
</LinearGradientBrush> |
<LinearGradientBrush x:Key="ControlBackground_Pressed" EndPoint="0.5,1" StartPoint="0.5,0"> |
<GradientStop Color="#FFFFDCAB" Offset="0"/> |
<GradientStop Color="#FFFFD18F" Offset="0.5"/> |
<GradientStop Color="#FFFE9227" Offset="0.5"/> |
<GradientStop Color="#FFFFBA74" Offset="0"/> |
</LinearGradientBrush> |
<LinearGradientBrush x:Key="ControlInnerBorder_Pressed" EndPoint="0.5,1" StartPoint="0.5,0"> |
<GradientStop Color="#FFB69A78"/> |
<GradientStop Color="#FFFFE17A" Offset="0.126"/> |
</LinearGradientBrush> |
<SolidColorBrush x:Key="ControlElement_Normal" Color="#FF000000" /> |
<SolidColorBrush x:Key="ColorPicker_TitleBackground" Color="#FFDEDEDE" /> |
<SolidColorBrush x:Key="ColorPicker_TitleBorder" Color="#FF848484" /> |
<SolidColorBrush x:Key="ColorPicker_Background" Color="#FFFFFFFF" /> |
<SolidColorBrush x:Key="ColorPicker_OuterBorder" Color="#FF848484" /> |
<SolidColorBrush x:Key="ColorPicker_InnerBorder" Color="#FFF5F5F5" /> |
<SolidColorBrush x:Key="ColorPicker_Foreground" Color="#FF000000" /> |
<LinearGradientBrush x:Key="ColorPicker_ButtonBackground_MouseOver" EndPoint="0.5,1" StartPoint="0.5,0"> |
<GradientStop Color="#FFFFFBA3" Offset="1" /> |
<GradientStop Color="#FFFFFBDA" Offset="0" /> |
<GradientStop Color="#FFFFD25A" Offset="0.43" /> |
<GradientStop Color="#FFFEEBAE" Offset="0.42" /> |
</LinearGradientBrush> |
<SolidColorBrush x:Key="ColorPicker_ButtonInnerBorder_MouseOver" Color="#FFFFFFFF" /> |
<SolidColorBrush x:Key="ColorPicker_ButtonBorder_MouseOver" Color="#FFFFC92B" /> |
<CornerRadius x:Key="ColorPicker_ButtonOuterBorder_LeftCornerRadius">1,0,0,1</CornerRadius> |
<CornerRadius x:Key="ColorPicker_ButtonOuterBorder_RightCornerRadius">0,1,1,0</CornerRadius> |
<SolidColorBrush x:Key="ColorPaletteViewItem_Border" Color="#FFC9C9CB" /> |
<SolidColorBrush x:Key="ColorPaletteViewItem_OuterBorder_MouseOver" Color="#FFFFC92B" /> |
<SolidColorBrush x:Key="ColorPaletteViewItem_InnerBorder_MouseOver" Color="#FFFFFFFF" /> |
<SolidColorBrush x:Key="ColorPaletteViewItem_OuterBorder_Selected" Color="#FF5D5D5D" /> |
<LinearGradientBrush x:Key="ColorPaletteViewItem_InnerBorder_Selected" EndPoint="0.5,1" StartPoint="0.5,0"> |
<GradientStop Color="#FFB69A78" /> |
<GradientStop Color="#FFFFE17A" Offset="0.126" /> |
</LinearGradientBrush> |
<CornerRadius x:Key="ColorPicker_HeaderButtonOuterBorder_CornerRadius">1</CornerRadius> |
<CornerRadius x:Key="ColorPicker_HeaderButtonInnerBorder_CornerRadius">0</CornerRadius> |
<SolidColorBrush x:Key="ColorPicker_HeaderButtonBackground" Color="#FFDEDEDE" /> |
<SolidColorBrush x:Key="ColorPicker_HeaderButtonBorder" Color="#FF848484" /> |
<SolidColorBrush x:Key="ColorPicker_HeaderButtonOuterBorder_MouseOver" Color="#FFFFC92B" /> |
<SolidColorBrush x:Key="ColorPicker_HeaderButtonInnerBorder_MouseOver" Color="#FFFFFFFF" /> |
<LinearGradientBrush x:Key="ColorPicker_HeaderButtonInnerBackground_MouseOver" EndPoint="0.5,1" |
StartPoint="0.5,0"> |
<GradientStop Color="#FFFFFBA3" Offset="1" /> |
<GradientStop Color="#FFFFFBDA" Offset="0" /> |
<GradientStop Color="#FFFFD25A" Offset="0.43" /> |
<GradientStop Color="#FFFEEBAE" Offset="0.42" /> |
</LinearGradientBrush> |
<SolidColorBrush x:Key="ColorPicker_HeaderButtonOuterColorStroke" Color="#FFFFC92B" /> |
<SolidColorBrush x:Key="ColorPicker_HeaderButtonColorFill" Color="#FF000000" /> |
<SolidColorBrush x:Key="ColorPicker_HeaderButtonInnerColorStroke" Color="#FFBFBFBF" /> |
<Style TargetType="telerikInput:RadColorPaletteViewItem" x:Key="DefaultStyle"> |
<Setter Property="Color" Value="Black" /> |
</Style> |
<Style TargetType="Button" x:Key="RadColorPicker_HeaderButtonStyle"> |
<Setter Property="Foreground" Value="{StaticResource ColorPicker_Foreground}" /> |
<Setter Property="FontWeight" Value="Normal" /> |
<Setter Property="BorderBrush" |
Value="{StaticResource ColorPicker_HeaderButtonOuterColorStroke}" /> |
<Setter Property="Template"> |
<Setter.Value> |
<ControlTemplate TargetType="Button"> |
<Grid> |
<Grid.ColumnDefinitions> |
<ColumnDefinition Width="Auto" MinWidth="25" /> |
<ColumnDefinition Width="*" /> |
</Grid.ColumnDefinitions> |
<Border MinWidth="25" HorizontalAlignment="Left" |
Background="{StaticResource ColorPicker_HeaderButtonBackground}" |
BorderBrush="{StaticResource ColorPicker_HeaderButtonBorder}" |
BorderThickness="0 0 1 0" /> |
<Border BorderThickness="1" Grid.ColumnSpan="2" Opacity="0" |
CornerRadius="{StaticResource ColorPicker_HeaderButtonOuterBorder_CornerRadius}" |
x:Name="border_mouseover" |
BorderBrush="{StaticResource ColorPicker_HeaderButtonOuterBorder_MouseOver}"> |
<Border BorderThickness="1" |
CornerRadius="{StaticResource ColorPicker_HeaderButtonInnerBorder_CornerRadius}" |
BorderBrush="{StaticResource ColorPicker_HeaderButtonInnerBorder_MouseOver}" |
Background="{StaticResource ColorPicker_HeaderButtonInnerBackground_MouseOver}" /> |
</Border> |
<Border Margin="2 2 3 2" BorderBrush="{TemplateBinding BorderBrush}" |
BorderThickness="1" CornerRadius="2" x:Name="rectangleborder"> |
<Rectangle |
Stroke="{StaticResource ColorPicker_HeaderButtonInnerColorStroke}" |
Fill="{StaticResource ColorPicker_HeaderButtonColorFill}" |
MinWidth="14" MinHeight="14" VerticalAlignment="Center" |
Margin="1" /> |
</Border> |
<ContentPresenter Grid.Column="1" x:Name="contentPresenter" Margin="7 0 0 0" |
Content="{TemplateBinding Content}" |
ContentTemplate="{TemplateBinding ContentTemplate}" |
VerticalAlignment="Center" HorizontalAlignment="Left" /> |
</Grid> |
<ControlTemplate.Triggers> |
<Trigger Property="IsMouseOver" Value="True"> |
<Setter Property="Opacity" TargetName="border_mouseover" Value="1" /> |
</Trigger> |
<Trigger Property="IsFocused" Value="True" /> |
<Trigger Property="IsPressed" Value="True"> |
<Setter Property="Opacity" TargetName="border_mouseover" Value="1" /> |
</Trigger> |
</ControlTemplate.Triggers> |
</ControlTemplate> |
</Setter.Value> |
</Setter> |
</Style> |
<Style x:Key="ColorButtonDefaultStyle" TargetType="Button"> |
<Setter Property="Template"> |
<Setter.Value> |
<ControlTemplate TargetType="Button"> |
<Grid Height="25" Width="23"> |
<telerikChromes:ButtonChrome x:Name="Chrome" RenderNormal="False" |
telerik:StyleManager.Theme="{StaticResource Theme}" |
RenderPressed="{TemplateBinding IsPressed}" |
RenderHighlighted="{TemplateBinding IsMouseOver}" |
CornerRadius="{StaticResource ColorPicker_ButtonOuterBorder_LeftCornerRadius}" /> |
<Grid Height="25" Width="23"> |
<Grid.RowDefinitions> |
<RowDefinition Height="0.664*" /> |
<RowDefinition Height="0.336*" /> |
</Grid.RowDefinitions> |
<Path Fill="#FF364F87" Stretch="Fill" VerticalAlignment="Top" |
HorizontalAlignment="Center" RenderTransformOrigin="0.5,0.5" |
Data="M3.8280001,4.8113337 C3.756,4.8113337 3.72,4.8593335 3.684,4.9673333 C3.6765001,4.9868336 3.6538124,5.0481458 3.6196642,5.141099 C3.5855157,5.2340522 3.5399063,5.3586459 3.4865625,5.5047083 C3.3798749,5.7968335 3.24225,6.1748333 3.1035001,6.5573335 C2.9647501,6.9398336 2.8248751,7.3268337 2.7136877,7.6369586 C2.6580937,7.7920213 2.6096718,7.927865 2.5721486,8.034318 C2.5346251,8.1407709 2.5080001,8.2178335 2.4960001,8.2553339 L4.8600001,8.2553339 C4.8464999,8.2103338 4.8236251,8.1315842 4.7937655,8.0276384 C4.7639065,7.9236932 4.7270627,7.7945528 4.6856251,7.6487713 C4.6027498,7.3572087 4.5015001,6.999084 4.401,6.6428337 C4.3004999,6.2865839 4.2007499,5.9322085 4.1208749,5.6481462 C4.0809374,5.506115 4.045969,5.3816619 4.0183597,5.2833414 C3.9907501,5.1850209 3.9705,5.1128335 3.96,5.0753336 C3.9359999,4.9853334 3.918,4.9193335 3.8985,4.8758335 C3.8789999,4.8323336 3.858,4.8113337 3.8280001,4.8113337 z M4.8959999,3.1193333 C4.9679999,3.1193333 4.9920001,3.1913338 5.0279999,3.3233337 C5.0565,3.4178338 5.0960622,3.5425212 5.1439219,3.6898727 C5.191781,3.8372245 5.2479377,4.0072398 5.3096251,4.1923962 C5.4330001,4.5627089 5.5784998,4.9935837 5.724,5.4248338 C5.8695002,5.8560839 6.0149999,6.2877088 6.1383748,6.6595211 C6.2000623,6.8454275 6.2562189,7.0163803 6.3040781,7.1648569 C6.3519378,7.3133335 6.3915,7.4393334 6.4200001,7.5353336 C6.4890003,7.7693338 6.5895,8.0843334 6.7040625,8.4302711 C6.818625,8.7762089 6.9472499,9.1530838 7.0724998,9.5108337 C7.1977501,9.8685837 7.3196249,10.207209 7.4206877,10.476646 C7.4712186,10.611364 7.5165467,10.728786 7.554492,10.822654 C7.5924377,10.916521 7.6230001,10.986834 7.6440001,11.027333 C7.7460003,11.225333 7.875,11.360333 8.0010004,11.445833 C8.1269999,11.531333 8.25,11.567333 8.3400002,11.567333 L8.7480001,11.567333 C8.8199997,11.567333 8.8319998,11.615334 8.8319998,11.675334 L8.8319998,11.903334 C8.8319998,11.975333 8.8199997,12.059334 8.724,12.059334 C8.6669998,12.059334 8.6085005,12.057084 8.5288124,12.053709 C8.4491253,12.050334 8.3482504,12.045834 8.2065001,12.041333 C8.0647507,12.036834 7.8821254,12.032333 7.638938,12.028958 C7.39575,12.025583 7.092,12.023334 6.7080002,12.023334 C6.4590001,12.023334 6.2460003,12.025583 6.0628123,12.028958 C5.8796248,12.032333 5.7262497,12.036834 5.5964999,12.041333 C5.4667501,12.045834 5.3606248,12.050334 5.2719374,12.053709 C5.18325,12.057084 5.112,12.059334 5.052,12.059334 C4.9920001,12.059334 4.9590001,12.041334 4.941,12.012834 C4.9230003,11.984333 4.9200001,11.945333 4.9200001,11.903334 L4.9200001,11.675334 C4.9200001,11.615334 4.9320002,11.567333 4.9920001,11.567333 L5.3280001,11.567333 C5.4899998,11.567333 5.598,11.537333 5.6565003,11.468333 C5.7150002,11.399334 5.724,11.291334 5.6880002,11.135334 C5.6610003,11.027334 5.6115003,10.850334 5.5501876,10.638834 C5.4888749,10.427334 5.41575,10.181334 5.3414998,9.9353342 C5.2672501,9.6893339 5.191875,9.4433336 5.1260624,9.2318335 C5.0602498,9.0203333 5.0039997,8.8433332 4.9679999,8.7353334 L2.3399999,8.7353334 C2.316,8.7983332 2.26125,8.9483337 2.1926248,9.1438961 C2.1240001,9.3394585 2.0415001,9.5805836 1.962,9.8258333 C1.8824999,10.071083 1.806,10.320458 1.749375,10.53252 C1.69275,10.744583 1.656,10.919333 1.656,11.015333 C1.656,11.147333 1.6830001,11.285334 1.755,11.390333 C1.827,11.495333 1.944,11.567333 2.1240001,11.567333 L2.5439999,11.567333 C2.6040001,11.567333 2.6370001,11.579333 2.655,11.597333 C2.6730001,11.615334 2.6760001,11.639334 2.6760001,11.663334 L2.6760001,11.927334 C2.6760001,12.023334 2.664,12.059334 2.5680001,12.059334 C2.529,12.059334 2.4690001,12.057084 2.3855624,12.053709 C2.302125,12.050334 2.19525,12.045834 2.0625,12.041333 C1.92975,12.036834 1.771125,12.032333 1.5841875,12.028958 C1.3972499,12.025583 1.1819999,12.023334 0.93599993,12.023334 C0.71700001,12.023334 0.53625,12.025583 0.3856875,12.028958 C0.23512499,12.032333 0.11475,12.036834 0.016499937,12.041333 C-0.18000001,12.050334 -0.28799999,12.059334 -0.37199995,12.059334 C-0.44400001,12.059334 -0.456,11.987333 -0.456,11.903334 L-0.456,11.675334 C-0.456,11.603333 -0.44400001,11.567333 -0.37199995,11.567333 L-0.059999958,11.567333 C0.083999999,11.567333 0.228,11.525333 0.36600009,11.438334 C0.50400001,11.351334 0.63599998,11.219334 0.75599998,11.039333 C0.77700001,11.007833 0.80868751,10.947646 0.84883589,10.864372 C0.88898438,10.781099 0.93759376,10.67474 0.99243748,10.550896 C1.102125,10.303208 1.23675,9.9855833 1.3785,9.6428337 C1.52025,9.3000832 1.669125,8.9322081 1.8073125,8.5840206 C1.9455,8.2358332 2.073,7.9073334 2.1719999,7.6433334 C2.184,7.6133337 2.2096875,7.546771 2.2456639,7.4526224 C2.2816405,7.3584743 2.3279061,7.2367396 2.3810623,7.096396 C2.487375,6.8157086 2.6212499,6.4605837 2.7554998,6.1028337 C2.88975,5.7450838 3.024375,5.3847084 3.1321876,5.0935211 C3.1860938,4.9479275 3.2332969,4.8196306 3.2703984,4.717607 C3.3075001,4.6155834 3.3345001,4.5398335 3.348,4.4993334 C3.3660002,4.4393334 3.3900001,4.3703337 3.3990002,4.2998333 C3.408,4.2293334 3.402,4.1573334 3.3599999,4.0913334 C3.3239999,4.0433335 3.276,3.9833336 3.276,3.9353333 C3.276,3.899334 3.3,3.8513336 3.3959999,3.8273335 C3.4919999,3.8063335 3.6127501,3.7710836 3.7426875,3.7268338 C3.8726249,3.6825836 4.0117497,3.6293337 4.1444998,3.5723338 C4.2772498,3.5153337 4.403625,3.4545836 4.5080624,3.3953338 C4.6124997,3.3360839 4.6949997,3.2783339 4.7399998,3.227334 C4.8000002,3.1673336 4.836,3.1193333 4.8959999,3.1193333 z" |
Width="9.91" Margin="-2 3 0 0" Height="9.537"> |
<Path.RenderTransform> |
<ScaleTransform ScaleX="1" ScaleY="1" /> |
</Path.RenderTransform> |
</Path> |
<Rectangle Width="16" Margin="-2 0 0 0" |
Fill="{TemplateBinding Background}" Height="4.232" Grid.Row="1" |
VerticalAlignment="Top" /> |
</Grid> |
</Grid> |
<ControlTemplate.Triggers> |
<Trigger Property="IsMouseOver" Value="True" /> |
<Trigger Property="IsFocused" Value="True" /> |
<Trigger Property="IsPressed" Value="True" /> |
</ControlTemplate.Triggers> |
</ControlTemplate> |
</Setter.Value> |
</Setter> |
<Setter Property="Background" Value="Black" /> |
</Style> |
<Style x:Key="ToggleButtonIconStyle" TargetType="ToggleButton"> |
<Setter Property="Template"> |
<Setter.Value> |
<ControlTemplate TargetType="ToggleButton"> |
<Grid Height="25" Width="11"> |
<telerikChromes:ButtonChrome RenderNormal="False" |
telerik:StyleManager.Theme="{StaticResource Theme}" |
RenderPressed="{TemplateBinding IsPressed}" |
RenderHighlighted="{TemplateBinding IsMouseOver}" |
CornerRadius="{StaticResource ColorPicker_ButtonOuterBorder_RightCornerRadius}" /> |
<Border x:Name="BackgroundChecked" BorderThickness="1" Height="25" |
Width="11" Visibility="Collapsed" |
CornerRadius="{StaticResource ColorPicker_ButtonOuterBorder_RightCornerRadius}" |
BorderBrush="{StaticResource ControlOuterBorder_Pressed}" |
Background="{StaticResource ControlBackground_Pressed}"> |
<Border BorderThickness="1" |
BorderBrush="{StaticResource ControlInnerBorder_Pressed}" /> |
</Border> |
<Path x:Name="Arrow" Fill="{StaticResource ControlElement_Normal}" |
Stretch="Fill" Stroke="{x:Null}" |
Data="M0,0 L5,0 5,1 4,1 4,2 3,2 3,3 2,3 2,2 1,2 1,1 0,1 0,0 z" |
Width="5" Height="3" /> |
</Grid> |
<ControlTemplate.Triggers> |
<Trigger Property="IsMouseOver" Value="True" /> |
<Trigger Property="IsFocused" Value="True" /> |
<Trigger Property="IsPressed" Value="True" /> |
<Trigger Property="IsChecked" Value="True"> |
<Setter Property="Visibility" TargetName="BackgroundChecked" |
Value="Visible" /> |
</Trigger> |
</ControlTemplate.Triggers> |
</ControlTemplate> |
</Setter.Value> |
</Setter> |
</Style> |
<Style TargetType="telerikInput:RadColorPaletteViewItem" x:Key="{telerik:ThemeResourceKey ThemeType=customTheme:BlackTheme, ElementType=telerikInput:RadColorPaletteViewItem}"> |
<Setter Property="Template"> |
<Setter.Value> |
<ControlTemplate TargetType="telerikInput:RadColorPaletteViewItem"> |
<Grid x:Name="RootElement" Margin="0" |
SnapsToDevicePixels="True"> |
<Rectangle x:Name="color" MinHeight="11" MinWidth="11" Stretch="Fill" |
Margin="2 0" ToolTipService.ToolTip="{Binding }" |
Fill="{TemplateBinding Content}" /> |
<Border MinHeight="13" MinWidth="13" |
BorderBrush="{StaticResource ColorPaletteViewItem_Border}" |
Margin="2 0" x:Name="borderContent" VerticalAlignment="Stretch" |
BorderThickness="1"> |
<Border BorderThickness="1" x:Name="InnerborderContent" /> |
</Border> |
<Border MinHeight="13" MinWidth="13" |
BorderBrush="{StaticResource ColorPaletteViewItem_OuterBorder_MouseOver}" |
Margin="2 0" x:Name="border" VerticalAlignment="Stretch" |
BorderThickness="1" Visibility="Collapsed"> |
<Border BorderThickness="1" x:Name="Innerborder" |
BorderBrush="{StaticResource ColorPaletteViewItem_InnerBorder_MouseOver}" /> |
</Border> |
</Grid> |
<ControlTemplate.Triggers> |
<MultiTrigger> |
<MultiTrigger.Conditions> |
<Condition Property="IsSelected" Value="false" /> |
<Condition Property="IsMouseOver" Value="true" /> |
</MultiTrigger.Conditions> |
<Setter Property="Visibility" TargetName="border" Value="Visible" /> |
<Setter Property="BorderBrush" TargetName="border" |
Value="{StaticResource ColorPaletteViewItem_OuterBorder_MouseOver}" /> |
<Setter Property="BorderBrush" TargetName="Innerborder" |
Value="{StaticResource ColorPaletteViewItem_InnerBorder_MouseOver}" /> |
</MultiTrigger> |
<Trigger Property="IsSelected" Value="True"> |
<Trigger.EnterActions> |
<BeginStoryboard> |
<Storyboard> |
<ObjectAnimationUsingKeyFrames |
Storyboard.TargetProperty="Visibility" |
Storyboard.TargetName="border"> |
<DiscreteObjectKeyFrame KeyTime="0"> |
<DiscreteObjectKeyFrame.Value> |
<Visibility>Visible</Visibility> |
</DiscreteObjectKeyFrame.Value> |
</DiscreteObjectKeyFrame> |
</ObjectAnimationUsingKeyFrames> |
</Storyboard> |
</BeginStoryboard> |
</Trigger.EnterActions> |
<Trigger.ExitActions> |
<BeginStoryboard> |
<Storyboard> |
<ObjectAnimationUsingKeyFrames |
Storyboard.TargetProperty="Visibility" |
Storyboard.TargetName="border"> |
<DiscreteObjectKeyFrame KeyTime="0"> |
<DiscreteObjectKeyFrame.Value> |
<Visibility>Collapsed</Visibility> |
</DiscreteObjectKeyFrame.Value> |
</DiscreteObjectKeyFrame> |
</ObjectAnimationUsingKeyFrames> |
</Storyboard> |
</BeginStoryboard> |
</Trigger.ExitActions> |
<Setter Property="BorderBrush" TargetName="border" |
Value="{StaticResource ColorPaletteViewItem_OuterBorder_Selected}" /> |
<Setter Property="BorderBrush" TargetName="Innerborder" |
Value="{StaticResource ColorPaletteViewItem_InnerBorder_Selected}" /> |
</Trigger> |
<Trigger Property="IsMouseOver" Value="True"> |
<Setter Property="Visibility" TargetName="border"> |
<Setter.Value> |
<Visibility>Visible</Visibility> |
</Setter.Value> |
</Setter> |
</Trigger> |
<Trigger Property="IsMouseOver" Value="false"> |
<Setter Property="Visibility" TargetName="border"> |
<Setter.Value> |
<Visibility>Collapsed</Visibility> |
</Setter.Value> |
</Setter> |
</Trigger> |
</ControlTemplate.Triggers> |
</ControlTemplate> |
</Setter.Value> |
</Setter> |
<Setter Property="Content" Value="Color" /> |
<Setter Property="Color" Value="Green" /> |
</Style> |
<Style TargetType="telerikInput:RadColorPaletteView" |
x:Key="{telerik:ThemeResourceKey ThemeType=customTheme:BlackTheme, ElementType=telerikInput:RadColorPaletteView}"> |
<Setter Property="Background" Value="{StaticResource ColorPicker_Background}" /> |
<Setter Property="BorderBrush" Value="{StaticResource ColorPicker_OuterBorder}" /> |
<Setter Property="BorderThickness" Value="1" /> |
<Setter Property="ItemContainerStyle" Value="{StaticResource DefaultStyle}" /> |
<Setter Property="Template"> |
<Setter.Value> |
<ControlTemplate TargetType="telerikInput:RadColorPaletteView"> |
<Border BorderBrush="{TemplateBinding BorderBrush}" |
Background="{TemplateBinding Background}" |
BorderThickness="{TemplateBinding BorderThickness}"> |
<ItemsPresenter x:Name="ItemsPresenter" Margin="0,2,0,2" /> |
</Border> |
</ControlTemplate> |
</Setter.Value> |
</Setter> |
<Setter Property="ItemsPanel"> |
<Setter.Value> |
<ItemsPanelTemplate> |
<primitives:RadUniformGrid x:Name="uniformGrid" HorizontalAlignment="Stretch" |
ChildrenFlow="Vertical" VerticalAlignment="Stretch" Columns="10"> |
</primitives:RadUniformGrid> |
</ItemsPanelTemplate> |
</Setter.Value> |
</Setter> |
<Setter Property="Margin" Value="0" /> |
</Style> |
<Style TargetType="telerikInput:RadColorSelector" |
x:Key="{telerik:ThemeResourceKey ThemeType=customTheme:BlackTheme, ElementType=telerikInput:RadColorSelector}"> |
<Setter Property="Background" Value="{StaticResource ColorPicker_Background}" /> |
<Setter Property="BorderBrush" Value="{StaticResource ColorPicker_OuterBorder}" /> |
<Setter Property="BorderThickness" Value="1" /> |
<Setter Property="Foreground" Value="{StaticResource ColorPicker_Foreground}" /> |
<Setter Property="FontWeight" Value="Bold" /> |
<Setter Property="FontStyle" Value="Normal" /> |
<Setter Property="MainPaletteItemsStyle" Value="{StaticResource DefaultStyle}" /> |
<Setter Property="Template"> |
<Setter.Value> |
<ControlTemplate TargetType="telerikInput:RadColorSelector"> |
<Border BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="2" |
BorderThickness="{TemplateBinding BorderThickness}"> |
<Border BorderBrush="{StaticResource ColorPicker_InnerBorder}" |
BorderThickness="1" CornerRadius="1"> |
<Grid x:Name="RootElement" Margin="0" |
Background="{TemplateBinding Background}"> |
<Grid.RowDefinitions> |
<RowDefinition Height="Auto" /> |
<RowDefinition Height="Auto" /> |
<RowDefinition Height="Auto" /> |
<RowDefinition Height="*" /> |
<RowDefinition Height="Auto" /> |
<RowDefinition Height="Auto" /> |
</Grid.RowDefinitions> |
<Button Content="{TemplateBinding NoColorText}" |
x:Name="PaletteHeader" Grid.Row="0" |
Background="{TemplateBinding Background}" |
Style="{StaticResource RadColorPicker_HeaderButtonStyle}" /> |
<Border Margin="0 0 0 3" Grid.Row="1" |
Background="{StaticResource ColorPicker_TitleBackground}" |
BorderBrush="{StaticResource ColorPicker_TitleBorder}" |
BorderThickness="0 0 0 1"> |
<TextBlock Margin="10,2,2,2" x:Name="mainPaletteHeader" |
FontStyle="{TemplateBinding FontStyle}" |
FontWeight="{TemplateBinding FontWeight}" |
Foreground="{TemplateBinding Foreground}" |
Text="{TemplateBinding MainPaletteHeaderText}" /> |
</Border> |
<telerikInput:RadColorPaletteView |
Background="{TemplateBinding Background}" Grid.Row="2" |
Margin="0,0,0,-3" VerticalAlignment="Center" |
x:Name="HeaderPalette" BorderBrush="Transparent" |
BorderThickness="0"> |
<telerikInput:RadColorPaletteView.ItemsPanel> |
<ItemsPanelTemplate> |
<primitives:RadUniformGrid Background="Transparent" |
Columns="10"> |
</primitives:RadUniformGrid> |
</ItemsPanelTemplate> |
</telerikInput:RadColorPaletteView.ItemsPanel> |
</telerikInput:RadColorPaletteView> |
<telerikInput:RadColorPaletteView Grid.Row="3" Margin="0 5 0 2" |
x:Name="MainPalette" |
ItemContainerStyle="{TemplateBinding MainPaletteItemsStyle}" |
BorderBrush="Transparent" BorderThickness="0" |
Background="{TemplateBinding Background}" /> |
<Border Margin="0 2 0 3" x:Name="StandardPaletteBorder" Grid.Row="4" |
Background="{StaticResource ColorPicker_TitleBackground}" |
BorderBrush="{StaticResource ColorPicker_TitleBorder}" |
BorderThickness="0 0 0 1"> |
<TextBlock Margin="10,2,2,2" x:Name="standardPaletteHeader" |
FontWeight="{TemplateBinding FontWeight}" |
Foreground="{TemplateBinding Foreground}" |
Text="{TemplateBinding StandardPaletteHeaderText}" /> |
</Border> |
<telerikInput:RadColorPaletteView x:Name="StandartPalette" |
Margin="0 0 0 1" VerticalAlignment="Center" Grid.Row="5" |
BorderBrush="Transparent" BorderThickness="0" |
Background="{TemplateBinding Background}"> |
<telerikInput:RadColorPaletteView.ItemsPanel> |
<ItemsPanelTemplate> |
<primitives:RadUniformGrid Background="Transparent" |
Columns="10"> |
</primitives:RadUniformGrid> |
</ItemsPanelTemplate> |
</telerikInput:RadColorPaletteView.ItemsPanel> |
</telerikInput:RadColorPaletteView> |
</Grid> |
</Border> |
</Border> |
</ControlTemplate> |
</Setter.Value> |
</Setter> |
</Style> |
<Style TargetType="telerikInput:RadColorPicker" |
x:Key="{telerik:ThemeResourceKey ThemeType=customTheme:BlackTheme, ElementType=telerikInput:RadColorPicker}"> |
<Style.Setters> |
<Setter Property="Template"> |
<Setter.Value> |
<ControlTemplate TargetType="telerikInput:RadColorPicker"> |
<Grid x:Name="Root" |
HorizontalAlignment="{TemplateBinding HorizontalAlignment}" |
VerticalAlignment="{TemplateBinding VerticalAlignment}"> |
<Grid x:Name="Placement" Width="34"> |
<Grid.ColumnDefinitions> |
<ColumnDefinition Width="23" /> |
<ColumnDefinition Width="Auto" /> |
</Grid.ColumnDefinitions> |
<Border x:Name="Over_back" Opacity="0" Height="25" CornerRadius="1" |
Background="{StaticResource ColorPicker_ButtonBackground_MouseOver}" |
BorderBrush="{StaticResource ColorPicker_ButtonBorder_MouseOver}" |
BorderThickness="1" Width="34" Grid.ColumnSpan="2"> |
<Border CornerRadius="0" BorderThickness="1" |
BorderBrush="{StaticResource ColorPicker_ButtonInnerBorder_MouseOver}" /> |
</Border> |
<Button x:Name="LeftButton" |
Style="{TemplateBinding ColorButtonStyle}" |
HorizontalContentAlignment="Center" /> |
<ToggleButton Grid.Column="1" x:Name="ToggleButtonElement" |
IsChecked="{Binding Path=IsDropDownOpen,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}" |
Style="{TemplateBinding ExpanderButtonStyle}" Cursor="Hand" /> |
</Grid> |
<Popup x:Name="PART_Popup" |
AllowsTransparency="True" StaysOpen="False" |
IsOpen="{Binding Path=IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" |
PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}"> |
<Grid> |
<Border x:Name="DropDownBorder"> |
<telerikInput:RadColorSelector x:Name="ColorSelector" |
MainPaletteItemsStyle="{TemplateBinding MainPaletteItemsStyle}" |
MainPaletteColumnsCount="{TemplateBinding MainPaletteColumnsCount}" |
MainPaletteOrientation="{TemplateBinding MainPaletteOrientation}" |
MainPaletteHeaderText="{TemplateBinding MainPaletteHeaderText}" |
MainPalette="{TemplateBinding MainPalette}" |
HeaderPalette="{TemplateBinding HeaderPalette}" |
HeaderPaletteVisibility="{TemplateBinding HeaderPaletteVisibility}" |
StandardPalette="{TemplateBinding StandardPalette}" |
StandardPaletteVisibility="{TemplateBinding StandardPaletteVisibility}" |
StandardPaletteHeaderText="{TemplateBinding StandardPaletteHeaderText}" |
NoColorText="{TemplateBinding NoColorText}" |
BorderBrush="{TemplateBinding BorderBrush}" |
BorderThickness="{TemplateBinding BorderThickness}" |
NoColorVisibility="{TemplateBinding NoColorVisibility}" |
SelectedColor="{TemplateBinding SelectedColor}" |
Background="{TemplateBinding Background}" |
FontWeight="{TemplateBinding FontWeight}" |
FontStyle="{TemplateBinding FontStyle}" |
Foreground="{TemplateBinding Foreground}" /> |
</Border> |
</Grid> |
</Popup> |
</Grid> |
<ControlTemplate.Triggers> |
<Trigger Property="IsMouseOver" Value="True"> |
<Setter Property="Opacity" TargetName="Over_back" Value="1" /> |
</Trigger> |
<Trigger Property="IsChecked" Value="True" |
SourceName="ToggleButtonElement"> |
<Setter Property="Opacity" TargetName="Over_back" Value="1" /> |
</Trigger> |
<Trigger Property="IsFocused" Value="True" /> |
</ControlTemplate.Triggers> |
</ControlTemplate> |
</Setter.Value> |
</Setter> |
<Setter Property="MainPaletteColumnsCount" Value="10" /> |
<Setter Property="MainPaletteOrientation" Value="Vertical" /> |
<Setter Property="MainPalette" Value="Office" /> |
<Setter Property="HeaderPaletteVisibility" Value="Visible" /> |
<Setter Property="StandardPaletteVisibility" Value="Visible" /> |
<Setter Property="NoColorVisibility" Value="Visible" /> |
<Setter Property="SelectedColor" Value="Black" /> |
<Setter Property="StandardPalette" Value="Standard" /> |
<Setter Property="HeaderPalette" Value="Office" /> |
<Setter Property="MainPaletteItemsStyle" Value="{StaticResource DefaultStyle}" /> |
<Setter Property="ColorButtonStyle" Value="{StaticResource ColorButtonDefaultStyle}" /> |
<Setter Property="ExpanderButtonStyle" Value="{StaticResource ToggleButtonIconStyle}" /> |
<Setter Property="HorizontalAlignment" Value="Left" /> |
<Setter Property="VerticalAlignment" Value="Top" /> |
<Setter Property="Background" Value="{StaticResource ColorPicker_Background}" /> |
<Setter Property="BorderBrush" Value="{StaticResource ColorPicker_OuterBorder}" /> |
<Setter Property="BorderThickness" Value="1" /> |
<Setter Property="FontStyle" Value="Normal" /> |
<Setter Property="FontWeight" Value="Bold" /> |
<Setter Property="Foreground" Value="{StaticResource ColorPicker_Foreground}" /> |
</Style.Setters> |
</Style> |
</ResourceDictionary> |