未验证 提交 9df74948 编写于 作者: 末城via 提交者: GitHub

1.1.11-beta (#165)

* 1.1.11-beta
上级 b1a6efbf
......@@ -169,12 +169,15 @@
HorizontalAlignment="Left"
Source="/Samples;component/Resources/Logo.png"
RenderOptions.BitmapScalingMode="HighQuality" />
<pu:FormGroup Grid.Row="1"
<pu:FormGroup x:Name="FrmAccount"
Grid.Row="1"
Margin="0,50,0,0"
Style="{StaticResource InputFormGroupStyle}">
<TextBox Style="{StaticResource SignInTextBoxStyle}"
<TextBox x:Name="TbAccount"
Style="{StaticResource SignInTextBoxStyle}"
pu:TextBoxHelper.InputLimit="UpperCaseLetters,LowerCaseLetters,Digit"
pu:TextBoxHelper.Watermark="UserName / Email / Phone" />
pu:TextBoxHelper.Watermark="UserName / Email / Phone"
TextChanged="TbAccount_TextChanged"/>
</pu:FormGroup>
<pu:FormGroup x:Name="FrmPassword"
Grid.Row="2"
......
......@@ -17,7 +17,6 @@ namespace Samples.Views.Examples
public SignInView()
{
InitializeComponent();
ValidatePassword();
}
#endregion
......@@ -28,7 +27,8 @@ namespace Samples.Views.Examples
{
return;
}
if (!ValidatePassword())
if (!ValidateAccount()
|| !ValidatePassword())
{
return;
}
......@@ -38,6 +38,11 @@ namespace Samples.Views.Examples
FrmPassword.Message = null;
}
private void TbAccount_TextChanged(object sender, System.Windows.Controls.TextChangedEventArgs e)
{
ValidateAccount();
}
private void PasswordBox_PasswordChanged(object sender, RoutedEventArgs e)
{
ValidatePassword();
......@@ -45,12 +50,28 @@ namespace Samples.Views.Examples
#endregion
#region Functions
private bool ValidatePassword()
private bool ValidateAccount()
{
if (PwdPassword.Password == null || PwdPassword.Password == "")
if (TbAccount.Text == null
|| TbAccount.Text == "")
{
FrmPassword.ValidateResult = ValidateResult.Info;
FrmPassword.Message = "Try to input password";
FrmAccount.ValidateResult = ValidateResult.Error;
FrmAccount.Message = "Try to input account.";
return false;
}
FrmAccount.ValidateResult = ValidateResult.Success;
FrmAccount.Message = "Account valid.";
return true;
}
private bool ValidatePassword()
{
if (PwdPassword.Password == null
|| PwdPassword.Password == "")
{
FrmPassword.ValidateResult = ValidateResult.Error;
FrmPassword.Message = "Try to input password.";
return false;
}
else if (PwdPassword.Password.Length < 6)
......@@ -68,10 +89,11 @@ namespace Samples.Views.Examples
else
{
FrmPassword.ValidateResult = ValidateResult.Success;
FrmPassword.Message = "Nice work.";
FrmPassword.Message = "Password valid.";
return true;
}
}
#endregion
}
}
......@@ -110,7 +110,7 @@
<Setter Property="pu:IconHelper.VerticalAlignment"
Value="Top" />
<Setter Property="pu:IconHelper.Margin"
Value="0,10,7,0" />
Value="0,-15,7,0" />
<Setter Property="pu:ListBoxHelper.ItemsHeight"
Value="65" />
<Setter Property="pu:ListBoxHelper.ItemsPadding"
......
......@@ -83,21 +83,22 @@
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Button Margin="0,0,10,10"
Background="Transparent"
Width="{Binding ActualHeight, Converter={StaticResource {x:Static pu:ConverterKeys.DoublePlusConverter}}, ConverterParameter=100, RelativeSource={RelativeSource Self}, Mode=OneWay}"
ToolTip="{Binding ViewPath}"
VerticalContentAlignment="Stretch"
HorizontalContentAlignment="Stretch"
Padding="5"
Click="BtnExample_Click">
<Button.ContextMenu>
<pu:Card Margin="0,0,10,10"
BorderThickness="0"
Background="Transparent"
Width="{Binding ActualHeight, Converter={StaticResource {x:Static pu:ConverterKeys.DoublePlusConverter}}, ConverterParameter=100, RelativeSource={RelativeSource Self}, Mode=OneWay}"
ToolTip="{Binding ViewPath}"
VerticalContentAlignment="Stretch"
HorizontalContentAlignment="Stretch"
Padding="5"
Click="CrdExample_Click">
<pu:Card.ContextMenu>
<ContextMenu>
<MenuItem Header="Item 1" />
<MenuItem Header="Item 2" />
<MenuItem Header="Item 3" />
</ContextMenu>
</Button.ContextMenu>
</pu:Card.ContextMenu>
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
......@@ -120,7 +121,7 @@
Text="{Binding ViewPath}"
VerticalAlignment="Center" />
</Grid>
</Button>
</pu:Card>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
......
......@@ -44,10 +44,10 @@ namespace Samples.Views
#endregion
#region Event Handlers
private void BtnExample_Click(object sender, RoutedEventArgs e)
private void CrdExample_Click(object sender, RoutedEventArgs e)
{
var button = sender as Button;
var exampleItem = button.DataContext as ExampleItem;
var card = sender as Card;
var exampleItem = card.DataContext as ExampleItem;
var window = (Window)Activator.CreateInstance(exampleItem.ViewType);
window.WindowStartupLocation = WindowStartupLocation.CenterOwner;
window.Owner = this;
......@@ -151,5 +151,7 @@ namespace Samples.Views
return border;
}
#endregion
}
}
using System;
using System.Globalization;
using System.Windows.Controls;
namespace Panuon.WPF.UI.Internal.Converters
{
class IconPlacementToDockConverter
: ValueConverterBase
{
public override object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return Enum.Parse(typeof(Dock), value.ToString());
}
}
}
......@@ -27,6 +27,7 @@
<Compile Include="$(MSBuildThisFileDirectory)Converters\CheckBoxGlyphPathStrokeConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Converters\DropDownOffsetConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Converters\GroupBoxHeaderCornerRadiusConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Converters\IconPlacementToDockConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Converters\IsIntLessThanConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Converters\IsIntGreaterThanConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Converters\IsDoubleLessThanConverter.cs" />
......
......@@ -27,6 +27,7 @@
public const string FontSizeMinusConverter = nameof(FontSizeMinusConverter);
public const string GetTypeConverter = nameof(GetTypeConverter);
public const string GroupBoxHeaderCornerRadiusConverter = nameof(GroupBoxHeaderCornerRadiusConverter);
public const string IconPlacementToDockConverter = nameof(IconPlacementToDockConverter);
public const string InternalSpinClassicRenderTransformOriginConverter = nameof(InternalSpinClassicRenderTransformOriginConverter);
public const string IsEnumContainsInSpecificValueConverter = nameof(IsEnumContainsInSpecificValueConverter);
public const string IsItemSeparatorShallVisibleControlConverter = nameof(IsItemSeparatorShallVisibleControlConverter);
......
......@@ -25,7 +25,6 @@
<icv:DisplayMemberPathPropertyValueConverter x:Key="{x:Static irs:ConverterKeys.DisplayMemberPathPropertyValueConverter}" />
<icv:DoubleDivideByConverter x:Key="{x:Static rs:ConverterKeys.DoubleDivideByConverter}" />
<icv:DoubleIsConverter x:Key="{x:Static rs:ConverterKeys.DoubleIsConverter}" />
<icv:IsAllDoublesEqualConverter x:Key="{x:Static rs:ConverterKeys.IsAllDoublesEqualConverter}" />
<icv:DoubleToCornerRadiusConverter x:Key="{x:Static irs:ConverterKeys.DoubleToCornerRadiusConverter}" />
<icv:DoubleHalfToCornerRadiusConverter x:Key="{x:Static irs:ConverterKeys.DoubleHalfToCornerRadiusConverter}" />
<icv:DoubleToGridLengthConverter x:Key="{x:Static rs:ConverterKeys.DoubleToGridLengthConverter}" />
......@@ -46,7 +45,9 @@
<icv:GetTypeConverter x:Key="{x:Static irs:ConverterKeys.GetTypeConverter}" />
<icv:GetEnumDescriptionConverter x:Key="{x:Static rs:ConverterKeys.GetEnumDescriptionConverter}" />
<icv:GroupBoxHeaderCornerRadiusConverter x:Key="{x:Static irs:ConverterKeys.GroupBoxHeaderCornerRadiusConverter}" />
<icv:IconPlacementToDockConverter x:Key="{x:Static irs:ConverterKeys.IconPlacementToDockConverter}" />
<icv:IntDivideByConverter x:Key="{x:Static rs:ConverterKeys.IntDivideByConverter}" />
<icv:IsAllDoublesEqualConverter x:Key="{x:Static rs:ConverterKeys.IsAllDoublesEqualConverter}" />
<icv:IsDoubleEqualToConverter x:Key="{x:Static rs:ConverterKeys.IsDoubleEqualToConverter}" />
<icv:IsDoubleGreaterThanConverter x:Key="{x:Static rs:ConverterKeys.IsDoubleGreaterThanConverter}" />
<icv:IsDoubleLessThanConverter x:Key="{x:Static rs:ConverterKeys.IsDoubleLessThanConverter}" />
......
......@@ -45,6 +45,7 @@
public const string ListViewScrollViewerTemplate = nameof(ListViewScrollViewerTemplate);
public const string ListViewTemplate = nameof(ListViewTemplate);
public const string ListViewItemTemplate = nameof(ListViewItemTemplate);
public const string ListViewItemNullViewTemplate = nameof(ListViewItemNullViewTemplate);
public const string MenuTemplate = nameof(MenuTemplate);
public const string MenuItemTopLevelTemplate = nameof(MenuItemTopLevelTemplate);
public const string MenuItemSubmenuTemplate = nameof(MenuItemSubmenuTemplate);
......@@ -57,7 +58,7 @@
public const string PaginationItemTemplate = nameof(PaginationItemTemplate);
public const string PaginationItemOmittingTemplate = nameof(PaginationItemOmittingTemplate);
public const string PasswordBoxTemplate = nameof(PasswordBoxTemplate);
public const string PasswordBoxClearableTemplate = nameof(PasswordBoxClearableTemplate);
public const string PasswordBoxClearableAndPlainableTemplate = nameof(PasswordBoxClearableAndPlainableTemplate);
public const string ProgressBarTemplate = nameof(ProgressBarTemplate);
public const string ProgressBarIndeterminateTemplate = nameof(ProgressBarIndeterminateTemplate);
public const string RadioButtonTemplate = nameof(RadioButtonTemplate);
......
......@@ -35,6 +35,10 @@
Value="0,0,5,0" />
<Setter Property="local:IconHelper.Foreground"
Value="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource Self}, Mode=OneWay}" />
<Setter Property="local:ButtonHelper.HoverBackground"
Value="{Binding Background, Converter={StaticResource {x:Static irs:ConverterKeys.LightenSolidColorBrushConverter}}, ConverterParameter=0.8, RelativeSource={RelativeSource Self}, Mode=OneWay}" />
<Setter Property="local:ButtonHelper.ClickBackground"
Value="{Binding Background, Converter={StaticResource {x:Static irs:ConverterKeys.LightenSolidColorBrushConverter}}, ConverterParameter=0.6, RelativeSource={RelativeSource Self}, Mode=OneWay}" />
<Setter Property="local:ButtonHelper.PendingSpinStyle"
Value="{StaticResource {ComponentResourceKey ResourceId=PendingSpinStyleKey, TypeInTargetAssembly={x:Type local:ButtonHelper}}}" />
<Setter Property="Padding"
......
......@@ -129,7 +129,7 @@
<Setter Property="Background"
Value="White" />
<Setter Property="BorderBrush"
Value="LightGray" />
Value="Gray" />
<Setter Property="BorderThickness"
Value="1" />
<Setter Property="DefaultColor"
......
......@@ -119,7 +119,7 @@
<Setter Property="local:IconHelper.Foreground"
Value="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource Self}, Mode=OneWay}" />
<Setter Property="local:IconHelper.Margin"
Value="10,0,0,0" />
Value="7,0,0,0" />
<Setter Property="local:IconHelper.VerticalAlignment"
Value="Center" />
<Setter Property="local:IconHelper.HorizontalAlignment"
......
......@@ -171,7 +171,7 @@
<Setter Property="local:IconHelper.Foreground"
Value="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource Self}, Mode=OneWay}" />
<Setter Property="local:IconHelper.Margin"
Value="10,0,0,0" />
Value="7,0,0,0" />
<Setter Property="local:IconHelper.VerticalAlignment"
Value="Center" />
<Setter Property="local:IconHelper.HorizontalAlignment"
......@@ -207,7 +207,7 @@
<Setter Property="Background"
Value="White" />
<Setter Property="BorderBrush"
Value="LightGray" />
Value="Gray" />
<Setter Property="BorderThickness"
Value="1" />
<Setter Property="DateTimeSeparatorBrush"
......@@ -217,7 +217,7 @@
<Setter Property="DateTimeSeparatorVisibility"
Value="Visible" />
<Setter Property="Padding"
Value="5,0,0,0" />
Value="5,0" />
<Setter Property="WatermarkForeground"
Value="{Binding Path=(i:VisualStateHelper.Foreground), Converter={StaticResource {x:Static irs:ConverterKeys.BrushOpacityConverter}}, ConverterParameter=0.8, RelativeSource={RelativeSource Self}, Mode=OneWay}" />
<Setter Property="ItemsForeground"
......
......@@ -94,6 +94,11 @@
<Setter Property="Template"
Value="{StaticResource {x:Static irs:TemplateKeys.ListViewItemTemplate}}" />
<Style.Triggers>
<DataTrigger Binding="{Binding View, RelativeSource={RelativeSource AncestorType=ListView}, Mode=OneWay}"
Value="{x:Null}">
<Setter Property="Template"
Value="{StaticResource {x:Static irs:TemplateKeys.ListViewItemNullViewTemplate}}" />
</DataTrigger>
<Trigger Property="IsEnabled"
Value="False">
<Setter Property="Opacity"
......
......@@ -32,7 +32,9 @@
<Setter Property="local:ListViewHelper.Hook"
Value="True" />
<Setter Property="local:ListViewHelper.ColumnHeaderHorizontalContentAlignment"
Value="Left" />
Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource Self}, Mode=OneWay}" />
<Setter Property="local:ListViewHelper.ColumnHeaderVerticalContentAlignment"
Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource Self}, Mode=OneWay}" />
<Setter Property="local:ListViewHelper.ColumnHeaderVerticalContentAlignment"
Value="Center" />
<Setter Property="local:ListViewHelper.ColumnHeaderPadding"
......@@ -42,7 +44,7 @@
<Setter Property="local:ListViewHelper.ColumnHeaderForeground"
Value="{Binding Foreground, RelativeSource={RelativeSource Self}, Mode=OneWay}" />
<Setter Property="local:ListViewHelper.ColumnHeaderHeight"
Value="35" />
Value="NaN" />
<Setter Property="local:ListViewHelper.ColumnHeaderSeparatorVisibility"
Value="Visible" />
<Setter Property="local:ListViewHelper.ColumnHeaderSeparatorBrush"
......@@ -55,6 +57,8 @@
Value="#FCFCFC" />
<Setter Property="local:ListViewHelper.ColumnHeaderClickBackground"
Value="#FAFAFA" />
<Setter Property="local:ListViewHelper.ColumnHeaderPadding"
Value="10, 8" />
<Setter Property="local:ListViewHelper.ResizeThumbThickness"
Value="3" />
<Setter Property="local:ListViewHelper.ItemsHoverBackground"
......@@ -69,6 +73,8 @@
Value="0" />
<Setter Property="local:ListViewHelper.ItemsHeight"
Value="35" />
<Setter Property="local:ListViewHelper.ItemsPadding"
Value="{Binding Padding, RelativeSource={RelativeSource Self}, Mode=OneWay}" />
<Setter Property="local:ListBoxHelper.ItemsSeparatorBrush"
Value="#F1F1F1" />
<Setter Property="local:ListViewHelper.ItemsSeparatorThickness"
......
......@@ -39,7 +39,6 @@
Value="{Binding Path=(local:IconHelper.FontSize), RelativeSource={RelativeSource AncestorType=Menu}, Mode=OneWay}" />
<Setter Property="local:IconHelper.FontFamily"
Value="{Binding Path=(local:IconHelper.FontFamily), RelativeSource={RelativeSource AncestorType=Menu}, Mode=OneWay}" />
<Style.Triggers>
<Trigger Property="Role"
Value="TopLevelHeader">
......
......@@ -47,7 +47,7 @@
<Setter Property="local:MenuHelper.TopLevelItemsPadding"
Value="10,0" />
<Setter Property="local:MenuHelper.TopLevelItemsHeight"
Value="{Binding Height, RelativeSource={RelativeSource Self}, Mode=OneWay}" />
Value="30" />
<Setter Property="local:MenuHelper.TopLevelItemsWidth"
Value="NaN" />
<Setter Property="local:MenuHelper.TopLevelItemsBackground"
......
......@@ -45,6 +45,8 @@
Value="{Binding ItemsHorizontalContentAlignment, RelativeSource={RelativeSource AncestorType=local:MultiComboBox}, Mode=OneWay}" />
<Setter Property="VerticalContentAlignment"
Value="{Binding ItemsVerticalContentAlignment, RelativeSource={RelativeSource AncestorType=local:MultiComboBox}, Mode=OneWay}" />
<Setter Property="Icon"
Value="{Binding ItemsIcon, RelativeSource={RelativeSource AncestorType=local:MultiComboBox}, Mode=OneWay}" />
<Setter Property="CornerRadius"
Value="{Binding ItemsCornerRadius, RelativeSource={RelativeSource AncestorType=local:MultiComboBox}, Mode=OneWay}" />
<Setter Property="CheckBoxVisibility"
......
......@@ -14,12 +14,14 @@
<core:SharedResourceDictionary Source="pack://application:,,,/Panuon.WPF.UI;component/Templates/MultiComboBoxTemplate.xaml" />
</ResourceDictionary.MergedDictionaries>
<Style x:Key="{ComponentResourceKey ResourceId=CheckBoxStyleKey, TypeInTargetAssembly={x:Type local:MultiComboBox}}"
TargetType="CheckBox"
BasedOn="{StaticResource {x:Static rs:StyleKeys.CheckBoxStyle}}">
<Setter Property="Margin"
Value="0,0,5,0" />
</Style>
<DataTemplate x:Key="{ComponentResourceKey ResourceId=CheckedIconTemplateKey, TypeInTargetAssembly={x:Type local:MultiComboBox}}">
<TextBlock Text="&#xe92e;"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType=ContentControl}, Mode=OneWay}"
FontSize="{Binding Path=(local:IconHelper.FontSize), RelativeSource={RelativeSource AncestorType=local:MultiComboBoxItem}, Mode=OneWay}"
FontFamily="/Panuon.WPF.UI;component/Resources/Fonts/#PanuonIcon" />
</DataTemplate>
<Style x:Key="{ComponentResourceKey ResourceId=ClearButtonStyleKey, TypeInTargetAssembly={x:Type local:MultiComboBox}}"
TargetType="Button"
......@@ -120,7 +122,7 @@
<Setter Property="local:IconHelper.Foreground"
Value="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource Self}, Mode=OneWay}" />
<Setter Property="local:IconHelper.Margin"
Value="10,0,0,0" />
Value="7,0,0,0" />
<Setter Property="local:IconHelper.VerticalAlignment"
Value="Center" />
<Setter Property="local:IconHelper.HorizontalAlignment"
......@@ -152,7 +154,7 @@
<Setter Property="ItemsHeight"
Value="{Binding ActualHeight, RelativeSource={RelativeSource Self}, Mode=OneWay}" />
<Setter Property="ItemsPadding"
Value="10,0" />
Value="5,0" />
<Setter Property="ItemsForeground"
Value="{Binding Foreground, RelativeSource={RelativeSource Self}, Mode=OneWay}" />
<Setter Property="ItemsBackground"
......@@ -169,8 +171,8 @@
Value="Collapsed" />
<Setter Property="SelectionBoxItemLabelStyle"
Value="{StaticResource {ComponentResourceKey ResourceId=SelectionBoxItemLabelStyleKey, TypeInTargetAssembly={x:Type local:MultiComboBox}}}" />
<Setter Property="CheckBoxStyle"
Value="{StaticResource {ComponentResourceKey ResourceId=CheckBoxStyleKey, TypeInTargetAssembly={x:Type local:MultiComboBox}}}" />
<Setter Property="CheckedIconTemplate"
Value="{StaticResource {ComponentResourceKey ResourceId=CheckedIconTemplateKey, TypeInTargetAssembly={x:Type local:MultiComboBox}}}" />
<Setter Property="ClearButtonStyle"
Value="{StaticResource {ComponentResourceKey ResourceId=ClearButtonStyleKey, TypeInTargetAssembly={x:Type local:MultiComboBox}}}" />
<Setter Property="RemoveButtonStyle"
......
......@@ -82,7 +82,7 @@
<Setter Property="local:IconHelper.Foreground"
Value="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource Self}, Mode=OneWay}" />
<Setter Property="local:IconHelper.Margin"
Value="10,0,0,0" />
Value="7,0,0,0" />
<Setter Property="local:IconHelper.VerticalAlignment"
Value="Center" />
<Setter Property="local:IconHelper.HorizontalAlignment"
......@@ -100,12 +100,22 @@
<Setter Property="HorizontalContentAlignment"
Value="Stretch" />
<Setter Property="Padding"
Value="3,0" />
Value="5,0" />
<Setter Property="CaretBrush"
Value="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource Self}, Mode=OneWay}" />
<Setter Property="Template"
Value="{StaticResource {x:Static irs:TemplateKeys.PasswordBoxTemplate}}" />
Value="{StaticResource {x:Static irs:TemplateKeys.PasswordBoxClearableAndPlainableTemplate}}" />
<Style.Triggers>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="local:PasswordBoxHelper.ClearButtonVisibility"
Value="Collapsed" />
<Condition Property="local:PasswordBoxHelper.PlainButtonVisibility"
Value="Collapsed" />
</MultiTrigger.Conditions>
<Setter Property="Template"
Value="{StaticResource {x:Static irs:TemplateKeys.PasswordBoxTemplate}}" />
</MultiTrigger>
<Trigger Property="IsEnabled"
Value="False">
<Setter Property="Opacity"
......
......@@ -50,7 +50,7 @@
<Setter Property="InputMethod.IsInputMethodEnabled"
Value="False" />
<Setter Property="local:IconHelper.Margin"
Value="10,0,0,0" />
Value="7,0,0,0" />
<Setter Property="local:IconHelper.VerticalAlignment"
Value="Center" />
<Setter Property="local:IconHelper.HorizontalAlignment"
......
......@@ -17,8 +17,8 @@
BorderBrush="{TemplateBinding WaveBrush}"
BorderThickness="{TemplateBinding WaveThickness}"
CornerRadius="{TemplateBinding CornerRadius}"
Width="{Binding ActualWidth, ElementName=CcMain}"
Height="{Binding ActualHeight, ElementName=CcMain}"
Width="{Binding ActualWidth, ElementName=BdrContainer}"
Height="{Binding ActualHeight, ElementName=BdrContainer}"
RenderTransformOrigin="0.5,0.5">
<Border.RenderTransform>
<ScaleTransform ScaleX="1"
......@@ -26,24 +26,20 @@
</Border.RenderTransform>
</Border>
</Canvas>
<local:ContentControlX x:Name="CcMain"
i:VisualStateHelper.IsClickEffectPressed="{Binding IsPressed, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{Binding Path=(i:VisualStateHelper.BorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}}"
Padding="{TemplateBinding Padding}"
CornerRadius="{Binding Path=(i:VisualStateHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}">
<Border x:Name="BdrContainer"
i:VisualStateHelper.IsClickEffectPressed="{Binding IsPressed, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{Binding Path=(i:VisualStateHelper.BorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CornerRadius="{Binding Path=(i:VisualStateHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Padding="{TemplateBinding Padding}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<ContentPresenter Grid.Column="1"
Focusable="False"
RecognizesAccessKey="True"
VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</local:ContentControlX>
</Border>
</Grid>
<ControlTemplate.Triggers>
<MultiDataTrigger>
......@@ -53,7 +49,7 @@
<Condition Binding="{Binding ClickBackground, Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="Background"
Value="{Binding ClickBackground, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -64,7 +60,7 @@
<Condition Binding="{Binding ClickBorderBrush, Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="BorderBrush"
Value="{Binding ClickBorderBrush, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -75,7 +71,7 @@
<Condition Binding="{Binding ClickBorderThickness, Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="BorderThickness"
Value="{Binding ClickBorderThickness, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -86,11 +82,11 @@
<Condition Binding="{Binding ClickForeground, Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
Property="IconForeground"
<Setter TargetName="DockContainer"
Property="TextElement.Foreground"
Value="{Binding ClickForeground, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Setter TargetName="CcMain"
Property="Foreground"
<Setter TargetName="DockContainer"
Property="TextBlock.Foreground"
Value="{Binding ClickForeground, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
<MultiDataTrigger>
......@@ -100,7 +96,7 @@
<Condition Binding="{Binding ClickCornerRadius, Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="CornerRadius"
Value="{Binding ClickCornerRadius, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......
......@@ -16,22 +16,28 @@
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<local:ContentControlX x:Name="CcMain"
i:VisualStateHelper.IsClickEffectPressed="{Binding IsPressed, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{TemplateBinding BorderThickness}"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}}"
Icon="{TemplateBinding Icon}"
Padding="{TemplateBinding Padding}"
CornerRadius="{TemplateBinding CornerRadius}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}">
<ContentPresenter Focusable="False"
RecognizesAccessKey="True" />
</local:ContentControlX>
<Border x:Name="BdrContainer"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{Binding Path=(i:VisualStateHelper.BorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CornerRadius="{Binding Path=(i:VisualStateHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Padding="{TemplateBinding Padding}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<DockPanel x:Name="DockContainer"
TextElement.Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
TextBlock.Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
<i:IconPresenter x:Name="IpIcon"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Content="{Binding Icon, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<ContentPresenter VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Focusable="False"
RecognizesAccessKey="True" />
</DockPanel>
</Border>
<ContentControl x:Name="CcSeparator"
Grid.Column="1"
Margin="{TemplateBinding SeparatorMargin}"
......@@ -46,7 +52,7 @@
<Condition Binding="{Binding ClickBackground, Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="Background"
Value="{Binding ClickBackground, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -57,7 +63,7 @@
<Condition Binding="{Binding ClickBorderBrush, Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="BorderBrush"
Value="{Binding ClickBorderBrush, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -68,12 +74,15 @@
<Condition Binding="{Binding ClickForeground, Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
Property="IconForeground"
Value="{Binding ClickForeground, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Setter TargetName="CcMain"
<Setter TargetName="IpIcon"
Property="Foreground"
Value="{Binding ClickForeground, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Setter TargetName="DockContainer"
Property="TextBlock.Foreground"
Value="{Binding ClickForeground, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Setter TargetName="DockContainer"
Property="TextElement.Foreground"
Value="{Binding ClickForeground, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
<DataTrigger Value="False">
<DataTrigger.Binding>
......
......@@ -11,20 +11,16 @@
<ControlTemplate x:Key="{x:Static irs:TemplateKeys.BreadcrumbTemplate}"
TargetType="local:Breadcrumb">
<local:ContentControlX x:Name="CcMain"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Foreground="{TemplateBinding Foreground}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}}"
Padding="{TemplateBinding Padding}"
CornerRadius="{TemplateBinding CornerRadius}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}">
<Border x:Name="BdrContainer"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{Binding Path=(i:VisualStateHelper.BorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CornerRadius="{Binding Path=(i:VisualStateHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Padding="{TemplateBinding Padding}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<ItemsPresenter />
</local:ContentControlX>
</Border>
</ControlTemplate>
</ResourceDictionary>
\ No newline at end of file
......@@ -11,36 +11,31 @@
<ControlTemplate x:Key="{x:Static irs:TemplateKeys.ButtonPendingTemplate}"
TargetType="Button">
<local:ContentControlX x:Name="CcMain"
i:VisualStateHelper.IsClickEffectPressed="{Binding IsPressed, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{Binding Path=(i:VisualStateHelper.BorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CornerRadius="{Binding Path=(i:VisualStateHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}}"
IconPlacement="{Binding Path=(local:ButtonHelper.IconPlacement), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Padding="{TemplateBinding Padding}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Border x:Name="BdrContainer"
i:VisualStateHelper.IsClickEffectPressed="{Binding IsPressed, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{Binding Path=(i:VisualStateHelper.BorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CornerRadius="{Binding Path=(i:VisualStateHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Padding="{TemplateBinding Padding}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<DockPanel x:Name="DockContainer"
TextElement.Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
TextBlock.Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
<local:Spin x:Name="SprPending"
IsSpinning="True"
Style="{Binding Path=(local:ButtonHelper.PendingSpinStyle), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<ContentPresenter Grid.Column="1"
Focusable="False"
DockPanel.Dock="{Binding Path=(local:ButtonHelper.IconPlacement), Converter={StaticResource {x:Static irs:ConverterKeys.IconPlacementToDockConverter}}, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
IsSpinning="True"
Style="{Binding Path=(local:ButtonHelper.PendingSpinStyle), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<ContentPresenter Focusable="False"
RecognizesAccessKey="True"
VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</Grid>
</local:ContentControlX>
</DockPanel>
</Border>
<ControlTemplate.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
......@@ -49,7 +44,7 @@
<Condition Binding="{Binding Path=(local:ButtonHelper.ClickBackground), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="Background"
Value="{Binding Path=(local:ButtonHelper.ClickBackground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -60,7 +55,7 @@
<Condition Binding="{Binding Path=(local:ButtonHelper.ClickBorderBrush), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="BorderBrush"
Value="{Binding Path=(local:ButtonHelper.ClickBorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -71,7 +66,7 @@
<Condition Binding="{Binding Path=(local:ButtonHelper.ClickBorderThickness), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="BorderThickness"
Value="{Binding Path=(local:ButtonHelper.ClickBorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -82,11 +77,14 @@
<Condition Binding="{Binding Path=(local:ButtonHelper.ClickForeground), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
Property="IconForeground"
<Setter TargetName="SprPending"
Property="GlyphBrush"
Value="{Binding Path=(local:ButtonHelper.ClickForeground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Setter TargetName="CcMain"
Property="Foreground"
<Setter TargetName="DockContainer"
Property="TextElement.Foreground"
Value="{Binding Path=(local:ButtonHelper.ClickForeground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Setter TargetName="DockContainer"
Property="TextBlock.Foreground"
Value="{Binding Path=(local:ButtonHelper.ClickForeground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
<MultiDataTrigger>
......@@ -96,7 +94,7 @@
<Condition Binding="{Binding Path=(local:ButtonHelper.ClickCornerRadius), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="CornerRadius"
Value="{Binding Path=(local:ButtonHelper.ClickCornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -105,23 +103,30 @@
<ControlTemplate x:Key="{x:Static irs:TemplateKeys.ButtonTemplate}"
TargetType="Button">
<local:ContentControlX x:Name="CcMain"
i:VisualStateHelper.IsClickEffectPressed="{Binding IsPressed, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{Binding Path=(i:VisualStateHelper.BorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CornerRadius="{Binding Path=(i:VisualStateHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}}"
Icon="{Binding Path=(local:ButtonHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
IconPlacement="{Binding Path=(local:ButtonHelper.IconPlacement), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Padding="{TemplateBinding Padding}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}">
<ContentPresenter Focusable="False"
RecognizesAccessKey="True" />
</local:ContentControlX>
<Border x:Name="BdrContainer"
i:VisualStateHelper.IsClickEffectPressed="{Binding IsPressed, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{Binding Path=(i:VisualStateHelper.BorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CornerRadius="{Binding Path=(i:VisualStateHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Padding="{TemplateBinding Padding}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<DockPanel x:Name="DockContainer"
TextElement.Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
TextBlock.Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
<i:IconPresenter x:Name="IpIcon"
DockPanel.Dock="{Binding Path=(local:ButtonHelper.IconPlacement), Converter={StaticResource {x:Static irs:ConverterKeys.IconPlacementToDockConverter}}, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Content="{Binding Path=(local:ButtonHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<ContentPresenter VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Focusable="False"
RecognizesAccessKey="True" />
</DockPanel>
</Border>
<ControlTemplate.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
......@@ -130,7 +135,7 @@
<Condition Binding="{Binding Path=(local:ButtonHelper.ClickBackground), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="Background"
Value="{Binding Path=(local:ButtonHelper.ClickBackground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -141,7 +146,7 @@
<Condition Binding="{Binding Path=(local:ButtonHelper.ClickBorderBrush), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="BorderBrush"
Value="{Binding Path=(local:ButtonHelper.ClickBorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -152,7 +157,7 @@
<Condition Binding="{Binding Path=(local:ButtonHelper.ClickBorderThickness), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="BorderThickness"
Value="{Binding Path=(local:ButtonHelper.ClickBorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -163,12 +168,15 @@
<Condition Binding="{Binding Path=(local:ButtonHelper.ClickForeground), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
Property="IconForeground"
Value="{Binding Path=(local:ButtonHelper.ClickForeground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Setter TargetName="CcMain"
<Setter TargetName="IpIcon"
Property="Foreground"
Value="{Binding Path=(local:ButtonHelper.ClickForeground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Setter TargetName="DockContainer"
Property="TextElement.Foreground"
Value="{Binding Path=(local:ButtonHelper.ClickForeground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Setter TargetName="DockContainer"
Property="TextBlock.Foreground"
Value="{Binding Path=(local:ButtonHelper.ClickForeground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
......@@ -177,7 +185,7 @@
<Condition Binding="{Binding Path=(local:ButtonHelper.ClickCornerRadius), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="CornerRadius"
Value="{Binding Path=(local:ButtonHelper.ClickCornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......
......@@ -11,16 +11,15 @@
<ControlTemplate x:Key="{x:Static irs:TemplateKeys.CalendarXItemTemplate}"
TargetType="local:CalendarXItem">
<local:ContentControlX x:Name="CcMain"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}}"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{Binding Path=(i:VisualStateHelper.BorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CornerRadius="{Binding Path=(i:VisualStateHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<Border x:Name="BdrContainer"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{Binding Path=(i:VisualStateHelper.BorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CornerRadius="{Binding Path=(i:VisualStateHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Padding="{TemplateBinding Padding}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<Grid>
<ContentControl Visibility="{Binding IsSpecialDay, Converter={StaticResource {x:Static rs:ConverterKeys.FalseToCollapseConverter}}, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
<ContentControl Visibility="{Binding IsSpecialDay, Converter={StaticResource {x:Static rs:ConverterKeys.FalseToCollapseConverter}}, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Content="{TemplateBinding DateTime}"
ContentTemplate="{TemplateBinding SpecialDayHighlightTemplate}" />
<ContentPresenter Focusable="False"
......@@ -29,7 +28,7 @@
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
</Grid>
</local:ContentControlX>
</Border>
<ControlTemplate.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
......@@ -38,7 +37,7 @@
<Condition Binding="{Binding CheckedBackground, Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="Background"
Value="{Binding CheckedBackground, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -49,7 +48,7 @@
<Condition Binding="{Binding CheckedBorderBrush, Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="BorderBrush"
Value="{Binding CheckedBorderBrush, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -60,7 +59,7 @@
<Condition Binding="{Binding CheckedCornerRadius, Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="CornerRadius"
Value="{Binding CheckedCornerRadius, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -71,11 +70,11 @@
<Condition Binding="{Binding CheckedForeground, Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
Property="IconForeground"
<Setter TargetName="BdrContainer"
Property="TextElement.Foreground"
Value="{Binding CheckedForeground, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Setter TargetName="CcMain"
Property="Foreground"
<Setter TargetName="BdrContainer"
Property="TextBlock.Foreground"
Value="{Binding CheckedForeground, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
</ControlTemplate.Triggers>
......
......@@ -11,15 +11,13 @@
<ControlTemplate x:Key="{x:Static irs:TemplateKeys.CalendarXTemplate}"
TargetType="local:CalendarX">
<local:ContentControlX x:Name="CcMain"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{TemplateBinding BorderThickness}"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}}"
Padding="{TemplateBinding Padding}"
CornerRadius="{TemplateBinding CornerRadius}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<Border x:Name="BdrContainer"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding ItemsBorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}"
Padding="{TemplateBinding Padding}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="{Binding HeaderHeight, Converter={StaticResource {x:Static rs:ConverterKeys.DoubleToGridLengthConverter}}, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
......@@ -96,7 +94,7 @@
CalendarXItemStyle="{TemplateBinding ItemContainerStyle}" />
</local:CarouselPanel>
</Grid>
</local:ContentControlX>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="CurrentPanel"
Value="2">
......
......@@ -11,22 +11,21 @@
<ControlTemplate x:Key="{x:Static irs:TemplateKeys.CardTemplate}"
TargetType="local:Card">
<local:ContentControlX x:Name="CcMain"
i:VisualStateHelper.IsClickEffectPressed="{Binding IsPressed, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{TemplateBinding BorderThickness}"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}}"
Padding="{TemplateBinding Padding}"
CornerRadius="{TemplateBinding CornerRadius}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}">
<Border x:Name="BdrContainer"
i:VisualStateHelper.IsClickEffectPressed="{Binding IsPressed, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
TextElement.Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
TextBlock.Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{Binding Path=(i:VisualStateHelper.BorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CornerRadius="{Binding Path=(i:VisualStateHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Padding="{TemplateBinding Padding}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<ContentPresenter Focusable="False"
RecognizesAccessKey="True"
VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</local:ContentControlX>
</Border>
<ControlTemplate.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
......@@ -35,7 +34,7 @@
<Condition Binding="{Binding ClickBackground, Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="Background"
Value="{Binding ClickBackground, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -46,7 +45,7 @@
<Condition Binding="{Binding ClickBorderBrush, Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="BorderBrush"
Value="{Binding ClickBorderBrush, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -57,7 +56,7 @@
<Condition Binding="{Binding ClickBorderThickness, Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="BorderThickness"
Value="{Binding ClickBorderThickness, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -68,12 +67,12 @@
<Condition Binding="{Binding ClickForeground, Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
Property="IconForeground"
Value="{Binding ClickForeground, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Setter TargetName="CcMain"
Property="Foreground"
Value="{Binding ClickForeground, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Setter TargetName="BdrContainer"
Property="TextElement.Foreground"
Value="{Binding Path=(local:ButtonHelper.ClickForeground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Setter TargetName="BdrContainer"
Property="TextBlock.Foreground"
Value="{Binding Path=(local:ButtonHelper.ClickForeground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
</ControlTemplate.Triggers>
......
......@@ -17,15 +17,14 @@
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<local:ContentControlX x:Name="CcBox"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}}"
Height="{Binding Path=(local:CheckBoxHelper.BoxHeight),RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Width="{Binding Path=(local:CheckBoxHelper.BoxWidth),RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{Binding Path=(i:VisualStateHelper.BorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CornerRadius="{Binding Path=(i:VisualStateHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<Border x:Name="BdrBox"
Height="{Binding Path=(local:CheckBoxHelper.BoxHeight),RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Width="{Binding Path=(local:CheckBoxHelper.BoxWidth),RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{Binding Path=(i:VisualStateHelper.BorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CornerRadius="{Binding Path=(i:VisualStateHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<Grid>
<Path Visibility="{Binding IsChecked, Converter={StaticResource {x:Static rs:ConverterKeys.NullToCollapseConverter}}, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
StrokeThickness="{Binding Path=(local:CheckBoxHelper.GlyphThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
......@@ -61,7 +60,7 @@
Width="{Binding Path=(local:CheckBoxHelper.BoxWidth), Converter={StaticResource {x:Static rs:ConverterKeys.DoubleDivideByConverter}}, ConverterParameter=2, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Height="{Binding Path=(local:CheckBoxHelper.BoxHeight), Converter={StaticResource {x:Static rs:ConverterKeys.DoubleDivideByConverter}}, ConverterParameter=2, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</Grid>
</local:ContentControlX>
</Border>
<ContentControl x:Name="CpContent"
Grid.Column="1"
Content="{TemplateBinding Content}"
......@@ -75,13 +74,13 @@
<ControlTemplate.Triggers>
<Trigger Property="local:CheckBoxHelper.ContentPlacement"
Value="Left">
<Setter TargetName="CcBox"
<Setter TargetName="BdrBox"
Property="Grid.Column"
Value="2" />
</Trigger>
<Trigger Property="local:CheckBoxHelper.ContentPlacement"
Value="Right">
<Setter TargetName="CcBox"
<Setter TargetName="BdrBox"
Property="Grid.Column"
Value="0" />
</Trigger>
......@@ -103,7 +102,7 @@
<Condition Binding="{Binding Path=(local:CheckBoxHelper.CheckedBackground), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcBox"
<Setter TargetName="BdrBox"
Property="Background"
Value="{Binding Path=(local:CheckBoxHelper.CheckedBackground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -114,7 +113,7 @@
<Condition Binding="{Binding Path=(local:CheckBoxHelper.CheckedBorderBrush), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcBox"
<Setter TargetName="BdrBox"
Property="BorderBrush"
Value="{Binding Path=(local:CheckBoxHelper.CheckedBorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -125,7 +124,7 @@
<Condition Binding="{Binding Path=(local:CheckBoxHelper.CheckedBorderThickness), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcBox"
<Setter TargetName="BdrBox"
Property="BorderThickness"
Value="{Binding Path=(local:CheckBoxHelper.CheckedBorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -150,7 +149,7 @@
<Condition Binding="{Binding Path=(local:CheckBoxHelper.CheckedCornerRadius), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcBox"
<Setter TargetName="BdrBox"
Property="CornerRadius"
Value="{Binding Path=(local:CheckBoxHelper.CheckedCornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -161,7 +160,7 @@
<Condition Binding="{Binding Path=(local:CheckBoxHelper.NullBackground), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcBox"
<Setter TargetName="BdrBox"
Property="Background"
Value="{Binding Path=(local:CheckBoxHelper.NullBackground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -172,7 +171,7 @@
<Condition Binding="{Binding Path=(local:CheckBoxHelper.NullBorderBrush), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcBox"
<Setter TargetName="BdrBox"
Property="BorderBrush"
Value="{Binding Path=(local:CheckBoxHelper.NullBorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -183,7 +182,7 @@
<Condition Binding="{Binding Path=(local:CheckBoxHelper.NullBorderThickness), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcBox"
<Setter TargetName="BdrBox"
Property="BorderThickness"
Value="{Binding Path=(local:CheckBoxHelper.NullBorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......
......@@ -16,111 +16,121 @@
<its:WatermarkTemplateSelector x:Key="WatermarkTemplateSelector" />
</ControlTemplate.Resources>
<Grid>
<local:ContentControlX x:Name="CcMain"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}}"
Padding="{TemplateBinding Padding}"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource AncestorType=local:ColorPicker}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource AncestorType=local:ColorPicker}, Mode=OneWay}"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource AncestorType=local:ColorPicker}, Mode=OneWay}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource AncestorType=local:ColorPicker}, Mode=OneWay}"
Icon="{TemplateBinding Icon}">
<ToggleButton Focusable="False"
IsChecked="{Binding IsDropDownOpen, RelativeSource={RelativeSource AncestorType=local:ColorPicker}, Mode=TwoWay}">
<ToggleButton.Style>
<Style TargetType="ToggleButton">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ToggleButton">
<Border Background="Transparent">
<ContentPresenter />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ToggleButton.Style>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<ContentControl ContentTemplate="{TemplateBinding PreviewTemplate}">
<ContentControl.Content>
<MultiBinding Converter="{StaticResource {x:Static irs:ConverterKeys.TransparentColorToBrushConverter}}">
<Binding Path="ActualWidth"
RelativeSource="{RelativeSource Self}"
Mode="OneWay" />
<Binding Path="ActualHeight"
RelativeSource="{RelativeSource Self}"
Mode="OneWay" />
<Binding Path="SelectedColor"
RelativeSource="{RelativeSource AncestorType=local:ColorPicker}"
Mode="OneWay" />
<Binding Path="BorderBrush"
RelativeSource="{RelativeSource AncestorType=local:ColorPicker}"
Mode="OneWay" />
</MultiBinding>
</ContentControl.Content>
</ContentControl>
<Grid Grid.Column="1"
Margin="{TemplateBinding Padding}">
<TextBlock IsHitTestVisible="False"
Visibility="{Binding IsEditable, Converter={StaticResource {x:Static rs:ConverterKeys.TrueToCollapseConverter}}, RelativeSource={RelativeSource AncestorType=local:ColorPicker}, Mode=OneWay}"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource AncestorType=local:ColorPicker}, Mode=OneWay}"
Text="{Binding Text, RelativeSource={RelativeSource AncestorType=local:ColorPicker}, Mode=OneWay}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
<ContentControl Margin="2,0,0,0"
IsHitTestVisible="False"
Focusable="False"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Visibility="{Binding Text, Converter={StaticResource {x:Static rs:ConverterKeys.StringNonnullAndNotEmptyToCollapseConverter}},RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}"
Content="{TemplateBinding Watermark}"
ContentTemplateSelector="{StaticResource WatermarkTemplateSelector}"
Foreground="{Binding Path=(i:VisualStateHelper.WatermarkForeground),RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<TextBox x:Name="PART_EditableTextBox"
Focusable="True"
CaretBrush="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource AncestorType=local:ColorPicker}, Mode=OneWay}"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource AncestorType=local:ColorPicker}, Mode=OneWay}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Visibility="{Binding IsEditable, Converter={StaticResource {x:Static rs:ConverterKeys.FalseToCollapseConverter}}, RelativeSource={RelativeSource AncestorType=local:ColorPicker}, Mode=OneWay}">
<TextBox.Style>
<Style TargetType="TextBox">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TextBox">
<Border x:Name="PART_ContentHost"
Focusable="False"
Margin="{TemplateBinding Padding}" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</TextBox.Style>
</TextBox>
<Border x:Name="BdrContainer"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{Binding Path=(i:VisualStateHelper.BorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CornerRadius="{Binding Path=(i:VisualStateHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<Grid x:Name="DockContainer"
TextElement.Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
TextBlock.Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition />
</Grid.ColumnDefinitions>
<i:IconPresenter x:Name="IpIcon"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Content="{Binding Icon, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<ToggleButton Grid.Column="1"
Focusable="False"
Padding="{TemplateBinding Padding}"
IsChecked="{Binding IsDropDownOpen, RelativeSource={RelativeSource AncestorType=local:ColorPicker}, Mode=TwoWay}">
<ToggleButton.Style>
<Style TargetType="ToggleButton">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ToggleButton">
<Border Background="Transparent">
<ContentPresenter />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ToggleButton.Style>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<ContentControl ContentTemplate="{TemplateBinding PreviewTemplate}">
<ContentControl.Content>
<MultiBinding Converter="{StaticResource {x:Static irs:ConverterKeys.TransparentColorToBrushConverter}}">
<Binding Path="ActualWidth"
RelativeSource="{RelativeSource Self}"
Mode="OneWay" />
<Binding Path="ActualHeight"
RelativeSource="{RelativeSource Self}"
Mode="OneWay" />
<Binding Path="SelectedColor"
RelativeSource="{RelativeSource AncestorType=local:ColorPicker}"
Mode="OneWay" />
<Binding Path="BorderBrush"
RelativeSource="{RelativeSource AncestorType=local:ColorPicker}"
Mode="OneWay" />
</MultiBinding>
</ContentControl.Content>
</ContentControl>
<Grid Grid.Column="1"
Margin="{TemplateBinding Padding}">
<TextBlock IsHitTestVisible="False"
Visibility="{Binding IsEditable, Converter={StaticResource {x:Static rs:ConverterKeys.TrueToCollapseConverter}}, RelativeSource={RelativeSource AncestorType=local:ColorPicker}, Mode=OneWay}"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource AncestorType=local:ColorPicker}, Mode=OneWay}"
Text="{Binding Text, RelativeSource={RelativeSource AncestorType=local:ColorPicker}, Mode=OneWay}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
<ContentControl Margin="2,0,0,0"
IsHitTestVisible="False"
Focusable="False"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Visibility="{Binding Text, Converter={StaticResource {x:Static rs:ConverterKeys.StringNonnullAndNotEmptyToCollapseConverter}},RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}"
Content="{TemplateBinding Watermark}"
ContentTemplateSelector="{StaticResource WatermarkTemplateSelector}"
Foreground="{Binding Path=(i:VisualStateHelper.WatermarkForeground),RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<TextBox x:Name="PART_EditableTextBox"
Focusable="True"
CaretBrush="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource AncestorType=local:ColorPicker}, Mode=OneWay}"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource AncestorType=local:ColorPicker}, Mode=OneWay}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Visibility="{Binding IsEditable, Converter={StaticResource {x:Static rs:ConverterKeys.FalseToCollapseConverter}}, RelativeSource={RelativeSource AncestorType=local:ColorPicker}, Mode=OneWay}">
<TextBox.Style>
<Style TargetType="TextBox">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TextBox">
<Border x:Name="PART_ContentHost"
Focusable="False"
Margin="{TemplateBinding Padding}" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</TextBox.Style>
</TextBox>
</Grid>
<Button x:Name="BtnClear"
Grid.Column="2"
Visibility="Collapsed"
Style="{TemplateBinding ClearButtonStyle}"
Command="{TemplateBinding ClearCommand}"
CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=local:ColorPicker}}" />
<local:TransformControl Grid.Column="3"
Style="{TemplateBinding ToggleArrowTransformControlStyle}" />
</Grid>
<Button x:Name="BtnClear"
Grid.Column="2"
Visibility="Collapsed"
Style="{TemplateBinding ClearButtonStyle}"
Command="{TemplateBinding ClearCommand}"
CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=local:ColorPicker}}" />
<local:TransformControl Grid.Column="3"
Style="{TemplateBinding ToggleArrowTransformControlStyle}" />
</Grid>
</ToggleButton>
</local:ContentControlX>
</ToggleButton>
</Grid>
</Border>
<local:PopupX x:Name="PART_Popup"
Focusable="False"
AllowsTransparency="True"
IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource AncestorType=local:ColorPicker}, Mode=TwoWay}"
PlacementTarget="{Binding ElementName=CcMain}"
PlacementTarget="{Binding ElementName=BdrContainer}"
Placement="{Binding Path=(local:DropDownHelper.Placement), RelativeSource={RelativeSource AncestorType=local:ColorPicker}, Mode=OneWay}"
PopupAnimation="Fade"
StaysOpen="False">
......
......@@ -8,7 +8,7 @@
<ResourceDictionary.MergedDictionaries>
<core:SharedResourceDictionary Source="pack://application:,,,/Panuon.WPF.UI;component/Resources/Converters.xaml" />
</ResourceDictionary.MergedDictionaries>
<ControlTemplate x:Key="{x:Static irs:TemplateKeys.ComboBoxItemTemplate}"
TargetType="ComboBoxItem">
<Grid>
......@@ -16,21 +16,24 @@
<RowDefinition />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<local:ContentControlX x:Name="CcMain"
Grid.Column="1"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}}"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{Binding Path=(i:VisualStateHelper.BorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CornerRadius="{Binding Path=(i:VisualStateHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Icon="{Binding Path=(local:ComboBoxItemHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
IconWidth="{Binding Path=(local:ComboBoxHelper.ItemsIconWidth), RelativeSource={RelativeSource AncestorType=ComboBox}, Mode=OneWay}"
Padding="{TemplateBinding Padding}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}">
<ContentPresenter />
</local:ContentControlX>
<Border x:Name="BdrContainer"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{Binding Path=(i:VisualStateHelper.BorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CornerRadius="{Binding Path=(i:VisualStateHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<DockPanel x:Name="DockContainer"
TextElement.Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
TextBlock.Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
<i:IconPresenter x:Name="IpIcon"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Content="{Binding Path=(local:ComboBoxItemHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<ContentPresenter Margin="{TemplateBinding Padding}" />
</DockPanel>
</Border>
<Rectangle x:Name="RectSeparator"
Grid.Row="1"
Fill="{Binding Path=(local:ComboBoxItemHelper.SeparatorBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
......@@ -59,7 +62,7 @@
<Condition Binding="{Binding Path=(local:ComboBoxItemHelper.SelectedBackground), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="Background"
Value="{Binding Path=(local:ComboBoxItemHelper.SelectedBackground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -70,11 +73,14 @@
<Condition Binding="{Binding Path=(local:ComboBoxItemHelper.SelectedForeground), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
Property="Foreground"
<Setter TargetName="BdrContainer"
Property="TextElement.Foreground"
Value="{Binding Path=(local:ComboBoxItemHelper.SelectedForeground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Setter TargetName="CcMain"
Property="IconForeground"
<Setter TargetName="BdrContainer"
Property="TextBlock.Foreground"
Value="{Binding Path=(local:ComboBoxItemHelper.SelectedForeground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Setter TargetName="IpIcon"
Property="Foreground"
Value="{Binding Path=(local:ComboBoxItemHelper.SelectedForeground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
<MultiDataTrigger>
......@@ -84,7 +90,7 @@
<Condition Binding="{Binding Path=(local:ComboBoxItemHelper.SelectedBorderBrush), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="BorderBrush"
Value="{Binding Path=(local:ComboBoxItemHelper.SelectedBorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -95,7 +101,7 @@
<Condition Binding="{Binding Path=(local:ComboBoxItemHelper.SelectedBorderThickness), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="BorderThickness"
Value="{Binding Path=(local:ComboBoxItemHelper.SelectedBorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -106,7 +112,7 @@
<Condition Binding="{Binding Path=(local:ComboBoxItemHelper.SelectedCornerRadius), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="CornerRadius"
Value="{Binding Path=(local:ComboBoxItemHelper.SelectedCornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -120,32 +126,37 @@
<RowDefinition />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<local:ContentControlX x:Name="CcMain"
Grid.Column="1"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}}"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{Binding Path=(i:VisualStateHelper.BorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CornerRadius="{Binding Path=(i:VisualStateHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Icon="{Binding Path=(local:ComboBoxItemHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
IconWidth="{Binding Path=(local:ComboBoxHelper.ItemsIconWidth), RelativeSource={RelativeSource AncestorType=ComboBox}, Mode=OneWay}"
Padding="{TemplateBinding Padding}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<ContentPresenter VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
<Button x:Name="BtnRemove"
Grid.Column="2"
Visibility="Hidden"
Style="{Binding Path=(local:ComboBoxHelper.RemoveButtonStyle), RelativeSource={RelativeSource AncestorType=ComboBox}, Mode=OneWay}"
Command="{Binding Path=(local:ComboBoxHelper.RemoveCommand), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</Grid>
</local:ContentControlX>
<Border x:Name="BdrContainer"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{Binding Path=(i:VisualStateHelper.BorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CornerRadius="{Binding Path=(i:VisualStateHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<DockPanel x:Name="DockContainer"
TextElement.Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
TextBlock.Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
<i:IconPresenter x:Name="IpIcon"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Content="{Binding Path=(local:ComboBoxItemHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Grid Margin="{TemplateBinding Padding}">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<ContentPresenter VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
<Button x:Name="BtnRemove"
Grid.Column="2"
Visibility="Hidden"
Style="{Binding Path=(local:ComboBoxHelper.RemoveButtonStyle), RelativeSource={RelativeSource AncestorType=ComboBox}, Mode=OneWay}"
Command="{Binding Path=(local:ComboBoxHelper.RemoveCommand), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</Grid>
</DockPanel>
</Border>
<Rectangle x:Name="RectSeparator"
Grid.Row="1"
Fill="{Binding Path=(local:ComboBoxItemHelper.SeparatorBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
......@@ -174,7 +185,7 @@
<Condition Binding="{Binding Path=(local:ComboBoxItemHelper.SelectedBackground), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="Background"
Value="{Binding Path=(local:ComboBoxItemHelper.SelectedBackground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -185,11 +196,14 @@
<Condition Binding="{Binding Path=(local:ComboBoxItemHelper.SelectedForeground), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
Property="Foreground"
<Setter TargetName="BdrContainer"
Property="TextElement.Foreground"
Value="{Binding Path=(local:ComboBoxItemHelper.SelectedForeground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Setter TargetName="BdrContainer"
Property="TextBlock.Foreground"
Value="{Binding Path=(local:ComboBoxItemHelper.SelectedForeground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Setter TargetName="CcMain"
Property="IconForeground"
<Setter TargetName="IpIcon"
Property="Foreground"
Value="{Binding Path=(local:ComboBoxItemHelper.SelectedForeground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
<MultiDataTrigger>
......@@ -199,7 +213,7 @@
<Condition Binding="{Binding Path=(local:ComboBoxItemHelper.SelectedBorderBrush), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="BorderBrush"
Value="{Binding Path=(local:ComboBoxItemHelper.SelectedBorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -210,7 +224,7 @@
<Condition Binding="{Binding Path=(local:ComboBoxItemHelper.SelectedBorderThickness), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="BorderThickness"
Value="{Binding Path=(local:ComboBoxItemHelper.SelectedBorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -221,11 +235,10 @@
<Condition Binding="{Binding Path=(local:ComboBoxItemHelper.SelectedCornerRadius), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="CornerRadius"
Value="{Binding Path=(local:ComboBoxItemHelper.SelectedCornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
<Trigger Property="local:ComboBoxItemHelper.RemoveButtonVisibility"
Value="Visible">
<Setter TargetName="BtnRemove"
......
......@@ -17,15 +17,14 @@
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid>
<local:ContentControlX x:Name="CcMain"
Grid.Column="1"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}}"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{TemplateBinding BorderThickness}"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CornerRadius="{Binding Path=(local:MenuItemHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<Border x:Name="BdrContainer"
TextElement.Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
TextBlock.Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{Binding Path=(i:VisualStateHelper.BorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CornerRadius="{Binding Path=(i:VisualStateHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
......@@ -65,7 +64,7 @@
Foreground="{Binding Path=(i:VisualStateHelper.Foreground) ,RelativeSource={RelativeSource AncestorType=MenuItem}, Mode=OneWay}"
ContentTemplate="{Binding Path=(local:ContextMenuHelper.ArrowIconTemplate), RelativeSource={RelativeSource AncestorType=ContextMenu}, Mode=OneWay}" />
</Grid>
</local:ContentControlX>
</Border>
<local:PopupX x:Name="popDropDown"
Placement="{Binding Path=(local:DropDownHelper.Placement), RelativeSource={RelativeSource AncestorType=ContextMenu}, Mode=OneWay}"
IsOpen="{Binding IsSubmenuOpen, RelativeSource={RelativeSource AncestorType=MenuItem}, Mode=OneWay}"
......@@ -211,8 +210,11 @@
<Condition Binding="{Binding Path=(local:MenuItemHelper.CheckedForeground), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
Property="Foreground"
<Setter TargetName="BdrContainer"
Property="TextElement.Foreground"
Value="{Binding Path=(local:MenuItemHelper.CheckedForeground), RelativeSource={RelativeSource AncestorType=MenuItem}, Mode=OneWay}" />
<Setter TargetName="BdrContainer"
Property="TextBlock.Foreground"
Value="{Binding Path=(local:MenuItemHelper.CheckedForeground), RelativeSource={RelativeSource AncestorType=MenuItem}, Mode=OneWay}" />
<Setter TargetName="CcChecked"
Property="Foreground"
......@@ -228,7 +230,7 @@
<Condition Binding="{Binding Path=(local:MenuItemHelper.CheckedBackground), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="Background"
Value="{Binding Path=(local:MenuItemHelper.CheckedBackground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -239,7 +241,7 @@
<Condition Binding="{Binding Path=(local:MenuItemHelper.CheckedBorderBrush), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="BorderBrush"
Value="{Binding Path=(local:MenuItemHelper.CheckedBorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -250,7 +252,7 @@
<Condition Binding="{Binding Path=(local:MenuItemHelper.CheckedBorderThickness), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="BorderThickness"
Value="{Binding Path=(local:MenuItemHelper.CheckedBorderThickness), RelativeSource={RelativeSource Self}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -261,8 +263,11 @@
<Condition Binding="{Binding Path=(local:MenuItemHelper.ClickForeground), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
Property="Foreground"
<Setter TargetName="BdrContainer"
Property="TextElement.Foreground"
Value="{Binding Path=(local:MenuItemHelper.ClickForeground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Setter TargetName="BdrContainer"
Property="TextBlock.Foreground"
Value="{Binding Path=(local:MenuItemHelper.ClickForeground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Setter TargetName="CcChecked"
Property="Foreground"
......@@ -278,7 +283,7 @@
<Condition Binding="{Binding Path=(local:MenuItemHelper.ClickBackground), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="Background"
Value="{Binding Path=(local:MenuItemHelper.ClickBackground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -289,7 +294,7 @@
<Condition Binding="{Binding Path=(local:MenuItemHelper.ClickBorderBrush), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="BorderBrush"
Value="{Binding Path=(local:MenuItemHelper.ClickBorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -300,8 +305,11 @@
<Condition Binding="{Binding Path=(local:MenuItemHelper.OpenedForeground), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
Property="Foreground"
<Setter TargetName="BdrContainer"
Property="TextElement.Foreground"
Value="{Binding Path=(local:MenuItemHelper.OpenedForeground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Setter TargetName="BdrContainer"
Property="TextBlock.Foreground"
Value="{Binding Path=(local:MenuItemHelper.OpenedForeground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Setter TargetName="CcChecked"
Property="Foreground"
......@@ -317,7 +325,7 @@
<Condition Binding="{Binding Path=(local:MenuItemHelper.OpenedBackground), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="Background"
Value="{Binding Path=(local:MenuItemHelper.OpenedBackground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -328,7 +336,7 @@
<Condition Binding="{Binding Path=(local:MenuItemHelper.OpenedBorderBrush), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="BorderBrush"
Value="{Binding Path=(local:MenuItemHelper.OpenedBorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......
......@@ -11,15 +11,14 @@
<ControlTemplate x:Key="{x:Static irs:TemplateKeys.ContextMenuTemplate}"
TargetType="ContextMenu">
<local:ContentControlX x:Name="CcMain"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Padding="{TemplateBinding Padding}"
CornerRadius="{Binding Path=(local:ContextMenuHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Margin="{Binding Path=(local:ShadowHelper.BlurRadius), Converter={StaticResource {x:Static irs:ConverterKeys.DropDownMarginConverter}}, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<local:ContentControlX.Effect>
<Border x:Name="BdrContainer"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{Binding Path=(local:ContextMenuHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Padding="{TemplateBinding Padding}"
Margin="{Binding Path=(local:ShadowHelper.BlurRadius), Converter={StaticResource {x:Static irs:ConverterKeys.DropDownMarginConverter}}, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<Border.Effect>
<MultiBinding Converter="{StaticResource {x:Static irs:ConverterKeys.DropShadowEffectWithDepthConverter}}">
<Binding Path="(local:ContextMenuHelper.ShadowColor)"
RelativeSource="{RelativeSource TemplatedParent}"
......@@ -40,11 +39,11 @@
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
</MultiBinding>
</local:ContentControlX.Effect>
</Border.Effect>
<ScrollViewer>
<ItemsPresenter KeyboardNavigation.DirectionalNavigation="Cycle" />
</ScrollViewer>
</local:ContentControlX>
</Border>
</ControlTemplate>
......
......@@ -959,12 +959,13 @@
<ControlTemplate x:Key="{x:Static irs:TemplateKeys.DataGridTemplate}"
TargetType="DataGrid">
<local:ContentControlX Background="{TemplateBinding Background}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{Binding Path=(local:DataGridHelper.CornerRadius),RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<Border x:Name="BdrContainer"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
CornerRadius="{Binding Path=(local:DataGridHelper.CornerRadius),RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<ScrollViewer Template="{StaticResource {x:Static irs:TemplateKeys.DataGridScrollViewerTemplate}}"
Focusable="False"
Padding="{TemplateBinding Padding}"
......@@ -973,7 +974,7 @@
CanContentScroll="{Binding Path=(ScrollViewer.CanContentScroll),RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<ItemsPresenter />
</ScrollViewer>
</local:ContentControlX>
</Border>
</ControlTemplate>
</ResourceDictionary>
......@@ -16,93 +16,104 @@
<its:WatermarkTemplateSelector x:Key="WatermarkTemplateSelector" />
</ControlTemplate.Resources>
<Grid>
<local:ContentControlX x:Name="CcMain"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}}"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource AncestorType=local:DateTimePicker}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource AncestorType=local:DateTimePicker}, Mode=OneWay}"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource AncestorType=local:DateTimePicker}, Mode=OneWay}"
BorderThickness="{Binding Path=(i:VisualStateHelper.BorderThickness), RelativeSource={RelativeSource AncestorType=local:DateTimePicker}, Mode=OneWay}"
CornerRadius="{Binding Path=(i:VisualStateHelper.CornerRadius), RelativeSource={RelativeSource AncestorType=local:DateTimePicker}, Mode=OneWay}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource AncestorType=local:DateTimePicker}, Mode=OneWay}"
Icon="{TemplateBinding Icon}">
<ToggleButton Focusable="False"
IsChecked="{Binding IsDropDownOpen, RelativeSource={RelativeSource AncestorType=local:DateTimePicker}, Mode=TwoWay}">
<ToggleButton.Style>
<Style TargetType="ToggleButton">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ToggleButton">
<Border Background="Transparent">
<ContentPresenter />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ToggleButton.Style>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid Margin="{TemplateBinding Padding}">
<TextBlock IsHitTestVisible="False"
Visibility="{Binding IsEditable, Converter={StaticResource {x:Static rs:ConverterKeys.TrueToCollapseConverter}}, RelativeSource={RelativeSource AncestorType=local:DateTimePicker}, Mode=OneWay}"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource AncestorType=local:DateTimePicker}, Mode=OneWay}"
Text="{Binding Text, RelativeSource={RelativeSource AncestorType=local:DateTimePicker}, Mode=OneWay}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
<ContentControl Margin="2,0,0,0"
IsHitTestVisible="False"
Focusable="False"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Visibility="{Binding Text, Converter={StaticResource {x:Static rs:ConverterKeys.StringNonnullAndNotEmptyToCollapseConverter}},RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}"
Content="{TemplateBinding Watermark}"
ContentTemplateSelector="{StaticResource WatermarkTemplateSelector}"
Foreground="{Binding Path=(i:VisualStateHelper.WatermarkForeground),RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<TextBox x:Name="PART_EditableTextBox"
Focusable="True"
CaretBrush="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource AncestorType=local:DateTimePicker}, Mode=OneWay}"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource AncestorType=local:DateTimePicker}, Mode=OneWay}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Visibility="{Binding IsEditable, Converter={StaticResource {x:Static rs:ConverterKeys.FalseToCollapseConverter}}, RelativeSource={RelativeSource AncestorType=local:DateTimePicker}, Mode=OneWay}">
<TextBox.Style>
<Style TargetType="TextBox">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TextBox">
<Border x:Name="PART_ContentHost"
Focusable="False"
Margin="{TemplateBinding Padding}" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</TextBox.Style>
</TextBox>
<Border x:Name="BdrContainer"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{Binding Path=(i:VisualStateHelper.BorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CornerRadius="{Binding Path=(i:VisualStateHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<Grid x:Name="DockContainer"
TextElement.Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
TextBlock.Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<i:IconPresenter x:Name="IpIcon"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Content="{Binding Icon, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<ToggleButton Grid.Column="1"
Focusable="False"
Padding="{TemplateBinding Padding}"
IsChecked="{Binding IsDropDownOpen, RelativeSource={RelativeSource AncestorType=local:DateTimePicker}, Mode=TwoWay}">
<ToggleButton.Style>
<Style TargetType="ToggleButton">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ToggleButton">
<Border Background="Transparent">
<ContentPresenter />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ToggleButton.Style>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid Margin="{TemplateBinding Padding}">
<TextBlock IsHitTestVisible="False"
Visibility="{Binding IsEditable, Converter={StaticResource {x:Static rs:ConverterKeys.TrueToCollapseConverter}}, RelativeSource={RelativeSource AncestorType=local:DateTimePicker}, Mode=OneWay}"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource AncestorType=local:DateTimePicker}, Mode=OneWay}"
Text="{Binding Text, RelativeSource={RelativeSource AncestorType=local:DateTimePicker}, Mode=OneWay}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
<ContentControl Margin="2,0,0,0"
IsHitTestVisible="False"
Focusable="False"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Visibility="{Binding Text, Converter={StaticResource {x:Static rs:ConverterKeys.StringNonnullAndNotEmptyToCollapseConverter}},RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}"
Content="{TemplateBinding Watermark}"
ContentTemplateSelector="{StaticResource WatermarkTemplateSelector}"
Foreground="{Binding Path=(i:VisualStateHelper.WatermarkForeground),RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<TextBox x:Name="PART_EditableTextBox"
Focusable="True"
CaretBrush="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource AncestorType=local:DateTimePicker}, Mode=OneWay}"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource AncestorType=local:DateTimePicker}, Mode=OneWay}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Visibility="{Binding IsEditable, Converter={StaticResource {x:Static rs:ConverterKeys.FalseToCollapseConverter}}, RelativeSource={RelativeSource AncestorType=local:DateTimePicker}, Mode=OneWay}">
<TextBox.Style>
<Style TargetType="TextBox">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TextBox">
<Border x:Name="PART_ContentHost"
Focusable="False"
Margin="{TemplateBinding Padding}" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</TextBox.Style>
</TextBox>
</Grid>
<Button x:Name="BtnClear"
Grid.Column="1"
Visibility="Collapsed"
Style="{TemplateBinding ClearButtonStyle}"
Command="{TemplateBinding ClearCommand}"
CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=local:DateTimePicker}}" />
<local:TransformControl Grid.Column="2"
Style="{TemplateBinding ToggleArrowTransformControlStyle}" />
</Grid>
<Button x:Name="BtnClear"
Grid.Column="1"
Visibility="Collapsed"
Style="{TemplateBinding ClearButtonStyle}"
Command="{TemplateBinding ClearCommand}"
CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=local:DateTimePicker}}" />
<local:TransformControl Grid.Column="2"
Style="{TemplateBinding ToggleArrowTransformControlStyle}" />
</Grid>
</ToggleButton>
</local:ContentControlX>
</ToggleButton>
</Grid>
</Border>
<local:PopupX x:Name="PART_PopupX"
Focusable="False"
AllowsTransparency="True"
IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource AncestorType=local:DateTimePicker}, Mode=TwoWay}"
PlacementTarget="{Binding ElementName=CcMain}"
Placement="{Binding Path=(local:DropDownHelper.Placement), RelativeSource={RelativeSource AncestorType=local:DateTimePicker}, Mode=OneWay}"
PopupAnimation="Fade"
StaysOpen="False">
Focusable="False"
AllowsTransparency="True"
IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource AncestorType=local:DateTimePicker}, Mode=TwoWay}"
PlacementTarget="{Binding ElementName=BdrContainer}"
Placement="{Binding Path=(local:DropDownHelper.Placement), RelativeSource={RelativeSource AncestorType=local:DateTimePicker}, Mode=OneWay}"
PopupAnimation="Fade"
StaysOpen="False">
<local:PopupX.HorizontalOffset>
<MultiBinding Converter="{StaticResource {x:Static irs:ConverterKeys.ComboBoxDropDownHorizontalOffsetConverter}}">
<Binding Path="(local:ShadowHelper.BlurRadius)"
......@@ -204,7 +215,7 @@
<local:TimeSelector x:Name="PART_TimeSelector"
Grid.Column="2"
Style="{TemplateBinding TimeSelectorStyle}"
Culture="{TemplateBinding Culture}"/>
Culture="{TemplateBinding Culture}" />
</Grid>
</local:ContentControlX>
</Grid>
......
......@@ -11,17 +11,15 @@
<ControlTemplate x:Key="{x:Static irs:TemplateKeys.GroupBoxTemplate}"
TargetType="GroupBox">
<local:ContentControlX x:Name="CcMain"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Foreground="{TemplateBinding Foreground}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}}"
CornerRadius="{Binding Path=(local:GroupBoxHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalContentAlignment="Stretch"
HorizontalContentAlignment="Stretch">
<Grid>
<Border x:Name="BdrContainer"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{Binding Path=(i:VisualStateHelper.BorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CornerRadius="{Binding Path=(i:VisualStateHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Padding="{TemplateBinding Padding}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<Grid VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
......@@ -92,7 +90,7 @@
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
</Grid>
</local:ContentControlX>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="local:GroupBoxHelper.HeaderPlacement"
Value="Bottom">
......
......@@ -20,35 +20,48 @@
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<local:ContentControlX x:Name="CcMain"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}}"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{Binding Path=(i:VisualStateHelper.BorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CornerRadius="{Binding Path=(local:ListBoxItemHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Icon="{Binding Path=(local:ListBoxItemHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
IconPlacement="{Binding Path=(local:ListBoxItemHelper.IconPlacement), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
IconWidth="{Binding Path=(local:ListBoxHelper.ItemsIconWidth), RelativeSource={RelativeSource AncestorType=ListBox}, Mode=OneWay}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
Padding="{TemplateBinding Padding}">
<Grid>
<Border x:Name="BdrContainer"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{Binding Path=(i:VisualStateHelper.BorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CornerRadius="{Binding Path=(i:VisualStateHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Padding="{TemplateBinding Padding}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<Grid x:Name="GrdContainer"
TextElement.Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
TextBlock.Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<ContentPresenter VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
<Button x:Name="BtnRemove"
Grid.Column="1"
Visibility="Hidden"
Style="{Binding Path=(local:ListBoxHelper.RemoveButtonStyle), RelativeSource={RelativeSource AncestorType=ListBox}, Mode=OneWay}"
Command="{Binding Path=(local:ListBoxHelper.RemoveCommand), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Border Width="{Binding Path=(local:ListBoxHelper.ItemsIconWidth), RelativeSource={RelativeSource AncestorType=ListBox}, Mode=OneWay}">
<i:IconPresenter x:Name="IpIcon"
DockPanel.Dock="{Binding Path=(local:ListBoxItemHelper.IconPlacement), Converter={StaticResource {x:Static irs:ConverterKeys.IconPlacementToDockConverter}}, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Content="{Binding Path=(local:ListBoxItemHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</Border>
<Grid Grid.Column="1"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Margin="{TemplateBinding Padding}">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<ContentPresenter VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
<Button x:Name="BtnRemove"
Grid.Column="1"
Visibility="Hidden"
Style="{Binding Path=(local:ListBoxHelper.RemoveButtonStyle), RelativeSource={RelativeSource AncestorType=ListBox}, Mode=OneWay}"
Command="{Binding Path=(local:ListBoxHelper.RemoveCommand), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</Grid>
</Grid>
</local:ContentControlX>
</Border>
<Rectangle x:Name="RectSeparator"
Grid.Row="1"
Fill="{Binding Path=(local:ListBoxItemHelper.SeparatorBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
......@@ -69,7 +82,7 @@
<Condition Binding="{Binding Path=(local:ListBoxItemHelper.SelectedBorderBrush), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="BorderBrush"
Value="{Binding Path=(local:ListBoxItemHelper.SelectedBorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -80,7 +93,7 @@
<Condition Binding="{Binding Path=(local:ListBoxItemHelper.SelectedBackground), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="Background"
Value="{Binding Path=(local:ListBoxItemHelper.SelectedBackground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -91,11 +104,14 @@
<Condition Binding="{Binding Path=(local:ListBoxItemHelper.SelectedForeground), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
Property="Foreground"
<Setter TargetName="GrdContainer"
Property="TextElement.Foreground"
Value="{Binding Path=(local:ListBoxItemHelper.SelectedForeground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Setter TargetName="CcMain"
Property="IconForeground"
<Setter TargetName="GrdContainer"
Property="TextBlock.Foreground"
Value="{Binding Path=(local:ListBoxItemHelper.SelectedForeground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Setter TargetName="IpIcon"
Property="Foreground"
Value="{Binding Path=(local:ListBoxItemHelper.SelectedForeground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
<MultiDataTrigger>
......@@ -105,7 +121,7 @@
<Condition Binding="{Binding Path=(local:ListBoxItemHelper.SelectedBorderThickness), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="BorderThickness"
Value="{Binding Path=(local:ListBoxItemHelper.SelectedBorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -116,7 +132,7 @@
<Condition Binding="{Binding Path=(local:ListBoxItemHelper.SelectedCornerRadius), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="CornerRadius"
Value="{Binding Path=(local:ListBoxItemHelper.SelectedCornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......
......@@ -16,20 +16,17 @@
<RowDefinition />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<local:ContentControlX x:Name="CcMain"
Grid.Column="1"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}}"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{Binding Path=(local:ListViewItemHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
Padding="{TemplateBinding Padding}">
<Border x:Name="BdrContainer"
TextElement.Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
TextBlock.Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{Binding Path=(i:VisualStateHelper.BorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CornerRadius="{Binding Path=(i:VisualStateHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Padding="{TemplateBinding Padding}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<GridViewRowPresenter />
</local:ContentControlX>
</Border>
<Rectangle x:Name="RectSeparator"
Grid.Row="1"
Fill="{Binding Path=(local:ListViewItemHelper.SeparatorBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
......@@ -45,10 +42,32 @@
<Condition Binding="{Binding Path=(local:ListViewItemHelper.SelectedBorderBrush), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="BorderBrush"
Value="{Binding Path=(local:ListViewItemHelper.SelectedBorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
<Condition Binding="{Binding Path=(local:ListViewItemHelper.SelectedBorderThickness), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="BdrContainer"
Property="BorderThickness"
Value="{Binding Path=(local:ListViewItemHelper.SelectedBorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
<Condition Binding="{Binding Path=(local:ListViewItemHelper.SelectedCornerRadius), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="BdrContainer"
Property="CornerRadius"
Value="{Binding Path=(local:ListViewItemHelper.SelectedCornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}, Mode=OneWay}"
......@@ -56,7 +75,7 @@
<Condition Binding="{Binding Path=(local:ListViewItemHelper.SelectedBackground), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="Background"
Value="{Binding Path=(local:ListViewItemHelper.SelectedBackground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -67,13 +86,53 @@
<Condition Binding="{Binding Path=(local:ListViewItemHelper.SelectedForeground), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
Property="Foreground"
<Setter TargetName="BdrContainer"
Property="TextElement.Foreground"
Value="{Binding Path=(local:ListViewItemHelper.SelectedForeground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Setter TargetName="CcMain"
Property="IconForeground"
<Setter TargetName="BdrContainer"
Property="TextBlock.Foreground"
Value="{Binding Path=(local:ListViewItemHelper.SelectedForeground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<ControlTemplate x:Key="{x:Static irs:TemplateKeys.ListViewItemNullViewTemplate}"
TargetType="{x:Type ListViewItem}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Border x:Name="BdrContainer"
TextElement.Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
TextBlock.Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{Binding Path=(i:VisualStateHelper.BorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CornerRadius="{Binding Path=(i:VisualStateHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Padding="{TemplateBinding Padding}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<ContentPresenter />
</Border>
<Rectangle x:Name="RectSeparator"
Grid.Row="1"
Fill="{Binding Path=(local:ListViewItemHelper.SeparatorBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Height="{Binding Path=(local:ListViewItemHelper.SeparatorThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Margin="{Binding Path=(local:ListViewItemHelper.SeparatorMargin), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Visibility="{Binding Path=(local:ListViewItemHelper.SeparatorVisibility), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</Grid>
<ControlTemplate.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
<Condition Binding="{Binding Path=(local:ListViewItemHelper.SelectedBorderBrush), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="BdrContainer"
Property="BorderBrush"
Value="{Binding Path=(local:ListViewItemHelper.SelectedBorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}, Mode=OneWay}"
......@@ -81,11 +140,48 @@
<Condition Binding="{Binding Path=(local:ListViewItemHelper.SelectedBorderThickness), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="BorderThickness"
Value="{Binding Path=(local:ListViewItemHelper.SelectedBorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
<Condition Binding="{Binding Path=(local:ListViewItemHelper.SelectedCornerRadius), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="BdrContainer"
Property="CornerRadius"
Value="{Binding Path=(local:ListViewItemHelper.SelectedCornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
<Condition Binding="{Binding Path=(local:ListViewItemHelper.SelectedBackground), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="BdrContainer"
Property="Background"
Value="{Binding Path=(local:ListViewItemHelper.SelectedBackground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
<Condition Binding="{Binding Path=(local:ListViewItemHelper.SelectedForeground), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="BdrContainer"
Property="TextElement.Foreground"
Value="{Binding Path=(local:ListViewItemHelper.SelectedForeground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Setter TargetName="BdrContainer"
Property="TextBlock.Foreground"
Value="{Binding Path=(local:ListViewItemHelper.SelectedForeground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</ResourceDictionary>
......@@ -16,28 +16,48 @@
<RowDefinition />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<local:ContentControlX x:Name="CcMain"
Grid.Column="1"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}}"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{Binding CornerRadius, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Padding="{TemplateBinding Padding}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}">
<Grid>
<Border x:Name="BdrContainer"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{Binding Path=(i:VisualStateHelper.BorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CornerRadius="{Binding Path=(i:VisualStateHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<Grid x:Name="DockContainer"
TextElement.Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
TextBlock.Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<CheckBox IsChecked="{Binding IsSelected, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
Style="{Binding CheckBoxStyle, RelativeSource={RelativeSource AncestorType=local:MultiComboBox}, Mode=OneWay}"
Visibility="{TemplateBinding CheckBoxVisibility}" />
<ContentPresenter Grid.Column="1" />
<Grid Width="{Binding ItemsIconWidth, RelativeSource={RelativeSource AncestorType=local:MultiComboBox}, Mode=OneWay}">
<Border x:Name="BdrIcon">
<i:IconPresenter x:Name="IpIcon"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Content="{TemplateBinding Icon}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</Border>
<ContentControl x:Name="CcChecked"
Visibility="Collapsed"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Width="{Binding Path=(local:IconHelper.Width), RelativeSource={RelativeSource AncestorType=local:MultiComboBox}, Mode=OneWay}"
Height="{Binding Path=(local:IconHelper.Height), RelativeSource={RelativeSource AncestorType=local:MultiComboBox}, Mode=OneWay}"
MinWidth="{Binding Path=(local:IconHelper.MinWidth), RelativeSource={RelativeSource AncestorType=local:MultiComboBox}, Mode=OneWay}"
MinHeight="{Binding Path=(local:IconHelper.MinHeight), RelativeSource={RelativeSource AncestorType=local:MultiComboBox}, Mode=OneWay}"
MaxWidth="{Binding Path=(local:IconHelper.MaxWidth), RelativeSource={RelativeSource AncestorType=local:MultiComboBox}, Mode=OneWay}"
MaxHeight="{Binding Path=(local:IconHelper.MaxHeight), RelativeSource={RelativeSource AncestorType=local:MultiComboBox}, Mode=OneWay}"
VerticalContentAlignment="{Binding Path=(local:IconHelper.VerticalAlignment), RelativeSource={RelativeSource AncestorType=local:MultiComboBox}, Mode=OneWay}"
HorizontalContentAlignment="{Binding Path=(local:IconHelper.HorizontalAlignment), RelativeSource={RelativeSource AncestorType=local:MultiComboBox}, Mode=OneWay}"
FontFamily="{Binding Path=(local:IconHelper.FontFamily), RelativeSource={RelativeSource AncestorType=local:MultiComboBox}, Mode=OneWay}"
Margin="{Binding Path=(local:IconHelper.Margin), RelativeSource={RelativeSource AncestorType=local:MultiComboBox}, Mode=OneWay}"
FontSize="{Binding Path=(local:IconHelper.FontSize), RelativeSource={RelativeSource AncestorType=local:MultiComboBox}, Mode=OneWay}"
ToolTip="{Binding Path=(local:IconHelper.ToolTip), RelativeSource={RelativeSource AncestorType=local:MultiComboBox}, Mode=OneWay}"
ContentTemplate="{Binding CheckedIconTemplate, RelativeSource={RelativeSource AncestorType=local:MultiComboBox}, Mode=OneWay}" />
</Grid>
<ContentPresenter Grid.Column="1"
Margin="{TemplateBinding Padding}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
<Button x:Name="BtnRemove"
Grid.Column="2"
Visibility="Hidden"
......@@ -45,7 +65,7 @@
Command="{Binding RemoveCommand, RelativeSource={RelativeSource AncestorType=local:MultiComboBox}, Mode=OneWay}"
CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</Grid>
</local:ContentControlX>
</Border>
<Rectangle x:Name="RectSeparator"
Grid.Row="1"
Fill="{Binding SeparatorBrush, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
......@@ -67,6 +87,20 @@
Property="Visibility"
Value="Collapsed" />
</DataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding CheckedIconTemplate, Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource AncestorType=local:MultiComboBox}, Mode=OneWay}"
Value="True" />
<Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcChecked"
Property="Visibility"
Value="Visible" />
<Setter TargetName="BdrIcon"
Property="Visibility"
Value="Collapsed" />
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}, Mode=OneWay}"
......@@ -74,7 +108,7 @@
<Condition Binding="{Binding SelectedBorderBrush, Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="BorderBrush"
Value="{Binding SelectedBorderBrush, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -82,34 +116,54 @@
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
<Condition Binding="{Binding SelectedBackground, Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
<Condition Binding="{Binding SelectedBorderThickness, Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
Property="Background"
Value="{Binding SelectedBackground, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Setter TargetName="BdrContainer"
Property="BorderThickness"
Value="{Binding SelectedBorderThickness, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
<Condition Binding="{Binding SelectedForeground, Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
<Condition Binding="{Binding SelectedCornerRadius, Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
Property="Foreground"
Value="{Binding SelectedForeground, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Setter TargetName="BdrContainer"
Property="CornerRadius"
Value="{Binding SelectedCornerRadius, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
<Condition Binding="{Binding SelectedBorderThickness, Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
<Condition Binding="{Binding SelectedBackground, Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
Property="BorderThickness"
Value="{Binding SelectedBorderThickness, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Setter TargetName="BdrContainer"
Property="Background"
Value="{Binding SelectedBackground, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
<Condition Binding="{Binding SelectedForeground, Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="BdrContainer"
Property="TextElement.Foreground"
Value="{Binding SelectedForeground, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Setter TargetName="BdrContainer"
Property="TextBlock.Foreground"
Value="{Binding SelectedForeground, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Setter TargetName="IpIcon"
Property="Foreground"
Value="{Binding SelectedForeground, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Setter TargetName="CcChecked"
Property="Foreground"
Value="{Binding SelectedForeground, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
<Trigger Property="RemoveButtonVisibility"
Value="Visible">
......
......@@ -33,81 +33,93 @@
local:DropDownHelper.VerticalOffset="{Binding Path=(local:DropDownHelper.VerticalOffset), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
local:DropDownHelper.Width="{Binding Path=(local:DropDownHelper.Width), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<local:DropDown.Content>
<local:ContentControlX x:Name="CcMain"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}}"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{Binding CornerRadius, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Icon="{Binding Icon, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<ToggleButton Focusable="False"
IsChecked="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}">
<ToggleButton.Style>
<Style TargetType="ToggleButton">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ToggleButton">
<Border Background="Transparent">
<ContentPresenter />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ToggleButton.Style>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<ContentControl x:Name="CcWatermark"
Margin="2,0,0,0"
IsHitTestVisible="False"
Visibility="Collapsed"
Focusable="False"
Padding="{TemplateBinding Padding}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Content="{Binding Watermark, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
ContentTemplateSelector="{StaticResource WatermarkTemplateSelector}"
Foreground="{Binding Path=(i:VisualStateHelper.WatermarkForeground),RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<ItemsControl x:Name="IcSelection"
AlternationCount="2"
ItemsSource="{Binding SelectionBoxItems, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Margin="{TemplateBinding Padding}"
VerticalAlignment="Stretch"
HorizontalAlignment="Stretch">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Label x:Name="TagItem"
Style="{Binding SelectionBoxItemLabelStyle, RelativeSource={RelativeSource AncestorType=local:MultiComboBox}, Mode=OneWay}"
Content="{Binding}"
ContentTemplate="{Binding SelectionBoxItemTemplate, RelativeSource={RelativeSource AncestorType=local:MultiComboBox}, Mode=OneWay}"
ContentTemplateSelector="{Binding ItemTemplateSelector, RelativeSource={RelativeSource AncestorType=local:MultiComboBox}, Mode=OneWay}"
ContentStringFormat="{Binding SelectionBoxItemStringFormat, RelativeSource={RelativeSource AncestorType=local:MultiComboBox}, Mode=OneWay}" />
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<Button x:Name="BtnClear"
Grid.Column="1"
Visibility="Collapsed"
Style="{Binding ClearButtonStyle, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Command="{Binding ClearCommand, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}}" />
<local:TransformControl Grid.Column="2"
Style="{Binding ToggleArrowTransformControlStyle, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</Grid>
</ToggleButton>
</local:ContentControlX>
<Border x:Name="BdrContainer"
TextElement.Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
TextBlock.Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{Binding Path=(i:VisualStateHelper.BorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CornerRadius="{Binding Path=(i:VisualStateHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<i:IconPresenter x:Name="IpIcon"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Content="{TemplateBinding Icon}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<ToggleButton Grid.Column="1"
Focusable="False"
Padding="{TemplateBinding Padding}"
IsChecked="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}">
<ToggleButton.Style>
<Style TargetType="ToggleButton">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ToggleButton">
<Border Background="Transparent">
<ContentPresenter />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ToggleButton.Style>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<ContentControl x:Name="CcWatermark"
Margin="2,0,0,0"
IsHitTestVisible="False"
Visibility="Collapsed"
Focusable="False"
Padding="{TemplateBinding Padding}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Content="{Binding Watermark, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
ContentTemplateSelector="{StaticResource WatermarkTemplateSelector}"
Foreground="{Binding Path=(i:VisualStateHelper.WatermarkForeground),RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<ItemsControl x:Name="IcSelection"
AlternationCount="2"
ItemsSource="{Binding SelectionBoxItems, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Margin="{TemplateBinding Padding}"
VerticalAlignment="Stretch"
HorizontalAlignment="Stretch">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Label x:Name="TagItem"
Style="{Binding SelectionBoxItemLabelStyle, RelativeSource={RelativeSource AncestorType=local:MultiComboBox}, Mode=OneWay}"
Content="{Binding}"
ContentTemplate="{Binding SelectionBoxItemTemplate, RelativeSource={RelativeSource AncestorType=local:MultiComboBox}, Mode=OneWay}"
ContentTemplateSelector="{Binding ItemTemplateSelector, RelativeSource={RelativeSource AncestorType=local:MultiComboBox}, Mode=OneWay}"
ContentStringFormat="{Binding SelectionBoxItemStringFormat, RelativeSource={RelativeSource AncestorType=local:MultiComboBox}, Mode=OneWay}" />
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<Button x:Name="BtnClear"
Grid.Column="1"
Visibility="Collapsed"
Style="{Binding ClearButtonStyle, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Command="{Binding ClearCommand, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}}" />
<local:TransformControl Grid.Column="2"
Style="{Binding ToggleArrowTransformControlStyle, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</Grid>
</ToggleButton>
</Grid>
</Border>
</local:DropDown.Content>
<local:DropDown.Child>
<ScrollViewer Margin="{Binding Path=(local:DropDownHelper.Padding),RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}">
......
......@@ -11,22 +11,19 @@
<ControlTemplate x:Key="{x:Static irs:TemplateKeys.PaginationItemTemplate}"
TargetType="local:PaginationItem">
<local:ContentControlX x:Name="CcMain"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{TemplateBinding BorderThickness}"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}}"
Padding="{TemplateBinding Padding}"
CornerRadius="{Binding CornerRadius, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}">
<ContentPresenter Grid.Row="1"
Focusable="False"
<Border x:Name="BdrContainer"
TextElement.Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
TextBlock.Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{Binding Path=(i:VisualStateHelper.BorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CornerRadius="{Binding Path=(i:VisualStateHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<ContentPresenter Focusable="False"
RecognizesAccessKey="True"
VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</local:ContentControlX>
</Border>
<ControlTemplate.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
......@@ -35,7 +32,7 @@
<Condition Binding="{Binding SelectedBackground, Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="Background"
Value="{Binding SelectedBackground, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -46,10 +43,32 @@
<Condition Binding="{Binding SelectedBorderBrush, Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="BorderBrush"
Value="{Binding SelectedBorderBrush, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsChecked, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
<Condition Binding="{Binding SelectedBorderThickness, Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="BdrContainer"
Property="BorderBrush"
Value="{Binding SelectedBorderThickness, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsChecked, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
<Condition Binding="{Binding SelectedCornerRadius, Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="BdrContainer"
Property="BorderBrush"
Value="{Binding SelectedCornerRadius, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsChecked, RelativeSource={RelativeSource Self}, Mode=OneWay}"
......@@ -57,9 +76,13 @@
<Condition Binding="{Binding SelectedForeground, Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
Property="Foreground"
<Setter TargetName="BdrContainer"
Property="TextElement.Foreground"
Value="{Binding SelectedForeground, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Setter TargetName="BdrContainer"
Property="TextBlock.Foreground"
Value="{Binding SelectedForeground, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
......
......@@ -15,55 +15,102 @@
<ControlTemplate.Resources>
<its:WatermarkTemplateSelector x:Key="WatermarkTemplateSelector" />
</ControlTemplate.Resources>
<local:ContentControlX x:Name="CcMain"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}}"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{Binding Path=(i:VisualStateHelper.BorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CornerRadius="{Binding Path=(i:VisualStateHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Icon="{Binding Path=(local:PasswordBoxHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid Margin="{TemplateBinding Padding}">
<ContentControl Margin="2,0,0,0"
IsHitTestVisible="False"
Focusable="False"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Visibility="{Binding Path=(local:PasswordBoxHelper.Password), Converter={StaticResource {x:Static rs:ConverterKeys.StringNonnullAndNotEmptyToCollapseConverter}},RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}"
Content="{Binding Path=(local:PasswordBoxHelper.Watermark),RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
ContentTemplateSelector="{StaticResource WatermarkTemplateSelector}"
Foreground="{Binding Path=(i:VisualStateHelper.WatermarkForeground),RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<TextBlock IsHitTestVisible="False"
Focusable="False"
Padding="2,0,0,0"
Visibility="{Binding IsPressed, Converter={StaticResource {x:Static rs:ConverterKeys.FalseToHiddenConverter}}, ElementName=BtnPlain, Mode=OneWay}"
Text="{Binding Path=(local:PasswordBoxHelper.Password),RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
<Border x:Name="BdrContainer"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{Binding Path=(i:VisualStateHelper.BorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CornerRadius="{Binding Path=(i:VisualStateHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<DockPanel x:Name="DockContainer"
TextElement.Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
TextBlock.Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
<i:IconPresenter x:Name="IpIcon"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Content="{Binding Path=(local:PasswordBoxHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Grid>
<Border Margin="{TemplateBinding Padding}">
<ContentControl Margin="2,0,0,0"
IsHitTestVisible="False"
Focusable="False"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Visibility="{Binding Path=(local:PasswordBoxHelper.Password), Converter={StaticResource {x:Static rs:ConverterKeys.StringNonnullAndNotEmptyToCollapseConverter}},RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}"
Content="{Binding Path=(local:PasswordBoxHelper.Watermark),RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
ContentTemplateSelector="{StaticResource WatermarkTemplateSelector}"
Foreground="{Binding Path=(i:VisualStateHelper.WatermarkForeground),RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</Border>
<ScrollViewer x:Name="PART_ContentHost"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" />
</Grid>
<ScrollViewer x:Name="PART_ContentHost"
Visibility="{Binding IsPressed, Converter={StaticResource {x:Static rs:ConverterKeys.TrueToHiddenConverter}}, ElementName=BtnPlain, Mode=OneWay}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" />
<Button x:Name="BtnPlain"
Grid.Column="1"
Visibility="Collapsed"
Style="{Binding Path=(local:PasswordBoxHelper.PlainButtonStyle), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Button x:Name="BtnClear"
Grid.Column="2"
Visibility="Collapsed"
Style="{Binding Path=(local:PasswordBoxHelper.ClearButtonStyle), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Command="{Binding Path=(local:PasswordBoxHelper.ClearCommand), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}}" />
</Grid>
</local:ContentControlX>
</DockPanel>
</Border>
</ControlTemplate>
<ControlTemplate x:Key="{x:Static irs:TemplateKeys.PasswordBoxClearableAndPlainableTemplate}"
TargetType="PasswordBox">
<ControlTemplate.Resources>
<its:WatermarkTemplateSelector x:Key="WatermarkTemplateSelector" />
</ControlTemplate.Resources>
<Border x:Name="BdrContainer"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{Binding Path=(i:VisualStateHelper.BorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CornerRadius="{Binding Path=(i:VisualStateHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<DockPanel x:Name="DockContainer"
TextElement.Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
TextBlock.Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
<i:IconPresenter x:Name="IpIcon"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Content="{Binding Path=(local:PasswordBoxHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid Margin="{TemplateBinding Padding}">
<ContentControl Margin="2,0,0,0"
IsHitTestVisible="False"
Focusable="False"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Visibility="{Binding Path=(local:PasswordBoxHelper.Password), Converter={StaticResource {x:Static rs:ConverterKeys.StringNonnullAndNotEmptyToCollapseConverter}},RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}"
Content="{Binding Path=(local:PasswordBoxHelper.Watermark),RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
ContentTemplateSelector="{StaticResource WatermarkTemplateSelector}"
Foreground="{Binding Path=(i:VisualStateHelper.WatermarkForeground),RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<TextBlock IsHitTestVisible="False"
Focusable="False"
Padding="2,0,0,0"
Visibility="{Binding IsPressed, Converter={StaticResource {x:Static rs:ConverterKeys.FalseToHiddenConverter}}, ElementName=BtnPlain, Mode=OneWay}"
Text="{Binding Path=(local:PasswordBoxHelper.Password),RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
</Grid>
<ScrollViewer x:Name="PART_ContentHost"
Visibility="{Binding IsPressed, Converter={StaticResource {x:Static rs:ConverterKeys.TrueToHiddenConverter}}, ElementName=BtnPlain, Mode=OneWay}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" />
<Button x:Name="BtnPlain"
Grid.Column="1"
Visibility="Collapsed"
Style="{Binding Path=(local:PasswordBoxHelper.PlainButtonStyle), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Button x:Name="BtnClear"
Grid.Column="2"
Visibility="Collapsed"
Style="{Binding Path=(local:PasswordBoxHelper.ClearButtonStyle), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Command="{Binding Path=(local:PasswordBoxHelper.ClearCommand), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}}" />
</Grid>
</DockPanel>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="local:PasswordBoxHelper.ClearButtonVisibility"
Value="Visible">
......
......@@ -21,15 +21,15 @@
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Border x:Name="CcBox"
Height="{Binding Path=(local:RadioButtonHelper.BoxRadius), Converter={StaticResource {x:Static rs:ConverterKeys.DoubleMultiplyByConverter}}, ConverterParameter=2, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Width="{Binding Path=(local:RadioButtonHelper.BoxRadius), Converter={StaticResource {x:Static rs:ConverterKeys.DoubleMultiplyByConverter}}, ConverterParameter=2, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{Binding Path=(i:VisualStateHelper.BorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CornerRadius="{Binding Path=(local:RadioButtonHelper.BoxRadius), Converter={StaticResource {x:Static irs:ConverterKeys.DoubleToCornerRadiusConverter}}, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
Height="{Binding Path=(local:RadioButtonHelper.BoxRadius), Converter={StaticResource {x:Static rs:ConverterKeys.DoubleMultiplyByConverter}}, ConverterParameter=2, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Width="{Binding Path=(local:RadioButtonHelper.BoxRadius), Converter={StaticResource {x:Static rs:ConverterKeys.DoubleMultiplyByConverter}}, ConverterParameter=2, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{Binding Path=(i:VisualStateHelper.BorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CornerRadius="{Binding Path=(local:RadioButtonHelper.BoxRadius), Converter={StaticResource {x:Static irs:ConverterKeys.DoubleToCornerRadiusConverter}}, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
</Border>
<Grid Height="{Binding Path=(local:RadioButtonHelper.BoxRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Width="{Binding Path=(local:RadioButtonHelper.BoxRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
Width="{Binding Path=(local:RadioButtonHelper.BoxRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<Ellipse x:Name="EllToggle"
SnapsToDevicePixels="False"
VerticalAlignment="Center"
......
......@@ -9,25 +9,33 @@
<core:SharedResourceDictionary Source="pack://application:,,,/Panuon.WPF.UI;component/Resources/Converters.xaml" />
</ResourceDictionary.MergedDictionaries>
<ControlTemplate x:Key="{x:Static irs:TemplateKeys.RepeatButtonTemplate}"
<ControlTemplate x:Key="{x:Static irs:TemplateKeys.RepeatButtonPendingTemplate}"
TargetType="RepeatButton">
<local:ContentControlX x:Name="CcMain"
i:VisualStateHelper.IsClickEffectPressed="{Binding IsPressed, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}}"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{Binding Path=(i:VisualStateHelper.BorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CornerRadius="{Binding Path=(i:VisualStateHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Icon="{Binding Path=(local:RepeatButtonHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
IconPlacement="{Binding Path=(local:RepeatButtonHelper.IconPlacement), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Padding="{TemplateBinding Padding}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}">
<ContentPresenter Focusable="False"
RecognizesAccessKey="True" />
</local:ContentControlX>
<Border x:Name="BdrContainer"
i:VisualStateHelper.IsClickEffectPressed="{Binding IsPressed, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{Binding Path=(i:VisualStateHelper.BorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CornerRadius="{Binding Path=(i:VisualStateHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Padding="{TemplateBinding Padding}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<DockPanel x:Name="DockContainer"
TextElement.Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
TextBlock.Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
<local:Spin x:Name="SprPending"
DockPanel.Dock="{Binding Path=(local:RepeatButtonHelper.IconPlacement), Converter={StaticResource {x:Static irs:ConverterKeys.IconPlacementToDockConverter}}, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
IsSpinning="True"
Style="{Binding Path=(local:RepeatButtonHelper.PendingSpinStyle), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<ContentPresenter Focusable="False"
RecognizesAccessKey="True"
VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</DockPanel>
</Border>
<ControlTemplate.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
......@@ -36,7 +44,7 @@
<Condition Binding="{Binding Path=(local:RepeatButtonHelper.ClickBackground), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="Background"
Value="{Binding Path=(local:RepeatButtonHelper.ClickBackground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -47,7 +55,7 @@
<Condition Binding="{Binding Path=(local:RepeatButtonHelper.ClickBorderBrush), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="BorderBrush"
Value="{Binding Path=(local:RepeatButtonHelper.ClickBorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -58,7 +66,7 @@
<Condition Binding="{Binding Path=(local:RepeatButtonHelper.ClickBorderThickness), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="BorderThickness"
Value="{Binding Path=(local:RepeatButtonHelper.ClickBorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -69,11 +77,14 @@
<Condition Binding="{Binding Path=(local:RepeatButtonHelper.ClickForeground), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
Property="IconForeground"
<Setter TargetName="SprPending"
Property="GlyphBrush"
Value="{Binding Path=(local:RepeatButtonHelper.ClickForeground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Setter TargetName="CcMain"
Property="Foreground"
<Setter TargetName="DockContainer"
Property="TextElement.Foreground"
Value="{Binding Path=(local:RepeatButtonHelper.ClickForeground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Setter TargetName="DockContainer"
Property="TextBlock.Foreground"
Value="{Binding Path=(local:RepeatButtonHelper.ClickForeground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
<MultiDataTrigger>
......@@ -83,46 +94,39 @@
<Condition Binding="{Binding Path=(local:RepeatButtonHelper.ClickCornerRadius), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="CornerRadius"
Value="{Binding Path=(local:RepeatButtonHelper.ClickCornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<ControlTemplate x:Key="{x:Static irs:TemplateKeys.RepeatButtonPendingTemplate}"
<ControlTemplate x:Key="{x:Static irs:TemplateKeys.RepeatButtonTemplate}"
TargetType="RepeatButton">
<local:ContentControlX x:Name="CcMain"
i:VisualStateHelper.IsClickEffectPressed="{Binding IsPressed, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}}"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{Binding Path=(i:VisualStateHelper.BorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Icon="{Binding Path=(local:RepeatButtonHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
IconPlacement="{Binding Path=(local:RepeatButtonHelper.IconPlacement), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Padding="{TemplateBinding Padding}"
CornerRadius="{Binding Path=(local:RepeatButtonHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<local:Spin x:Name="SprPending"
IsSpinning="True"
Style="{Binding Path=(local:RepeatButtonHelper.PendingSpinStyle), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<ContentPresenter Grid.Row="1"
<Border x:Name="BdrContainer"
i:VisualStateHelper.IsClickEffectPressed="{Binding IsPressed, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{Binding Path=(i:VisualStateHelper.BorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CornerRadius="{Binding Path=(i:VisualStateHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Padding="{TemplateBinding Padding}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<DockPanel x:Name="DockContainer"
TextElement.Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
TextBlock.Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
<i:IconPresenter x:Name="IpIcon"
DockPanel.Dock="{Binding Path=(local:RepeatButtonHelper.IconPlacement), Converter={StaticResource {x:Static irs:ConverterKeys.IconPlacementToDockConverter}}, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Content="{Binding Path=(local:RepeatButtonHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<ContentPresenter VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Focusable="False"
RecognizesAccessKey="True"
VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</Grid>
</local:ContentControlX>
RecognizesAccessKey="True" />
</DockPanel>
</Border>
<ControlTemplate.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
......@@ -131,7 +135,7 @@
<Condition Binding="{Binding Path=(local:RepeatButtonHelper.ClickBackground), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="Background"
Value="{Binding Path=(local:RepeatButtonHelper.ClickBackground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -142,7 +146,7 @@
<Condition Binding="{Binding Path=(local:RepeatButtonHelper.ClickBorderBrush), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="BorderBrush"
Value="{Binding Path=(local:RepeatButtonHelper.ClickBorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -153,7 +157,7 @@
<Condition Binding="{Binding Path=(local:RepeatButtonHelper.ClickBorderThickness), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="BorderThickness"
Value="{Binding Path=(local:RepeatButtonHelper.ClickBorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -164,12 +168,15 @@
<Condition Binding="{Binding Path=(local:RepeatButtonHelper.ClickForeground), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
Property="IconForeground"
Value="{Binding Path=(local:RepeatButtonHelper.ClickForeground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Setter TargetName="CcMain"
<Setter TargetName="IpIcon"
Property="Foreground"
Value="{Binding Path=(local:RepeatButtonHelper.ClickForeground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Setter TargetName="DockContainer"
Property="TextElement.Foreground"
Value="{Binding Path=(local:RepeatButtonHelper.ClickForeground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Setter TargetName="DockContainer"
Property="TextBlock.Foreground"
Value="{Binding Path=(local:RepeatButtonHelper.ClickForeground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
......@@ -178,7 +185,7 @@
<Condition Binding="{Binding Path=(local:RepeatButtonHelper.ClickCornerRadius), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="CornerRadius"
Value="{Binding Path=(local:RepeatButtonHelper.ClickCornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......
......@@ -27,10 +27,11 @@
Padding="{TemplateBinding Padding}"
CornerRadius="{TemplateBinding CornerRadius}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}">
>
<ContentPresenter Focusable="False"
RecognizesAccessKey="True" />
RecognizesAccessKey="True"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
</local:ContentControlX>
<Rectangle x:Name="RectSeparator"
Grid.Row="1"
......
......@@ -15,34 +15,41 @@
<ControlTemplate.Resources>
<its:WatermarkTemplateSelector x:Key="WatermarkTemplateSelector"/>
</ControlTemplate.Resources>
<local:ContentControlX x:Name="CcMain"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}}"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{Binding Path=(i:VisualStateHelper.BorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CornerRadius="{Binding Path=(i:VisualStateHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Icon="{Binding Path=(local:TextBoxHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<Grid>
<Border Margin="{TemplateBinding Padding}">
<ContentControl Margin="2,0,0,0"
IsHitTestVisible="False"
Focusable="False"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Visibility="{Binding Text,Converter={StaticResource {x:Static rs:ConverterKeys.StringNonnullAndNotEmptyToCollapseConverter}},RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}"
Content="{Binding Path=(local:TextBoxHelper.Watermark),RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
ContentTemplateSelector="{StaticResource WatermarkTemplateSelector}"
Foreground="{Binding Path=(i:VisualStateHelper.WatermarkForeground),RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</Border>
<ScrollViewer x:Name="PART_ContentHost"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalScrollBarVisibility="{TemplateBinding VerticalScrollBarVisibility}"
HorizontalScrollBarVisibility="{TemplateBinding HorizontalScrollBarVisibility}" />
</Grid>
</local:ContentControlX>
<Border x:Name="BdrContainer"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{Binding Path=(i:VisualStateHelper.BorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CornerRadius="{Binding Path=(i:VisualStateHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<DockPanel x:Name="DockContainer"
TextElement.Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
TextBlock.Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
<i:IconPresenter x:Name="IpIcon"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Content="{Binding Path=(local:TextBoxHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Grid>
<Border Margin="{TemplateBinding Padding}">
<ContentControl Margin="2,0,0,0"
IsHitTestVisible="False"
Focusable="False"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Visibility="{Binding Text,Converter={StaticResource {x:Static rs:ConverterKeys.StringNonnullAndNotEmptyToCollapseConverter}},RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}"
Content="{Binding Path=(local:TextBoxHelper.Watermark),RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
ContentTemplateSelector="{StaticResource WatermarkTemplateSelector}"
Foreground="{Binding Path=(i:VisualStateHelper.WatermarkForeground),RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</Border>
<ScrollViewer x:Name="PART_ContentHost"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalScrollBarVisibility="{TemplateBinding VerticalScrollBarVisibility}"
HorizontalScrollBarVisibility="{TemplateBinding HorizontalScrollBarVisibility}" />
</Grid>
</DockPanel>
</Border>
</ControlTemplate>
<ControlTemplate x:Key="{x:Static irs:TemplateKeys.TextBoxClearableTemplate}"
......@@ -50,44 +57,52 @@
<ControlTemplate.Resources>
<its:WatermarkTemplateSelector x:Key="WatermarkTemplateSelector" />
</ControlTemplate.Resources>
<local:ContentControlX x:Name="CcMain"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}}"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{Binding Path=(local:TextBoxHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Icon="{Binding Path=(local:TextBoxHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Border Margin="{TemplateBinding Padding}">
<ContentControl Margin="2,0,0,0"
IsHitTestVisible="False"
Focusable="False"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Visibility="{Binding Text,Converter={StaticResource {x:Static rs:ConverterKeys.StringNonnullAndNotEmptyToCollapseConverter}},RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}"
Content="{Binding Path=(local:TextBoxHelper.Watermark),RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
ContentTemplateSelector="{StaticResource WatermarkTemplateSelector}"
Foreground="{Binding Path=(i:VisualStateHelper.WatermarkForeground),RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</Border>
<ScrollViewer x:Name="PART_ContentHost"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalScrollBarVisibility="{TemplateBinding VerticalScrollBarVisibility}"
HorizontalScrollBarVisibility="{TemplateBinding HorizontalScrollBarVisibility}" />
<Button x:Name="BtnClear"
Grid.Column="1"
Visibility="Collapsed"
Style="{Binding Path=(local:TextBoxHelper.ClearButtonStyle), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Command="{Binding Path=(local:TextBoxHelper.ClearCommand), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}}" />
</Grid>
</local:ContentControlX>
<Border x:Name="BdrContainer"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{Binding Path=(i:VisualStateHelper.BorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CornerRadius="{Binding Path=(i:VisualStateHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<DockPanel x:Name="DockContainer"
TextElement.Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
TextBlock.Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
<i:IconPresenter x:Name="IpIcon"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Content="{Binding Path=(local:TextBoxHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Border Margin="{TemplateBinding Padding}">
<ContentControl Margin="2,0,0,0"
IsHitTestVisible="False"
Focusable="False"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Visibility="{Binding Text,Converter={StaticResource {x:Static rs:ConverterKeys.StringNonnullAndNotEmptyToCollapseConverter}},RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}"
Content="{Binding Path=(local:TextBoxHelper.Watermark),RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
ContentTemplateSelector="{StaticResource WatermarkTemplateSelector}"
Foreground="{Binding Path=(i:VisualStateHelper.WatermarkForeground),RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</Border>
<ScrollViewer x:Name="PART_ContentHost"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalScrollBarVisibility="{TemplateBinding VerticalScrollBarVisibility}"
HorizontalScrollBarVisibility="{TemplateBinding HorizontalScrollBarVisibility}" />
<Button x:Name="BtnClear"
Grid.Column="1"
Visibility="Collapsed"
Style="{Binding Path=(local:TextBoxHelper.ClearButtonStyle), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Command="{Binding Path=(local:TextBoxHelper.ClearCommand), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}}" />
</Grid>
</DockPanel>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="local:TextBoxHelper.ClearButtonVisibility"
Value="Visible">
......
......@@ -11,20 +11,19 @@
<ControlTemplate x:Key="{x:Static irs:TemplateKeys.TimeSelectorItemTemplate}"
TargetType="local:TimeSelectorItem">
<local:ContentControlX x:Name="CcMain"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}}"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{Binding Path=(i:VisualStateHelper.BorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CornerRadius="{Binding Path=(i:VisualStateHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<Border x:Name="BdrContainer"
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderBrush="{Binding Path=(i:VisualStateHelper.BorderBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{Binding Path=(i:VisualStateHelper.BorderThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CornerRadius="{Binding Path=(i:VisualStateHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Padding="{TemplateBinding Padding}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<ContentPresenter Focusable="False"
RecognizesAccessKey="True"
Margin="{TemplateBinding Padding}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
</local:ContentControlX>
</Border>
<ControlTemplate.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
......@@ -33,7 +32,7 @@
<Condition Binding="{Binding CheckedBackground, Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="Background"
Value="{Binding CheckedBackground, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -45,7 +44,7 @@
<Condition Binding="{Binding CheckedBorderThickness, Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="BorderThickness"
Value="{Binding CheckedBorderThickness, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -56,7 +55,7 @@
<Condition Binding="{Binding CheckedBorderBrush, Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
<Setter TargetName="BdrContainer"
Property="BorderBrush"
Value="{Binding CheckedBorderBrush, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
......@@ -67,12 +66,13 @@
<Condition Binding="{Binding CheckedForeground, Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="CcMain"
Property="IconForeground"
<Setter TargetName="BdrContainer"
Property="TextElement.Foreground"
Value="{Binding CheckedForeground, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Setter TargetName="CcMain"
Property="Foreground"
<Setter TargetName="BdrContainer"
Property="TextBlock.Foreground"
Value="{Binding CheckedForeground, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
......
......@@ -155,6 +155,28 @@ namespace Panuon.WPF.UI
VisualStateHelper.HoverBorderBrushProperty.AddOwner(typeof(ColorPicker));
#endregion
#region HoverBorderThickness
public Thickness? HoverBorderThickness
{
get { return (Thickness?)GetValue(HoverBorderThicknessProperty); }
set { SetValue(HoverBorderThicknessProperty, value); }
}
public static readonly DependencyProperty HoverBorderThicknessProperty =
VisualStateHelper.HoverBorderThicknessProperty.AddOwner(typeof(ColorPicker));
#endregion
#region HoverCornerRadius
public CornerRadius? HoverCornerRadius
{
get { return (CornerRadius?)GetValue(HoverCornerRadiusProperty); }
set { SetValue(HoverCornerRadiusProperty, value); }
}
public static readonly DependencyProperty HoverCornerRadiusProperty =
VisualStateHelper.HoverCornerRadiusProperty.AddOwner(typeof(ColorPicker));
#endregion
#region HoverShadowColor
public Color? HoverShadowColor
{
......@@ -199,6 +221,28 @@ namespace Panuon.WPF.UI
VisualStateHelper.FocusedBorderBrushProperty.AddOwner(typeof(ColorPicker));
#endregion
#region FocusedBorderThickness
public Thickness? FocusedBorderThickness
{
get { return (Thickness?)GetValue(FocusedBorderThicknessProperty); }
set { SetValue(FocusedBorderThicknessProperty, value); }
}
public static readonly DependencyProperty FocusedBorderThicknessProperty =
VisualStateHelper.FocusedBorderThicknessProperty.AddOwner(typeof(ColorPicker));
#endregion
#region FocusedCornerRadius
public CornerRadius? FocusedCornerRadius
{
get { return (CornerRadius?)GetValue(FocusedCornerRadiusProperty); }
set { SetValue(FocusedCornerRadiusProperty, value); }
}
public static readonly DependencyProperty FocusedCornerRadiusProperty =
VisualStateHelper.FocusedCornerRadiusProperty.AddOwner(typeof(ColorPicker));
#endregion
#region FocusedShadowColor
public Color? FocusedShadowColor
{
......
......@@ -42,8 +42,8 @@ namespace Panuon.WPF.UI
public static ComponentResourceKey ToggleArrowTransformControlStyleKey { get; } =
new ComponentResourceKey(typeof(MultiComboBox), nameof(ToggleArrowTransformControlStyleKey));
public static ComponentResourceKey CheckBoxStyleKey { get; } =
new ComponentResourceKey(typeof(MultiComboBox), nameof(CheckBoxStyleKey));
public static ComponentResourceKey CheckedIconTemplateKey { get; } =
new ComponentResourceKey(typeof(MultiComboBox), nameof(CheckedIconTemplateKey));
public static ComponentResourceKey SelectionBoxItemLabelStyleKey { get; } =
new ComponentResourceKey(typeof(MultiComboBox), nameof(SelectionBoxItemLabelStyleKey));
......@@ -360,49 +360,37 @@ namespace Panuon.WPF.UI
DependencyProperty.Register("RemovingAnimationEasing", typeof(AnimationEasing), typeof(MultiComboBox));
#endregion
#region CheckBoxStyle
public static Style GetCheckBoxStyle(MultiComboBox multiComboBox)
#region CheckedIconTemplate
public DataTemplate CheckedIconTemplate
{
return (Style)multiComboBox.GetValue(CheckBoxStyleProperty);
get { return (DataTemplate)GetValue(CheckedIconTemplateProperty); }
set { SetValue(CheckedIconTemplateProperty, value); }
}
public static void SetCheckBoxStyle(MultiComboBox multiComboBox, Style value)
{
multiComboBox.SetValue(CheckBoxStyleProperty, value);
}
public static readonly DependencyProperty CheckBoxStyleProperty =
DependencyProperty.RegisterAttached("CheckBoxStyle", typeof(Style), typeof(MultiComboBox));
public static readonly DependencyProperty CheckedIconTemplateProperty =
DependencyProperty.Register("CheckedIconTemplate", typeof(DataTemplate), typeof(MultiComboBox));
#endregion
#region ToggleArrowTransformControlStyle
public static Style GetToggleArrowTransformControlStyle(MultiComboBox multiComboBox)
{
return (Style)multiComboBox.GetValue(ToggleArrowTransformControlStyleProperty);
}
public static void SetToggleArrowTransformControlStyle(MultiComboBox multiComboBox, Style value)
public Style ToggleArrowTransformControlStyle
{
multiComboBox.SetValue(ToggleArrowTransformControlStyleProperty, value);
get { return (Style)GetValue(ToggleArrowTransformControlStyleProperty); }
set { SetValue(ToggleArrowTransformControlStyleProperty, value); }
}
public static readonly DependencyProperty ToggleArrowTransformControlStyleProperty =
DependencyProperty.RegisterAttached("ToggleArrowTransformControlStyle", typeof(Style), typeof(MultiComboBox));
DependencyProperty.Register("ToggleArrowTransformControlStyle", typeof(Style), typeof(MultiComboBox));
#endregion
#region SelectionBoxItemLabelStyle
public static Style GetSelectionBoxItemLabelStyle(MultiComboBox multiComboBox)
public Style SelectionBoxItemLabelStyle
{
return (Style)multiComboBox.GetValue(SelectionBoxItemLabelStyleProperty);
}
public static void SetSelectionBoxItemLabelStyle(MultiComboBox objmultiComboBox, Style value)
{
objmultiComboBox.SetValue(SelectionBoxItemLabelStyleProperty, value);
get { return (Style)GetValue(SelectionBoxItemLabelStyleProperty); }
set { SetValue(SelectionBoxItemLabelStyleProperty, value); }
}
public static readonly DependencyProperty SelectionBoxItemLabelStyleProperty =
DependencyProperty.RegisterAttached("SelectionBoxItemLabelStyle", typeof(Style), typeof(MultiComboBox));
DependencyProperty.Register("SelectionBoxItemLabelStyle", typeof(Style), typeof(MultiComboBox));
#endregion
#region Items Properties
......@@ -429,6 +417,28 @@ namespace Panuon.WPF.UI
DependencyProperty.Register("ItemsHeight", typeof(double), typeof(MultiComboBox), new PropertyMetadata(30d));
#endregion
#region ItemsIcon
public object ItemsIcon
{
get { return (object)GetValue(ItemsIconProperty); }
set { SetValue(ItemsIconProperty, value); }
}
public static readonly DependencyProperty ItemsIconProperty =
DependencyProperty.Register("ItemsIcon", typeof(object), typeof(MultiComboBox));
#endregion
#region ItemsIconWidth
public double ItemsIconWidth
{
get { return (double)GetValue(ItemsIconWidthProperty); }
set { SetValue(ItemsIconWidthProperty, value); }
}
public static readonly DependencyProperty ItemsIconWidthProperty =
DependencyProperty.Register("ItemsIconWidth", typeof(double), typeof(MultiComboBox), new PropertyMetadata(double.NaN));
#endregion
#region ItemsFontSize
public double ItemsFontSize
{
......
......@@ -21,6 +21,17 @@ namespace Panuon.WPF.UI
#region Properties
#region Icon
public object Icon
{
get { return (object)GetValue(IconProperty); }
set { SetValue(IconProperty, value); }
}
public static readonly DependencyProperty IconProperty =
DependencyProperty.Register("Icon", typeof(object), typeof(MultiComboBoxItem));
#endregion
#region CheckBoxVisibility
public Visibility CheckBoxVisibility
{
......@@ -98,6 +109,28 @@ namespace Panuon.WPF.UI
VisualStateHelper.HoverBorderBrushProperty.AddOwner(typeof(MultiComboBoxItem));
#endregion
#region HoverBorderThickness
public Thickness? HoverBorderThickness
{
get { return (Thickness?)GetValue(HoverBorderThicknessProperty); }
set { SetValue(HoverBorderThicknessProperty, value); }
}
public static readonly DependencyProperty HoverBorderThicknessProperty =
VisualStateHelper.HoverBorderThicknessProperty.AddOwner(typeof(MultiComboBoxItem));
#endregion
#region HoverCornerRadius
public CornerRadius? HoverCornerRadius
{
get { return (CornerRadius?)GetValue(HoverCornerRadiusProperty); }
set { SetValue(HoverCornerRadiusProperty, value); }
}
public static readonly DependencyProperty HoverCornerRadiusProperty =
VisualStateHelper.HoverCornerRadiusProperty.AddOwner(typeof(MultiComboBoxItem));
#endregion
#region SelectedBackground
public Brush SelectedBackground
{
......@@ -142,6 +175,17 @@ namespace Panuon.WPF.UI
DependencyProperty.Register("SelectedBorderThickness", typeof(Thickness?), typeof(MultiComboBoxItem));
#endregion
#region SelectedCornerRadius
public CornerRadius? SelectedCornerRadius
{
get { return (CornerRadius?)GetValue(SelectedCornerRadiusProperty); }
set { SetValue(SelectedCornerRadiusProperty, value); }
}
public static readonly DependencyProperty SelectedCornerRadiusProperty =
DependencyProperty.Register("SelectedCornerRadius", typeof(CornerRadius?), typeof(MultiComboBoxItem));
#endregion
#region SeparatorBrush
public Brush SeparatorBrush
{
......
......@@ -93,6 +93,28 @@ namespace Panuon.WPF.UI
VisualStateHelper.HoverBorderBrushProperty.AddOwner(typeof(PaginationItem));
#endregion
#region HoverBorderThickness
public Thickness? HoverBorderThickness
{
get { return (Thickness?)GetValue(HoverBorderThicknessProperty); }
set { SetValue(HoverBorderThicknessProperty, value); }
}
public static readonly DependencyProperty HoverBorderThicknessProperty =
VisualStateHelper.HoverBorderThicknessProperty.AddOwner(typeof(PaginationItem));
#endregion
#region HoverCornerRadius
public CornerRadius? HoverCornerRadius
{
get { return (CornerRadius?)GetValue(HoverCornerRadiusProperty); }
set { SetValue(HoverCornerRadiusProperty, value); }
}
public static readonly DependencyProperty HoverCornerRadiusProperty =
VisualStateHelper.HoverCornerRadiusProperty.AddOwner(typeof(PaginationItem));
#endregion
#region HoverShadowColor
public Color? HoverShadowColor
{
......@@ -149,6 +171,17 @@ namespace Panuon.WPF.UI
DependencyProperty.Register("SelectedBorderThickness", typeof(Thickness?), typeof(PaginationItem));
#endregion
#region SelectedCornerRadius
public CornerRadius? SelectedCornerRadius
{
get { return (CornerRadius?)GetValue(SelectedCornerRadiusProperty); }
set { SetValue(SelectedCornerRadiusProperty, value); }
}
public static readonly DependencyProperty SelectedCornerRadiusProperty =
DependencyProperty.Register("SelectedCornerRadius", typeof(CornerRadius?), typeof(PaginationItem));
#endregion
#region SelectedShadowColor
public Color? SelectedShadowColor
{
......
......@@ -67,6 +67,36 @@ namespace Panuon.WPF.UI
VisualStateHelper.HoverBorderBrushProperty.AddOwner(typeof(ListViewItemHelper));
#endregion
#region HoverBorderThickness
public static Thickness? GetHoverBorderThickness(ComboBoxItem comboBoxItem)
{
return (Thickness?)comboBoxItem.GetValue(HoverBorderThicknessProperty);
}
public static void SetHoverBorderThickness(ComboBoxItem comboBoxItem, Thickness? value)
{
comboBoxItem.SetValue(HoverBorderThicknessProperty, value);
}
public static readonly DependencyProperty HoverBorderThicknessProperty =
VisualStateHelper.HoverBorderThicknessProperty.AddOwner(typeof(ListViewItemHelper));
#endregion
#region HoverCornerRadius
public static CornerRadius? GetHoverCornerRadius(ComboBoxItem comboBoxItem)
{
return (CornerRadius?)comboBoxItem.GetValue(HoverCornerRadiusProperty);
}
public static void SetHoverCornerRadius(ComboBoxItem comboBoxItem, CornerRadius? value)
{
comboBoxItem.SetValue(HoverCornerRadiusProperty, value);
}
public static readonly DependencyProperty HoverCornerRadiusProperty =
VisualStateHelper.HoverCornerRadiusProperty.AddOwner(typeof(ListViewItemHelper));
#endregion
#region SelectedBackground
public static Brush GetSelectedBackground(ListViewItem listViewItem)
{
......@@ -127,6 +157,21 @@ namespace Panuon.WPF.UI
DependencyProperty.RegisterAttached("SelectedBorderThickness", typeof(Thickness?), typeof(ListViewItemHelper));
#endregion
#region SelectedCornerRadius
public static CornerRadius? GetSelectedCornerRadius(ListViewItem listViewItem)
{
return (CornerRadius?)listViewItem.GetValue(SelectedCornerRadiusProperty);
}
public static void SetSelectedCornerRadius(ListViewItem listViewItem, CornerRadius? value)
{
listViewItem.SetValue(SelectedCornerRadiusProperty, value);
}
public static readonly DependencyProperty SelectedCornerRadiusProperty =
DependencyProperty.RegisterAttached("SelectedCornerRadius", typeof(CornerRadius?), typeof(ListViewItemHelper));
#endregion
#region SeparatorBrush
public static Brush GetSeparatorBrush(ListViewItem listViewItem)
{
......
......@@ -19,7 +19,7 @@ namespace Panuon.WPF.UI
}
public static readonly DependencyProperty CornerRadiusProperty =
DependencyProperty.RegisterAttached("CornerRadius", typeof(CornerRadius), typeof(MenuItemHelper));
VisualStateHelper.CornerRadiusProperty.AddOwner(typeof(MenuItemHelper));
#endregion
#region RemoveButtonVisibility
......
......@@ -25,5 +25,5 @@ using System.Windows.Markup;
ResourceDictionaryLocation.SourceAssembly
)]
[assembly: AssemblyVersion("1.1.10")]
[assembly: AssemblyFileVersion("1.1.10")]
\ No newline at end of file
[assembly: AssemblyVersion("1.1.11")]
[assembly: AssemblyFileVersion("1.1.11")]
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册