提交 26ac2bad 编写于 作者: 末城via

1.1.13.1

上级 965fe105
...@@ -23,60 +23,13 @@ namespace Panuon.WPF.UI.Internal ...@@ -23,60 +23,13 @@ namespace Panuon.WPF.UI.Internal
} }
#endregion #endregion
#region Properties
#region Source
public FrameworkElement Source
{
get { return (FrameworkElement)GetValue(SourceProperty); }
set { SetValue(SourceProperty, value); }
}
public static readonly DependencyProperty SourceProperty =
DependencyProperty.Register("Source", typeof(FrameworkElement), typeof(IconPresenter), new PropertyMetadata(OnSourceChanged));
#endregion
#endregion
#region Overrides
protected override void OnInitialized(EventArgs e)
{
base.OnInitialized(e);
}
#endregion
#region Event Handlers
private static void OnSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var presenter = d as IconPresenter;
presenter.UpdateBinding();
}
#endregion
#region Functions #region Functions
private void UpdateBinding() private void UpdateBinding()
{ {
if (Source != null) //FrameworkElementUtil.BindingPropertyIfUndefaultAndUninherited(this, VisibilityProperty, this, ContentProperty,
{ // (Source != null && IconHelper.GetHiddenOnNull(Source))
// ? (ValueConverterBase)new NullToHiddenConverter()
FrameworkElementUtil.BindingPropertyIfUndefaultAndUninherited(this, HeightProperty, Source, IconHelper.HeightProperty); // : new NullToCollapseConverter());
FrameworkElementUtil.BindingPropertyIfUndefaultAndUninherited(this, WidthProperty, Source, IconHelper.WidthProperty);
FrameworkElementUtil.BindingPropertyIfUndefaultAndUninherited(this, VerticalContentAlignmentProperty, Source, IconHelper.VerticalAlignmentProperty);
FrameworkElementUtil.BindingPropertyIfUndefaultAndUninherited(this, HorizontalContentAlignmentProperty, Source, IconHelper.HorizontalAlignmentProperty);
FrameworkElementUtil.BindingPropertyIfUndefaultAndUninherited(this, MinWidthProperty, Source, IconHelper.MinWidthProperty);
FrameworkElementUtil.BindingPropertyIfUndefaultAndUninherited(this, MinHeightProperty, Source, IconHelper.MinHeightProperty);
FrameworkElementUtil.BindingPropertyIfUndefaultAndUninherited(this, MaxWidthProperty, Source, IconHelper.MaxWidthProperty);
FrameworkElementUtil.BindingPropertyIfUndefaultAndUninherited(this, MaxHeightProperty, Source, IconHelper.MaxHeightProperty);
FrameworkElementUtil.BindingPropertyIfUndefaultAndUninherited(this, MarginProperty, Source, IconHelper.MarginProperty);
FrameworkElementUtil.BindingPropertyIfUndefaultAndUninherited(this, FontFamilyProperty, Source, IconHelper.FontFamilyProperty);
FrameworkElementUtil.BindingPropertyIfUndefaultAndUninherited(this, ForegroundProperty, Source, IconHelper.ForegroundProperty);
FrameworkElementUtil.BindingPropertyIfUndefaultAndUninherited(this, FontSizeProperty, Source, IconHelper.FontSizeProperty);
FrameworkElementUtil.BindingPropertyIfUndefaultAndUninherited(this, ToolTipProperty, Source, IconHelper.ToolTipProperty);
FrameworkElementUtil.BindingPropertyIfUndefaultAndUninherited(this, VisibilityProperty, this, ContentProperty,
(Source != null && IconHelper.GetHiddenOnNull(Source))
? (ValueConverterBase)new NullToHiddenConverter()
: new NullToCollapseConverter());
}
} }
#endregion #endregion
} }
......
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
using System.Windows;
namespace Panuon.WPF.UI.Internal.Converters
{
class IconVisibilityConverter
: OneWayMultiValueConverterBase
{
public override object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
{
var icon = values[0];
var hidden = (bool)values[1];
return icon == null
? (hidden ? Visibility.Hidden : Visibility.Collapsed)
: Visibility.Visible;
}
}
}
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
<Compile Include="$(MSBuildThisFileDirectory)Converters\DropDownOffsetConverter.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Converters\DropDownOffsetConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Converters\GroupBoxHeaderCornerRadiusConverter.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Converters\GroupBoxHeaderCornerRadiusConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Converters\IconPlacementToDockConverter.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Converters\IconPlacementToDockConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Converters\IconVisibilityConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Converters\IsIntLessThanConverter.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Converters\IsIntLessThanConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Converters\IsIntGreaterThanConverter.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Converters\IsIntGreaterThanConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Converters\IsDoubleLessThanConverter.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Converters\IsDoubleLessThanConverter.cs" />
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
public const string GetTypeConverter = nameof(GetTypeConverter); public const string GetTypeConverter = nameof(GetTypeConverter);
public const string GroupBoxHeaderCornerRadiusConverter = nameof(GroupBoxHeaderCornerRadiusConverter); public const string GroupBoxHeaderCornerRadiusConverter = nameof(GroupBoxHeaderCornerRadiusConverter);
public const string IconPlacementToDockConverter = nameof(IconPlacementToDockConverter); public const string IconPlacementToDockConverter = nameof(IconPlacementToDockConverter);
public const string IconVisibilityConverter = nameof(IconVisibilityConverter);
public const string InternalSpinClassicRenderTransformOriginConverter = nameof(InternalSpinClassicRenderTransformOriginConverter); public const string InternalSpinClassicRenderTransformOriginConverter = nameof(InternalSpinClassicRenderTransformOriginConverter);
public const string IsEnumContainsInSpecificValueConverter = nameof(IsEnumContainsInSpecificValueConverter); public const string IsEnumContainsInSpecificValueConverter = nameof(IsEnumContainsInSpecificValueConverter);
public const string IsItemSeparatorShallVisibleControlConverter = nameof(IsItemSeparatorShallVisibleControlConverter); public const string IsItemSeparatorShallVisibleControlConverter = nameof(IsItemSeparatorShallVisibleControlConverter);
......
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
<icv:GetTypeConverter x:Key="{x:Static irs:ConverterKeys.GetTypeConverter}" /> <icv:GetTypeConverter x:Key="{x:Static irs:ConverterKeys.GetTypeConverter}" />
<icv:GroupBoxHeaderCornerRadiusConverter x:Key="{x:Static irs:ConverterKeys.GroupBoxHeaderCornerRadiusConverter}" /> <icv:GroupBoxHeaderCornerRadiusConverter x:Key="{x:Static irs:ConverterKeys.GroupBoxHeaderCornerRadiusConverter}" />
<icv:IconPlacementToDockConverter x:Key="{x:Static irs:ConverterKeys.IconPlacementToDockConverter}" /> <icv:IconPlacementToDockConverter x:Key="{x:Static irs:ConverterKeys.IconPlacementToDockConverter}" />
<icv:IconVisibilityConverter x:Key="{x:Static irs:ConverterKeys.IconVisibilityConverter}" />
<icv:IntDivideByConverter x:Key="{x:Static rs:ConverterKeys.IntDivideByConverter}" /> <icv:IntDivideByConverter x:Key="{x:Static rs:ConverterKeys.IntDivideByConverter}" />
<icv:IsAllDoublesEqualConverter x:Key="{x:Static rs:ConverterKeys.IsAllDoublesEqualConverter}" /> <icv:IsAllDoublesEqualConverter x:Key="{x:Static rs:ConverterKeys.IsAllDoublesEqualConverter}" />
<icv:IsDoubleEqualToConverter x:Key="{x:Static rs:ConverterKeys.IsDoubleEqualToConverter}" /> <icv:IsDoubleEqualToConverter x:Key="{x:Static rs:ConverterKeys.IsDoubleEqualToConverter}" />
...@@ -104,4 +105,5 @@ ...@@ -104,4 +105,5 @@
<icv:TrueToHiddenConverter x:Key="{x:Static rs:ConverterKeys.TrueToHiddenConverter}" /> <icv:TrueToHiddenConverter x:Key="{x:Static rs:ConverterKeys.TrueToHiddenConverter}" />
<icv:WindowXCaptionDataContextConverter x:Key="{x:Static irs:ConverterKeys.WindowXCaptionDataContextConverter}" /> <icv:WindowXCaptionDataContextConverter x:Key="{x:Static irs:ConverterKeys.WindowXCaptionDataContextConverter}" />
<icv:ZoomViewerViewboxScaleConverter x:Key="{x:Static irs:ConverterKeys.ZoomViewerViewboxScaleConverter}" /> <icv:ZoomViewerViewboxScaleConverter x:Key="{x:Static irs:ConverterKeys.ZoomViewerViewboxScaleConverter}" />
</ResourceDictionary> </ResourceDictionary>
...@@ -15,14 +15,30 @@ ...@@ -15,14 +15,30 @@
Value="True" /> Value="True" />
<Setter Property="i:VisualStateHelper.IsHover" <Setter Property="i:VisualStateHelper.IsHover"
Value="{Binding IsMouseOver, RelativeSource={RelativeSource Self}, Mode=OneWay}" /> Value="{Binding IsMouseOver, RelativeSource={RelativeSource Self}, Mode=OneWay}" />
<Setter Property="local:IconHelper.FontFamily"
Value="{Binding IconFontFamily, Source={x:Static local:GlobalSettings.Setting}}" />
<Setter Property="local:IconHelper.FontSize"
Value="{Binding IconFontSize, Source={x:Static local:GlobalSettings.Setting}}" />
<Setter Property="local:IconHelper.Margin"
Value="0,0,5,0" />
<Setter Property="local:IconHelper.Foreground" <Setter Property="local:IconHelper.Foreground"
Value="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource Self}, Mode=OneWay}" /> Value="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource Self}, Mode=OneWay}" />
<Setter Property="local:IconHelper.Margin"
Value="{Binding Path=(local:IconHelper.Margin), RelativeSource={RelativeSource AncestorType=local:Breadcrumb}, Mode=OneWay}" />
<Setter Property="local:IconHelper.Width"
Value="{Binding Path=(local:IconHelper.Width), RelativeSource={RelativeSource AncestorType=local:Breadcrumb}, Mode=OneWay}" />
<Setter Property="local:IconHelper.Height"
Value="{Binding Path=(local:IconHelper.Height), RelativeSource={RelativeSource AncestorType=local:Breadcrumb}, Mode=OneWay}" />
<Setter Property="local:IconHelper.VerticalAlignment"
Value="{Binding Path=(local:IconHelper.VerticalAlignment), RelativeSource={RelativeSource AncestorType=local:Breadcrumb}, Mode=OneWay}" />
<Setter Property="local:IconHelper.HorizontalAlignment"
Value="{Binding Path=(local:IconHelper.HorizontalAlignment), RelativeSource={RelativeSource AncestorType=local:Breadcrumb}, Mode=OneWay}" />
<Setter Property="local:IconHelper.MinWidth"
Value="{Binding Path=(local:IconHelper.MinWidth), RelativeSource={RelativeSource AncestorType=local:Breadcrumb}, Mode=OneWay}" />
<Setter Property="local:IconHelper.MinHeight"
Value="{Binding Path=(local:IconHelper.MinHeight), RelativeSource={RelativeSource AncestorType=local:Breadcrumb}, Mode=OneWay}" />
<Setter Property="local:IconHelper.MaxWidth"
Value="{Binding Path=(local:IconHelper.MaxWidth), RelativeSource={RelativeSource AncestorType=local:Breadcrumb}, Mode=OneWay}" />
<Setter Property="local:IconHelper.MaxHeight"
Value="{Binding Path=(local:IconHelper.MaxHeight), RelativeSource={RelativeSource AncestorType=local:Breadcrumb}, Mode=OneWay}" />
<Setter Property="local:IconHelper.FontSize"
Value="{Binding Path=(local:IconHelper.FontSize), RelativeSource={RelativeSource AncestorType=local:Breadcrumb}, Mode=OneWay}" />
<Setter Property="local:IconHelper.FontFamily"
Value="{Binding Path=(local:IconHelper.FontFamily), RelativeSource={RelativeSource AncestorType=local:Breadcrumb}, Mode=OneWay}" />
<Setter Property="Icon" <Setter Property="Icon"
Value="{Binding ItemsIcon, RelativeSource={RelativeSource AncestorType=local:Breadcrumb}, Mode=OneWay}" /> Value="{Binding ItemsIcon, RelativeSource={RelativeSource AncestorType=local:Breadcrumb}, Mode=OneWay}" />
<Setter Property="ShadowColor" <Setter Property="ShadowColor"
......
...@@ -21,10 +21,30 @@ ...@@ -21,10 +21,30 @@
Value="{Binding IconFontFamily, Source={x:Static local:GlobalSettings.Setting}}" /> Value="{Binding IconFontFamily, Source={x:Static local:GlobalSettings.Setting}}" />
<Setter Property="local:IconHelper.FontSize" <Setter Property="local:IconHelper.FontSize"
Value="{Binding IconFontSize, Source={x:Static local:GlobalSettings.Setting}}" /> Value="{Binding IconFontSize, Source={x:Static local:GlobalSettings.Setting}}" />
<Setter Property="local:IconHelper.Margin"
Value="0,0,5,0" />
<Setter Property="local:IconHelper.Foreground" <Setter Property="local:IconHelper.Foreground"
Value="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource Self}, Mode=OneWay}" /> Value="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource Self}, Mode=OneWay}" />
<Setter Property="local:IconHelper.Margin"
Value="{Binding Path=(local:IconHelper.Margin), RelativeSource={RelativeSource AncestorType=local:CalendarX}, Mode=OneWay}" />
<Setter Property="local:IconHelper.Width"
Value="{Binding Path=(local:IconHelper.Width), RelativeSource={RelativeSource AncestorType=local:CalendarX}, Mode=OneWay}" />
<Setter Property="local:IconHelper.Height"
Value="{Binding Path=(local:IconHelper.Height), RelativeSource={RelativeSource AncestorType=local:CalendarX}, Mode=OneWay}" />
<Setter Property="local:IconHelper.VerticalAlignment"
Value="{Binding Path=(local:IconHelper.VerticalAlignment), RelativeSource={RelativeSource AncestorType=local:CalendarX}, Mode=OneWay}" />
<Setter Property="local:IconHelper.HorizontalAlignment"
Value="{Binding Path=(local:IconHelper.HorizontalAlignment), RelativeSource={RelativeSource AncestorType=local:CalendarX}, Mode=OneWay}" />
<Setter Property="local:IconHelper.MinWidth"
Value="{Binding Path=(local:IconHelper.MinWidth), RelativeSource={RelativeSource AncestorType=local:CalendarX}, Mode=OneWay}" />
<Setter Property="local:IconHelper.MinHeight"
Value="{Binding Path=(local:IconHelper.MinHeight), RelativeSource={RelativeSource AncestorType=local:CalendarX}, Mode=OneWay}" />
<Setter Property="local:IconHelper.MaxWidth"
Value="{Binding Path=(local:IconHelper.MaxWidth), RelativeSource={RelativeSource AncestorType=local:CalendarX}, Mode=OneWay}" />
<Setter Property="local:IconHelper.MaxHeight"
Value="{Binding Path=(local:IconHelper.MaxHeight), RelativeSource={RelativeSource AncestorType=local:CalendarX}, Mode=OneWay}" />
<Setter Property="local:IconHelper.FontSize"
Value="{Binding Path=(local:IconHelper.FontSize), RelativeSource={RelativeSource AncestorType=local:CalendarX}, Mode=OneWay}" />
<Setter Property="local:IconHelper.FontFamily"
Value="{Binding Path=(local:IconHelper.FontFamily), RelativeSource={RelativeSource AncestorType=local:CalendarX}, Mode=OneWay}" />
<Setter Property="Foreground" <Setter Property="Foreground"
Value="{Binding ItemsForeground, RelativeSource={RelativeSource AncestorType=local:CalendarX}, Mode=OneWay}" /> Value="{Binding ItemsForeground, RelativeSource={RelativeSource AncestorType=local:CalendarX}, Mode=OneWay}" />
<Setter Property="Background" <Setter Property="Background"
......
...@@ -25,14 +25,30 @@ ...@@ -25,14 +25,30 @@
</MultiBinding> </MultiBinding>
</Setter.Value> </Setter.Value>
</Setter> </Setter>
<Setter Property="local:IconHelper.FontFamily"
Value="{Binding IconFontFamily, Source={x:Static local:GlobalSettings.Setting}}" />
<Setter Property="local:IconHelper.FontSize"
Value="{Binding IconFontSize, Source={x:Static local:GlobalSettings.Setting}}" />
<Setter Property="local:IconHelper.Margin"
Value="0,0,5,0" />
<Setter Property="local:IconHelper.Foreground" <Setter Property="local:IconHelper.Foreground"
Value="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource Self}, Mode=OneWay}" /> Value="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource Self}, Mode=OneWay}" />
<Setter Property="local:IconHelper.Margin"
Value="{Binding Path=(local:IconHelper.Margin), RelativeSource={RelativeSource AncestorType=local:SearchBox}, Mode=OneWay}" />
<Setter Property="local:IconHelper.Width"
Value="{Binding Path=(local:IconHelper.Width), RelativeSource={RelativeSource AncestorType=local:SearchBox}, Mode=OneWay}" />
<Setter Property="local:IconHelper.Height"
Value="{Binding Path=(local:IconHelper.Height), RelativeSource={RelativeSource AncestorType=local:SearchBox}, Mode=OneWay}" />
<Setter Property="local:IconHelper.VerticalAlignment"
Value="{Binding Path=(local:IconHelper.VerticalAlignment), RelativeSource={RelativeSource AncestorType=local:SearchBox}, Mode=OneWay}" />
<Setter Property="local:IconHelper.HorizontalAlignment"
Value="{Binding Path=(local:IconHelper.HorizontalAlignment), RelativeSource={RelativeSource AncestorType=local:SearchBox}, Mode=OneWay}" />
<Setter Property="local:IconHelper.MinWidth"
Value="{Binding Path=(local:IconHelper.MinWidth), RelativeSource={RelativeSource AncestorType=local:SearchBox}, Mode=OneWay}" />
<Setter Property="local:IconHelper.MinHeight"
Value="{Binding Path=(local:IconHelper.MinHeight), RelativeSource={RelativeSource AncestorType=local:SearchBox}, Mode=OneWay}" />
<Setter Property="local:IconHelper.MaxWidth"
Value="{Binding Path=(local:IconHelper.MaxWidth), RelativeSource={RelativeSource AncestorType=local:SearchBox}, Mode=OneWay}" />
<Setter Property="local:IconHelper.MaxHeight"
Value="{Binding Path=(local:IconHelper.MaxHeight), RelativeSource={RelativeSource AncestorType=local:SearchBox}, Mode=OneWay}" />
<Setter Property="local:IconHelper.FontSize"
Value="{Binding Path=(local:IconHelper.FontSize), RelativeSource={RelativeSource AncestorType=local:SearchBox}, Mode=OneWay}" />
<Setter Property="local:IconHelper.FontFamily"
Value="{Binding Path=(local:IconHelper.FontFamily), RelativeSource={RelativeSource AncestorType=local:SearchBox}, Mode=OneWay}" />
<Setter Property="Icon" <Setter Property="Icon"
Value="{Binding ItemsIcon, RelativeSource={RelativeSource AncestorType=local:SearchBox}, Mode=OneWay}" /> Value="{Binding ItemsIcon, RelativeSource={RelativeSource AncestorType=local:SearchBox}, Mode=OneWay}" />
<Setter Property="ShadowColor" <Setter Property="ShadowColor"
......
...@@ -37,14 +37,8 @@ ...@@ -37,14 +37,8 @@
TargetType="local:TagItem"> TargetType="local:TagItem">
<Setter Property="i:VisualStateHelper.Regist" <Setter Property="i:VisualStateHelper.Regist"
Value="True" /> Value="True" />
<Setter Property="local:IconHelper.FontFamily"
Value="{Binding IconFontFamily, Source={x:Static local:GlobalSettings.Setting}}" />
<Setter Property="local:IconHelper.FontSize"
Value="{Binding IconFontSize, Source={x:Static local:GlobalSettings.Setting}}" />
<Setter Property="local:IconHelper.Margin"
Value="0,0,5,0" />
<Setter Property="local:IconHelper.Foreground" <Setter Property="local:IconHelper.Foreground"
Value="{Binding Foreground, RelativeSource={RelativeSource Self}, Mode=OneWay}" /> Value="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource Self}, Mode=OneWay}" />
<Setter Property="Padding" <Setter Property="Padding"
Value="5" /> Value="5" />
<Setter Property="Background" <Setter Property="Background"
......
...@@ -17,14 +17,30 @@ ...@@ -17,14 +17,30 @@
Value="{Binding IsMouseOver, RelativeSource={RelativeSource Self}, Mode=OneWay}" /> Value="{Binding IsMouseOver, RelativeSource={RelativeSource Self}, Mode=OneWay}" />
<Setter Property="i:VisualStateHelper.IsChecked" <Setter Property="i:VisualStateHelper.IsChecked"
Value="{Binding IsChecked, RelativeSource={RelativeSource Self}, Mode=OneWay}" /> Value="{Binding IsChecked, RelativeSource={RelativeSource Self}, Mode=OneWay}" />
<Setter Property="local:IconHelper.FontFamily"
Value="{Binding IconFontFamily, Source={x:Static local:GlobalSettings.Setting}}" />
<Setter Property="local:IconHelper.FontSize"
Value="{Binding IconFontSize, Source={x:Static local:GlobalSettings.Setting}}" />
<Setter Property="local:IconHelper.Margin"
Value="0,0,5,0" />
<Setter Property="local:IconHelper.Foreground" <Setter Property="local:IconHelper.Foreground"
Value="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource Self}, Mode=OneWay}" /> Value="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource Self}, Mode=OneWay}" />
<Setter Property="local:IconHelper.Margin"
Value="{Binding Path=(local:IconHelper.Margin), RelativeSource={RelativeSource AncestorType=local:TimeSelector}, Mode=OneWay}" />
<Setter Property="local:IconHelper.Width"
Value="{Binding Path=(local:IconHelper.Width), RelativeSource={RelativeSource AncestorType=local:TimeSelector}, Mode=OneWay}" />
<Setter Property="local:IconHelper.Height"
Value="{Binding Path=(local:IconHelper.Height), RelativeSource={RelativeSource AncestorType=local:TimeSelector}, Mode=OneWay}" />
<Setter Property="local:IconHelper.VerticalAlignment"
Value="{Binding Path=(local:IconHelper.VerticalAlignment), RelativeSource={RelativeSource AncestorType=local:TimeSelector}, Mode=OneWay}" />
<Setter Property="local:IconHelper.HorizontalAlignment"
Value="{Binding Path=(local:IconHelper.HorizontalAlignment), RelativeSource={RelativeSource AncestorType=local:TimeSelector}, Mode=OneWay}" />
<Setter Property="local:IconHelper.MinWidth"
Value="{Binding Path=(local:IconHelper.MinWidth), RelativeSource={RelativeSource AncestorType=local:TimeSelector}, Mode=OneWay}" />
<Setter Property="local:IconHelper.MinHeight"
Value="{Binding Path=(local:IconHelper.MinHeight), RelativeSource={RelativeSource AncestorType=local:TimeSelector}, Mode=OneWay}" />
<Setter Property="local:IconHelper.MaxWidth"
Value="{Binding Path=(local:IconHelper.MaxWidth), RelativeSource={RelativeSource AncestorType=local:TimeSelector}, Mode=OneWay}" />
<Setter Property="local:IconHelper.MaxHeight"
Value="{Binding Path=(local:IconHelper.MaxHeight), RelativeSource={RelativeSource AncestorType=local:TimeSelector}, Mode=OneWay}" />
<Setter Property="local:IconHelper.FontSize"
Value="{Binding Path=(local:IconHelper.FontSize), RelativeSource={RelativeSource AncestorType=local:TimeSelector}, Mode=OneWay}" />
<Setter Property="local:IconHelper.FontFamily"
Value="{Binding Path=(local:IconHelper.FontFamily), RelativeSource={RelativeSource AncestorType=local:TimeSelector}, Mode=OneWay}" />
<Setter Property="Height" <Setter Property="Height"
Value="{Binding ItemsHeight, RelativeSource={RelativeSource AncestorType=local:TimeSelector}, Mode=OneWay}" /> Value="{Binding ItemsHeight, RelativeSource={RelativeSource AncestorType=local:TimeSelector}, Mode=OneWay}" />
<Setter Property="Foreground" <Setter Property="Foreground"
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<Setter Property="i:VisualStateHelper.Regist" <Setter Property="i:VisualStateHelper.Regist"
Value="True" /> Value="True" />
<Setter Property="local:IconHelper.Foreground" <Setter Property="local:IconHelper.Foreground"
Value="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource Self}, Mode=OneWay}" /> Value="{Binding Path=(local:IconHelper.Foreground), RelativeSource={RelativeSource AncestorType=local:Timeline}, Mode=OneWay}" />
<Setter Property="local:IconHelper.Margin" <Setter Property="local:IconHelper.Margin"
Value="{Binding Path=(local:IconHelper.Margin), RelativeSource={RelativeSource AncestorType=local:Timeline}, Mode=OneWay}" /> Value="{Binding Path=(local:IconHelper.Margin), RelativeSource={RelativeSource AncestorType=local:Timeline}, Mode=OneWay}" />
<Setter Property="local:IconHelper.Width" <Setter Property="local:IconHelper.Width"
......
...@@ -79,6 +79,8 @@ ...@@ -79,6 +79,8 @@
Value="{Binding IconFontFamily, Source={x:Static local:GlobalSettings.Setting}}" /> Value="{Binding IconFontFamily, Source={x:Static local:GlobalSettings.Setting}}" />
<Setter Property="local:IconHelper.FontSize" <Setter Property="local:IconHelper.FontSize"
Value="{Binding IconFontSize, Source={x:Static local:GlobalSettings.Setting}}" /> Value="{Binding IconFontSize, Source={x:Static local:GlobalSettings.Setting}}" />
<Setter Property="local:IconHelper.Foreground"
Value="{Binding ItemsToggleStroke, RelativeSource={RelativeSource Self}, Mode=OneWay}" />
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" <Setter Property="ScrollViewer.HorizontalScrollBarVisibility"
Value="Disabled" /> Value="Disabled" />
<Setter Property="VerticalContentAlignment" <Setter Property="VerticalContentAlignment"
...@@ -118,15 +120,15 @@ ...@@ -118,15 +120,15 @@
<Setter Property="ItemsPendingSpinGlyphThickness" <Setter Property="ItemsPendingSpinGlyphThickness"
Value="{Binding ItemsToggleStrokeThickness, RelativeSource={RelativeSource Self}, Mode=OneWay}" /> Value="{Binding ItemsToggleStrokeThickness, RelativeSource={RelativeSource Self}, Mode=OneWay}" />
<Setter Property="ItemsStickFill" <Setter Property="ItemsStickFill"
Value="Gray" /> Value="{Binding ItemsToggleStroke, RelativeSource={RelativeSource Self}, Mode=OneWay}" />
<Setter Property="ItemsStickThickness" <Setter Property="ItemsStickThickness"
Value="1.5" /> Value="{Binding ItemsToggleStrokeThickness, RelativeSource={RelativeSource Self}, Mode=OneWay}" />
<Setter Property="ItemsCompletedToggleFill" <Setter Property="ItemsCompletedToggleFill"
Value="#56b352" /> Value="#56b352" />
<Setter Property="ItemsCompletedToggleStrokeThickness" <Setter Property="ItemsCompletedToggleStrokeThickness"
Value="0" /> Value="0" />
<Setter Property="ItemsCompletedStickFill" <Setter Property="ItemsCompletedStickFill"
Value="#56b352" /> Value="{Binding ItemsCompletedToggleFill, RelativeSource={RelativeSource Self}, Mode=OneWay}" />
<Setter Property="ItemsCompletedGlyphBrush" <Setter Property="ItemsCompletedGlyphBrush"
Value="White" /> Value="White" />
<Setter Property="ItemsCompletedGlyphTemplate" <Setter Property="ItemsCompletedGlyphTemplate"
......
...@@ -30,7 +30,30 @@ ...@@ -30,7 +30,30 @@
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"> HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
<i:IconPresenter x:Name="IpIcon" <i:IconPresenter x:Name="IpIcon"
Content="{Binding Icon, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" Content="{Binding Icon, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" /> Margin="{Binding Path=(local:IconHelper.Margin), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Width="{Binding Path=(local:IconHelper.Width), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Height="{Binding Path=(local:IconHelper.Height), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinWidth="{Binding Path=(local:IconHelper.MinWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinHeight="{Binding Path=(local:IconHelper.MinHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxWidth="{Binding Path=(local:IconHelper.MaxWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxHeight="{Binding Path=(local:IconHelper.MaxHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
HorizontalContentAlignment="{Binding Path=(local:IconHelper.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalContentAlignment="{Binding Path=(local:IconHelper.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(local:IconHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontFamily="{Binding Path=(local:IconHelper.FontFamily), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontSize="{Binding Path=(local:IconHelper.FontSize), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
ToolTip="{Binding Path=(local:IconHelper.ToolTip), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<i:IconPresenter.Visibility>
<MultiBinding Converter="{StaticResource {x:Static irs:ConverterKeys.IconVisibilityConverter}}">
<Binding Path="Icon"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
<Binding Path="(local:IconHelper.HiddenOnNull)"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
</MultiBinding>
</i:IconPresenter.Visibility>
</i:IconPresenter>
<ContentPresenter VerticalAlignment="{TemplateBinding VerticalContentAlignment}" <ContentPresenter VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Margin="{TemplateBinding Padding}" Margin="{TemplateBinding Padding}"
......
...@@ -125,7 +125,30 @@ ...@@ -125,7 +125,30 @@
<i:IconPresenter x:Name="IpIcon" <i:IconPresenter x:Name="IpIcon"
DockPanel.Dock="{Binding Path=(local:ButtonHelper.IconPlacement), Converter={StaticResource {x:Static irs:ConverterKeys.IconPlacementToDockConverter}}, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" DockPanel.Dock="{Binding Path=(local:ButtonHelper.IconPlacement), Converter={StaticResource {x:Static irs:ConverterKeys.IconPlacementToDockConverter}}, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Content="{Binding Path=(local:ButtonHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" Content="{Binding Path=(local:ButtonHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" /> Margin="{Binding Path=(local:IconHelper.Margin), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Width="{Binding Path=(local:IconHelper.Width), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Height="{Binding Path=(local:IconHelper.Height), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinWidth="{Binding Path=(local:IconHelper.MinWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinHeight="{Binding Path=(local:IconHelper.MinHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxWidth="{Binding Path=(local:IconHelper.MaxWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxHeight="{Binding Path=(local:IconHelper.MaxHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
HorizontalContentAlignment="{Binding Path=(local:IconHelper.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalContentAlignment="{Binding Path=(local:IconHelper.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(local:IconHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontFamily="{Binding Path=(local:IconHelper.FontFamily), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontSize="{Binding Path=(local:IconHelper.FontSize), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
ToolTip="{Binding Path=(local:IconHelper.ToolTip), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<i:IconPresenter.Visibility>
<MultiBinding Converter="{StaticResource {x:Static irs:ConverterKeys.IconVisibilityConverter}}">
<Binding Path="(local:ButtonHelper.Icon)"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
<Binding Path="(local:IconHelper.HiddenOnNull)"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
</MultiBinding>
</i:IconPresenter.Visibility>
</i:IconPresenter>
<ContentPresenter VerticalAlignment="{TemplateBinding VerticalContentAlignment}" <ContentPresenter VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Focusable="False" Focusable="False"
......
...@@ -32,7 +32,30 @@ ...@@ -32,7 +32,30 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<i:IconPresenter x:Name="IpIcon" <i:IconPresenter x:Name="IpIcon"
Content="{Binding Icon, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" Content="{Binding Icon, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" /> Margin="{Binding Path=(local:IconHelper.Margin), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Width="{Binding Path=(local:IconHelper.Width), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Height="{Binding Path=(local:IconHelper.Height), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinWidth="{Binding Path=(local:IconHelper.MinWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinHeight="{Binding Path=(local:IconHelper.MinHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxWidth="{Binding Path=(local:IconHelper.MaxWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxHeight="{Binding Path=(local:IconHelper.MaxHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
HorizontalContentAlignment="{Binding Path=(local:IconHelper.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalContentAlignment="{Binding Path=(local:IconHelper.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(local:IconHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontFamily="{Binding Path=(local:IconHelper.FontFamily), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontSize="{Binding Path=(local:IconHelper.FontSize), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
ToolTip="{Binding Path=(local:IconHelper.ToolTip), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<i:IconPresenter.Visibility>
<MultiBinding Converter="{StaticResource {x:Static irs:ConverterKeys.IconVisibilityConverter}}">
<Binding Path="Icon"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
<Binding Path="(local:IconHelper.HiddenOnNull)"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
</MultiBinding>
</i:IconPresenter.Visibility>
</i:IconPresenter>
<ToggleButton Grid.Column="1" <ToggleButton Grid.Column="1"
Focusable="False" Focusable="False"
Padding="{TemplateBinding Padding}" Padding="{TemplateBinding Padding}"
......
...@@ -30,7 +30,30 @@ ...@@ -30,7 +30,30 @@
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"> HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
<i:IconPresenter x:Name="IpIcon" <i:IconPresenter x:Name="IpIcon"
Content="{Binding Path=(local:ComboBoxItemHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" Content="{Binding Path=(local:ComboBoxItemHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" /> Margin="{Binding Path=(local:IconHelper.Margin), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Width="{Binding Path=(local:IconHelper.Width), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Height="{Binding Path=(local:IconHelper.Height), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinWidth="{Binding Path=(local:IconHelper.MinWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinHeight="{Binding Path=(local:IconHelper.MinHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxWidth="{Binding Path=(local:IconHelper.MaxWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxHeight="{Binding Path=(local:IconHelper.MaxHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
HorizontalContentAlignment="{Binding Path=(local:IconHelper.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalContentAlignment="{Binding Path=(local:IconHelper.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(local:IconHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontFamily="{Binding Path=(local:IconHelper.FontFamily), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontSize="{Binding Path=(local:IconHelper.FontSize), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
ToolTip="{Binding Path=(local:IconHelper.ToolTip), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<i:IconPresenter.Visibility>
<MultiBinding Converter="{StaticResource {x:Static irs:ConverterKeys.IconVisibilityConverter}}">
<Binding Path="(local:ComboBoxItemHelper.Icon)"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
<Binding Path="(local:IconHelper.HiddenOnNull)"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
</MultiBinding>
</i:IconPresenter.Visibility>
</i:IconPresenter>
<ContentPresenter Margin="{TemplateBinding Padding}" /> <ContentPresenter Margin="{TemplateBinding Padding}" />
</DockPanel> </DockPanel>
</Border> </Border>
...@@ -139,7 +162,30 @@ ...@@ -139,7 +162,30 @@
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"> HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
<i:IconPresenter x:Name="IpIcon" <i:IconPresenter x:Name="IpIcon"
Content="{Binding Path=(local:ComboBoxItemHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" Content="{Binding Path=(local:ComboBoxItemHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" /> Margin="{Binding Path=(local:IconHelper.Margin), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Width="{Binding Path=(local:IconHelper.Width), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Height="{Binding Path=(local:IconHelper.Height), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinWidth="{Binding Path=(local:IconHelper.MinWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinHeight="{Binding Path=(local:IconHelper.MinHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxWidth="{Binding Path=(local:IconHelper.MaxWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxHeight="{Binding Path=(local:IconHelper.MaxHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
HorizontalContentAlignment="{Binding Path=(local:IconHelper.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalContentAlignment="{Binding Path=(local:IconHelper.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(local:IconHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontFamily="{Binding Path=(local:IconHelper.FontFamily), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontSize="{Binding Path=(local:IconHelper.FontSize), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
ToolTip="{Binding Path=(local:IconHelper.ToolTip), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<i:IconPresenter.Visibility>
<MultiBinding Converter="{StaticResource {x:Static irs:ConverterKeys.IconVisibilityConverter}}">
<Binding Path="(local:ComboBoxItemHelper.Icon)"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
<Binding Path="(local:IconHelper.HiddenOnNull)"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
</MultiBinding>
</i:IconPresenter.Visibility>
</i:IconPresenter>
<Grid Margin="{TemplateBinding Padding}"> <Grid Margin="{TemplateBinding Padding}">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition /> <ColumnDefinition />
......
...@@ -30,7 +30,30 @@ ...@@ -30,7 +30,30 @@
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"> HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
<i:IconPresenter x:Name="IpIcon" <i:IconPresenter x:Name="IpIcon"
Content="{Binding Path=(local:ComboBoxHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" Content="{Binding Path=(local:ComboBoxHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" /> Margin="{Binding Path=(local:IconHelper.Margin), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Width="{Binding Path=(local:IconHelper.Width), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Height="{Binding Path=(local:IconHelper.Height), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinWidth="{Binding Path=(local:IconHelper.MinWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinHeight="{Binding Path=(local:IconHelper.MinHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxWidth="{Binding Path=(local:IconHelper.MaxWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxHeight="{Binding Path=(local:IconHelper.MaxHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
HorizontalContentAlignment="{Binding Path=(local:IconHelper.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalContentAlignment="{Binding Path=(local:IconHelper.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(local:IconHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontFamily="{Binding Path=(local:IconHelper.FontFamily), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontSize="{Binding Path=(local:IconHelper.FontSize), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
ToolTip="{Binding Path=(local:IconHelper.ToolTip), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<i:IconPresenter.Visibility>
<MultiBinding Converter="{StaticResource {x:Static irs:ConverterKeys.IconVisibilityConverter}}">
<Binding Path="(local:ComboBoxHelper.Icon)"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
<Binding Path="(local:IconHelper.HiddenOnNull)"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
</MultiBinding>
</i:IconPresenter.Visibility>
</i:IconPresenter>
<ToggleButton Focusable="False" <ToggleButton Focusable="False"
Padding="{TemplateBinding Padding}" Padding="{TemplateBinding Padding}"
IsChecked="{Binding IsDropDownOpen, RelativeSource={RelativeSource AncestorType=ComboBox}, Mode=TwoWay}"> IsChecked="{Binding IsDropDownOpen, RelativeSource={RelativeSource AncestorType=ComboBox}, Mode=TwoWay}">
...@@ -320,7 +343,30 @@ ...@@ -320,7 +343,30 @@
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"> HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
<i:IconPresenter x:Name="IpIcon" <i:IconPresenter x:Name="IpIcon"
Content="{Binding Path=(local:ComboBoxHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" Content="{Binding Path=(local:ComboBoxHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" /> Margin="{Binding Path=(local:IconHelper.Margin), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Width="{Binding Path=(local:IconHelper.Width), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Height="{Binding Path=(local:IconHelper.Height), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinWidth="{Binding Path=(local:IconHelper.MinWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinHeight="{Binding Path=(local:IconHelper.MinHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxWidth="{Binding Path=(local:IconHelper.MaxWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxHeight="{Binding Path=(local:IconHelper.MaxHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
HorizontalContentAlignment="{Binding Path=(local:IconHelper.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalContentAlignment="{Binding Path=(local:IconHelper.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(local:IconHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontFamily="{Binding Path=(local:IconHelper.FontFamily), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontSize="{Binding Path=(local:IconHelper.FontSize), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
ToolTip="{Binding Path=(local:IconHelper.ToolTip), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<i:IconPresenter.Visibility>
<MultiBinding Converter="{StaticResource {x:Static irs:ConverterKeys.IconVisibilityConverter}}">
<Binding Path="(local:ComboBoxHelper.Icon)"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
<Binding Path="(local:IconHelper.HiddenOnNull)"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
</MultiBinding>
</i:IconPresenter.Visibility>
</i:IconPresenter>
<ToggleButton Padding="{TemplateBinding Padding}" <ToggleButton Padding="{TemplateBinding Padding}"
Focusable="False" Focusable="False"
IsChecked="{Binding IsDropDownOpen, RelativeSource={RelativeSource AncestorType=ComboBox}, Mode=TwoWay}"> IsChecked="{Binding IsDropDownOpen, RelativeSource={RelativeSource AncestorType=ComboBox}, Mode=TwoWay}">
......
...@@ -48,9 +48,31 @@ ...@@ -48,9 +48,31 @@
</Grid.RowDefinitions> </Grid.RowDefinitions>
<i:IconPresenter x:Name="PART_Icon" <i:IconPresenter x:Name="PART_Icon"
Grid.Row="1" Grid.Row="1"
Focusable="False"
Content="{TemplateBinding Icon}" Content="{TemplateBinding Icon}"
Source="{TemplateBinding Source}" /> Margin="{Binding Path=(local:IconHelper.Margin), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Width="{Binding Path=(local:IconHelper.Width), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Height="{Binding Path=(local:IconHelper.Height), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinWidth="{Binding Path=(local:IconHelper.MinWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinHeight="{Binding Path=(local:IconHelper.MinHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxWidth="{Binding Path=(local:IconHelper.MaxWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxHeight="{Binding Path=(local:IconHelper.MaxHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
HorizontalContentAlignment="{Binding Path=(local:IconHelper.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalContentAlignment="{Binding Path=(local:IconHelper.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(local:IconHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontFamily="{Binding Path=(local:IconHelper.FontFamily), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontSize="{Binding Path=(local:IconHelper.FontSize), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
ToolTip="{Binding Path=(local:IconHelper.ToolTip), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<i:IconPresenter.Visibility>
<MultiBinding Converter="{StaticResource {x:Static irs:ConverterKeys.IconVisibilityConverter}}">
<Binding Path="Icon"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
<Binding Path="(local:IconHelper.HiddenOnNull)"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
</MultiBinding>
</i:IconPresenter.Visibility>
</i:IconPresenter>
<ContentPresenter x:Name="cpContent" <ContentPresenter x:Name="cpContent"
Grid.Row="1" Grid.Row="1"
Grid.Column="1" Grid.Column="1"
......
...@@ -37,7 +37,30 @@ ...@@ -37,7 +37,30 @@
<Grid Width="{Binding Path=(local:ContextMenuHelper.ItemsIconWidth), RelativeSource={RelativeSource AncestorType=ContextMenu}, Mode=OneWay}"> <Grid Width="{Binding Path=(local:ContextMenuHelper.ItemsIconWidth), RelativeSource={RelativeSource AncestorType=ContextMenu}, Mode=OneWay}">
<i:IconPresenter x:Name="IpIcon" <i:IconPresenter x:Name="IpIcon"
Content="{TemplateBinding Icon}" Content="{TemplateBinding Icon}"
Source="{Binding RelativeSource={RelativeSource AncestorType=MenuItem}, Mode=OneWay}" /> Margin="{Binding Path=(local:IconHelper.Margin), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Width="{Binding Path=(local:IconHelper.Width), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Height="{Binding Path=(local:IconHelper.Height), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinWidth="{Binding Path=(local:IconHelper.MinWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinHeight="{Binding Path=(local:IconHelper.MinHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxWidth="{Binding Path=(local:IconHelper.MaxWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxHeight="{Binding Path=(local:IconHelper.MaxHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
HorizontalContentAlignment="{Binding Path=(local:IconHelper.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalContentAlignment="{Binding Path=(local:IconHelper.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(local:IconHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontFamily="{Binding Path=(local:IconHelper.FontFamily), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontSize="{Binding Path=(local:IconHelper.FontSize), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
ToolTip="{Binding Path=(local:IconHelper.ToolTip), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<i:IconPresenter.Visibility>
<MultiBinding Converter="{StaticResource {x:Static irs:ConverterKeys.IconVisibilityConverter}}">
<Binding Path="Icon"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
<Binding Path="(local:IconHelper.HiddenOnNull)"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
</MultiBinding>
</i:IconPresenter.Visibility>
</i:IconPresenter>
<ContentControl x:Name="CcChecked" <ContentControl x:Name="CcChecked"
Visibility="Collapsed" Visibility="Collapsed"
Width="{Binding Path=(local:IconHelper.Width), RelativeSource={RelativeSource AncestorType=ContextMenu}, Mode=OneWay}" Width="{Binding Path=(local:IconHelper.Width), RelativeSource={RelativeSource AncestorType=ContextMenu}, Mode=OneWay}"
......
...@@ -32,7 +32,30 @@ ...@@ -32,7 +32,30 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<i:IconPresenter x:Name="IpIcon" <i:IconPresenter x:Name="IpIcon"
Content="{Binding Icon, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" Content="{Binding Icon, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" /> Margin="{Binding Path=(local:IconHelper.Margin), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Width="{Binding Path=(local:IconHelper.Width), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Height="{Binding Path=(local:IconHelper.Height), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinWidth="{Binding Path=(local:IconHelper.MinWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinHeight="{Binding Path=(local:IconHelper.MinHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxWidth="{Binding Path=(local:IconHelper.MaxWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxHeight="{Binding Path=(local:IconHelper.MaxHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
HorizontalContentAlignment="{Binding Path=(local:IconHelper.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalContentAlignment="{Binding Path=(local:IconHelper.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(local:IconHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontFamily="{Binding Path=(local:IconHelper.FontFamily), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontSize="{Binding Path=(local:IconHelper.FontSize), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
ToolTip="{Binding Path=(local:IconHelper.ToolTip), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<i:IconPresenter.Visibility>
<MultiBinding Converter="{StaticResource {x:Static irs:ConverterKeys.IconVisibilityConverter}}">
<Binding Path="Icon"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
<Binding Path="(local:IconHelper.HiddenOnNull)"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
</MultiBinding>
</i:IconPresenter.Visibility>
</i:IconPresenter>
<ToggleButton Grid.Column="1" <ToggleButton Grid.Column="1"
Focusable="False" Focusable="False"
Padding="{TemplateBinding Padding}" Padding="{TemplateBinding Padding}"
......
...@@ -65,7 +65,30 @@ ...@@ -65,7 +65,30 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<i:IconPresenter x:Name="IpIcon" <i:IconPresenter x:Name="IpIcon"
Content="{Binding Path=(local:GroupBoxHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" Content="{Binding Path=(local:GroupBoxHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" /> Margin="{Binding Path=(local:IconHelper.Margin), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Width="{Binding Path=(local:IconHelper.Width), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Height="{Binding Path=(local:IconHelper.Height), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinWidth="{Binding Path=(local:IconHelper.MinWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinHeight="{Binding Path=(local:IconHelper.MinHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxWidth="{Binding Path=(local:IconHelper.MaxWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxHeight="{Binding Path=(local:IconHelper.MaxHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
HorizontalContentAlignment="{Binding Path=(local:IconHelper.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalContentAlignment="{Binding Path=(local:IconHelper.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(local:IconHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontFamily="{Binding Path=(local:IconHelper.FontFamily), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontSize="{Binding Path=(local:IconHelper.FontSize), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
ToolTip="{Binding Path=(local:IconHelper.ToolTip), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<i:IconPresenter.Visibility>
<MultiBinding Converter="{StaticResource {x:Static irs:ConverterKeys.IconVisibilityConverter}}">
<Binding Path="(local:GroupBoxHelper.Icon)"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
<Binding Path="(local:IconHelper.HiddenOnNull)"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
</MultiBinding>
</i:IconPresenter.Visibility>
</i:IconPresenter>
<Grid Grid.Column="1" <Grid Grid.Column="1"
VerticalAlignment="{Binding Path=(local:GroupBoxHelper.HeaderVerticalContentAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" VerticalAlignment="{Binding Path=(local:GroupBoxHelper.HeaderVerticalContentAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
HorizontalAlignment="{Binding Path=(local:GroupBoxHelper.HeaderHorizontalContentAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" HorizontalAlignment="{Binding Path=(local:GroupBoxHelper.HeaderHorizontalContentAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
......
...@@ -26,7 +26,30 @@ ...@@ -26,7 +26,30 @@
<i:IconPresenter x:Name="IpIcon" <i:IconPresenter x:Name="IpIcon"
DockPanel.Dock="{Binding Path=(local:LabelHelper.IconPlacement), Converter={StaticResource {x:Static irs:ConverterKeys.IconPlacementToDockConverter}}, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" DockPanel.Dock="{Binding Path=(local:LabelHelper.IconPlacement), Converter={StaticResource {x:Static irs:ConverterKeys.IconPlacementToDockConverter}}, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Content="{Binding Path=(local:LabelHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" Content="{Binding Path=(local:LabelHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" /> Margin="{Binding Path=(local:IconHelper.Margin), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Width="{Binding Path=(local:IconHelper.Width), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Height="{Binding Path=(local:IconHelper.Height), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinWidth="{Binding Path=(local:IconHelper.MinWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinHeight="{Binding Path=(local:IconHelper.MinHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxWidth="{Binding Path=(local:IconHelper.MaxWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxHeight="{Binding Path=(local:IconHelper.MaxHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
HorizontalContentAlignment="{Binding Path=(local:IconHelper.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalContentAlignment="{Binding Path=(local:IconHelper.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(local:IconHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontFamily="{Binding Path=(local:IconHelper.FontFamily), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontSize="{Binding Path=(local:IconHelper.FontSize), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
ToolTip="{Binding Path=(local:IconHelper.ToolTip), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<i:IconPresenter.Visibility>
<MultiBinding Converter="{StaticResource {x:Static irs:ConverterKeys.IconVisibilityConverter}}">
<Binding Path="(local:LabelHelper.Icon)"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
<Binding Path="(local:IconHelper.HiddenOnNull)"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
</MultiBinding>
</i:IconPresenter.Visibility>
</i:IconPresenter>
<ContentPresenter VerticalAlignment="{TemplateBinding VerticalContentAlignment}" <ContentPresenter VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Focusable="False" Focusable="False"
......
...@@ -41,7 +41,30 @@ ...@@ -41,7 +41,30 @@
<i:IconPresenter x:Name="IpIcon" <i:IconPresenter x:Name="IpIcon"
DockPanel.Dock="{Binding Path=(local:ListBoxItemHelper.IconPlacement), Converter={StaticResource {x:Static irs:ConverterKeys.IconPlacementToDockConverter}}, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" DockPanel.Dock="{Binding Path=(local:ListBoxItemHelper.IconPlacement), Converter={StaticResource {x:Static irs:ConverterKeys.IconPlacementToDockConverter}}, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Content="{Binding Path=(local:ListBoxItemHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" Content="{Binding Path=(local:ListBoxItemHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" /> Margin="{Binding Path=(local:IconHelper.Margin), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Width="{Binding Path=(local:IconHelper.Width), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Height="{Binding Path=(local:IconHelper.Height), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinWidth="{Binding Path=(local:IconHelper.MinWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinHeight="{Binding Path=(local:IconHelper.MinHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxWidth="{Binding Path=(local:IconHelper.MaxWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxHeight="{Binding Path=(local:IconHelper.MaxHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
HorizontalContentAlignment="{Binding Path=(local:IconHelper.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalContentAlignment="{Binding Path=(local:IconHelper.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(local:IconHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontFamily="{Binding Path=(local:IconHelper.FontFamily), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontSize="{Binding Path=(local:IconHelper.FontSize), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
ToolTip="{Binding Path=(local:IconHelper.ToolTip), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<i:IconPresenter.Visibility>
<MultiBinding Converter="{StaticResource {x:Static irs:ConverterKeys.IconVisibilityConverter}}">
<Binding Path="(local:ListBoxItemHelper.Icon)"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
<Binding Path="(local:IconHelper.HiddenOnNull)"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
</MultiBinding>
</i:IconPresenter.Visibility>
</i:IconPresenter>
</Border> </Border>
<Grid Grid.Column="1" <Grid Grid.Column="1"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
......
...@@ -36,7 +36,30 @@ ...@@ -36,7 +36,30 @@
<Grid Width="{Binding Path=(local:MenuHelper.TopLevelItemsIconWidth), RelativeSource={RelativeSource AncestorType=Menu}, Mode=OneWay}"> <Grid Width="{Binding Path=(local:MenuHelper.TopLevelItemsIconWidth), RelativeSource={RelativeSource AncestorType=Menu}, Mode=OneWay}">
<i:IconPresenter x:Name="IpIcon" <i:IconPresenter x:Name="IpIcon"
Content="{TemplateBinding Icon}" Content="{TemplateBinding Icon}"
Source="{Binding RelativeSource={RelativeSource AncestorType=MenuItem}, Mode=OneWay}" /> Margin="{Binding Path=(local:IconHelper.Margin), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Width="{Binding Path=(local:IconHelper.Width), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Height="{Binding Path=(local:IconHelper.Height), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinWidth="{Binding Path=(local:IconHelper.MinWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinHeight="{Binding Path=(local:IconHelper.MinHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxWidth="{Binding Path=(local:IconHelper.MaxWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxHeight="{Binding Path=(local:IconHelper.MaxHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
HorizontalContentAlignment="{Binding Path=(local:IconHelper.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalContentAlignment="{Binding Path=(local:IconHelper.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(local:IconHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontFamily="{Binding Path=(local:IconHelper.FontFamily), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontSize="{Binding Path=(local:IconHelper.FontSize), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
ToolTip="{Binding Path=(local:IconHelper.ToolTip), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<i:IconPresenter.Visibility>
<MultiBinding Converter="{StaticResource {x:Static irs:ConverterKeys.IconVisibilityConverter}}">
<Binding Path="Icon"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
<Binding Path="(local:IconHelper.HiddenOnNull)"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
</MultiBinding>
</i:IconPresenter.Visibility>
</i:IconPresenter>
<ContentControl x:Name="CcChecked" <ContentControl x:Name="CcChecked"
Visibility="Collapsed" Visibility="Collapsed"
Width="{Binding Path=(local:IconHelper.Width), RelativeSource={RelativeSource AncestorType=Menu}, Mode=OneWay}" Width="{Binding Path=(local:IconHelper.Width), RelativeSource={RelativeSource AncestorType=Menu}, Mode=OneWay}"
...@@ -436,7 +459,30 @@ ...@@ -436,7 +459,30 @@
<Grid Width="{Binding Path=(local:MenuHelper.SubmenuItemsIconWidth), RelativeSource={RelativeSource AncestorType=Menu}, Mode=OneWay}"> <Grid Width="{Binding Path=(local:MenuHelper.SubmenuItemsIconWidth), RelativeSource={RelativeSource AncestorType=Menu}, Mode=OneWay}">
<i:IconPresenter x:Name="IpIcon" <i:IconPresenter x:Name="IpIcon"
Content="{TemplateBinding Icon}" Content="{TemplateBinding Icon}"
Source="{Binding RelativeSource={RelativeSource AncestorType=MenuItem}, Mode=OneWay}" /> Margin="{Binding Path=(local:IconHelper.Margin), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Width="{Binding Path=(local:IconHelper.Width), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Height="{Binding Path=(local:IconHelper.Height), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinWidth="{Binding Path=(local:IconHelper.MinWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinHeight="{Binding Path=(local:IconHelper.MinHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxWidth="{Binding Path=(local:IconHelper.MaxWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxHeight="{Binding Path=(local:IconHelper.MaxHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
HorizontalContentAlignment="{Binding Path=(local:IconHelper.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalContentAlignment="{Binding Path=(local:IconHelper.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(local:IconHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontFamily="{Binding Path=(local:IconHelper.FontFamily), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontSize="{Binding Path=(local:IconHelper.FontSize), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
ToolTip="{Binding Path=(local:IconHelper.ToolTip), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<i:IconPresenter.Visibility>
<MultiBinding Converter="{StaticResource {x:Static irs:ConverterKeys.IconVisibilityConverter}}">
<Binding Path="Icon"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
<Binding Path="(local:IconHelper.HiddenOnNull)"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
</MultiBinding>
</i:IconPresenter.Visibility>
</i:IconPresenter>
<ContentControl x:Name="CcChecked" <ContentControl x:Name="CcChecked"
Visibility="Collapsed" Visibility="Collapsed"
ContentTemplate="{Binding Path=(local:MenuHelper.CheckedIconTemplate), RelativeSource={RelativeSource AncestorType=Menu}, Mode=OneWay}" /> ContentTemplate="{Binding Path=(local:MenuHelper.CheckedIconTemplate), RelativeSource={RelativeSource AncestorType=Menu}, Mode=OneWay}" />
......
...@@ -35,7 +35,30 @@ ...@@ -35,7 +35,30 @@
<Border x:Name="BdrIcon"> <Border x:Name="BdrIcon">
<i:IconPresenter x:Name="IpIcon" <i:IconPresenter x:Name="IpIcon"
Content="{TemplateBinding Icon}" Content="{TemplateBinding Icon}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" /> Margin="{Binding Path=(local:IconHelper.Margin), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Width="{Binding Path=(local:IconHelper.Width), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Height="{Binding Path=(local:IconHelper.Height), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinWidth="{Binding Path=(local:IconHelper.MinWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinHeight="{Binding Path=(local:IconHelper.MinHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxWidth="{Binding Path=(local:IconHelper.MaxWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxHeight="{Binding Path=(local:IconHelper.MaxHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
HorizontalContentAlignment="{Binding Path=(local:IconHelper.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalContentAlignment="{Binding Path=(local:IconHelper.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(local:IconHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontFamily="{Binding Path=(local:IconHelper.FontFamily), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontSize="{Binding Path=(local:IconHelper.FontSize), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
ToolTip="{Binding Path=(local:IconHelper.ToolTip), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<i:IconPresenter.Visibility>
<MultiBinding Converter="{StaticResource {x:Static irs:ConverterKeys.IconVisibilityConverter}}">
<Binding Path="Icon"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
<Binding Path="(local:IconHelper.HiddenOnNull)"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
</MultiBinding>
</i:IconPresenter.Visibility>
</i:IconPresenter>
</Border> </Border>
<ContentControl x:Name="CcChecked" <ContentControl x:Name="CcChecked"
Visibility="Collapsed" Visibility="Collapsed"
......
...@@ -49,7 +49,30 @@ ...@@ -49,7 +49,30 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<i:IconPresenter x:Name="IpIcon" <i:IconPresenter x:Name="IpIcon"
Content="{TemplateBinding Icon}" Content="{TemplateBinding Icon}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" /> Margin="{Binding Path=(local:IconHelper.Margin), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Width="{Binding Path=(local:IconHelper.Width), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Height="{Binding Path=(local:IconHelper.Height), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinWidth="{Binding Path=(local:IconHelper.MinWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinHeight="{Binding Path=(local:IconHelper.MinHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxWidth="{Binding Path=(local:IconHelper.MaxWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxHeight="{Binding Path=(local:IconHelper.MaxHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
HorizontalContentAlignment="{Binding Path=(local:IconHelper.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalContentAlignment="{Binding Path=(local:IconHelper.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(local:IconHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontFamily="{Binding Path=(local:IconHelper.FontFamily), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontSize="{Binding Path=(local:IconHelper.FontSize), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
ToolTip="{Binding Path=(local:IconHelper.ToolTip), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<i:IconPresenter.Visibility>
<MultiBinding Converter="{StaticResource {x:Static irs:ConverterKeys.IconVisibilityConverter}}">
<Binding Path="Icon"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
<Binding Path="(local:IconHelper.HiddenOnNull)"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
</MultiBinding>
</i:IconPresenter.Visibility>
</i:IconPresenter>
<ToggleButton Grid.Column="1" <ToggleButton Grid.Column="1"
Focusable="False" Focusable="False"
Padding="{TemplateBinding Padding}" Padding="{TemplateBinding Padding}"
......
...@@ -30,7 +30,30 @@ ...@@ -30,7 +30,30 @@
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"> HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
<i:IconPresenter x:Name="IpIcon" <i:IconPresenter x:Name="IpIcon"
Content="{Binding Path=(local:PasswordBoxHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" Content="{Binding Path=(local:PasswordBoxHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" /> Margin="{Binding Path=(local:IconHelper.Margin), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Width="{Binding Path=(local:IconHelper.Width), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Height="{Binding Path=(local:IconHelper.Height), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinWidth="{Binding Path=(local:IconHelper.MinWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinHeight="{Binding Path=(local:IconHelper.MinHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxWidth="{Binding Path=(local:IconHelper.MaxWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxHeight="{Binding Path=(local:IconHelper.MaxHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
HorizontalContentAlignment="{Binding Path=(local:IconHelper.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalContentAlignment="{Binding Path=(local:IconHelper.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(local:IconHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontFamily="{Binding Path=(local:IconHelper.FontFamily), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontSize="{Binding Path=(local:IconHelper.FontSize), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
ToolTip="{Binding Path=(local:IconHelper.ToolTip), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<i:IconPresenter.Visibility>
<MultiBinding Converter="{StaticResource {x:Static irs:ConverterKeys.IconVisibilityConverter}}">
<Binding Path="(local:PasswordBoxHelper.Icon)"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
<Binding Path="(local:IconHelper.HiddenOnNull)"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
</MultiBinding>
</i:IconPresenter.Visibility>
</i:IconPresenter>
<Grid> <Grid>
<Border Margin="{TemplateBinding Padding}"> <Border Margin="{TemplateBinding Padding}">
<ContentControl Margin="2,0,0,0" <ContentControl Margin="2,0,0,0"
...@@ -70,7 +93,30 @@ ...@@ -70,7 +93,30 @@
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"> HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
<i:IconPresenter x:Name="IpIcon" <i:IconPresenter x:Name="IpIcon"
Content="{Binding Path=(local:PasswordBoxHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" Content="{Binding Path=(local:PasswordBoxHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" /> Margin="{Binding Path=(local:IconHelper.Margin), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Width="{Binding Path=(local:IconHelper.Width), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Height="{Binding Path=(local:IconHelper.Height), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinWidth="{Binding Path=(local:IconHelper.MinWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinHeight="{Binding Path=(local:IconHelper.MinHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxWidth="{Binding Path=(local:IconHelper.MaxWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxHeight="{Binding Path=(local:IconHelper.MaxHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
HorizontalContentAlignment="{Binding Path=(local:IconHelper.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalContentAlignment="{Binding Path=(local:IconHelper.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(local:IconHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontFamily="{Binding Path=(local:IconHelper.FontFamily), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontSize="{Binding Path=(local:IconHelper.FontSize), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
ToolTip="{Binding Path=(local:IconHelper.ToolTip), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<i:IconPresenter.Visibility>
<MultiBinding Converter="{StaticResource {x:Static irs:ConverterKeys.IconVisibilityConverter}}">
<Binding Path="(local:PasswordBoxHelper.Icon)"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
<Binding Path="(local:IconHelper.HiddenOnNull)"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
</MultiBinding>
</i:IconPresenter.Visibility>
</i:IconPresenter>
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition /> <ColumnDefinition />
......
...@@ -122,7 +122,30 @@ ...@@ -122,7 +122,30 @@
<i:IconPresenter x:Name="IpIcon" <i:IconPresenter x:Name="IpIcon"
DockPanel.Dock="{Binding Path=(local:RepeatButtonHelper.IconPlacement), Converter={StaticResource {x:Static irs:ConverterKeys.IconPlacementToDockConverter}}, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" DockPanel.Dock="{Binding Path=(local:RepeatButtonHelper.IconPlacement), Converter={StaticResource {x:Static irs:ConverterKeys.IconPlacementToDockConverter}}, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Content="{Binding Path=(local:RepeatButtonHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" Content="{Binding Path=(local:RepeatButtonHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" /> Margin="{Binding Path=(local:IconHelper.Margin), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Width="{Binding Path=(local:IconHelper.Width), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Height="{Binding Path=(local:IconHelper.Height), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinWidth="{Binding Path=(local:IconHelper.MinWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinHeight="{Binding Path=(local:IconHelper.MinHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxWidth="{Binding Path=(local:IconHelper.MaxWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxHeight="{Binding Path=(local:IconHelper.MaxHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
HorizontalContentAlignment="{Binding Path=(local:IconHelper.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalContentAlignment="{Binding Path=(local:IconHelper.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(local:IconHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontFamily="{Binding Path=(local:IconHelper.FontFamily), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontSize="{Binding Path=(local:IconHelper.FontSize), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
ToolTip="{Binding Path=(local:IconHelper.ToolTip), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<i:IconPresenter.Visibility>
<MultiBinding Converter="{StaticResource {x:Static irs:ConverterKeys.IconVisibilityConverter}}">
<Binding Path="(local:RepeatButtonHelper.Icon)"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
<Binding Path="(local:IconHelper.HiddenOnNull)"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
</MultiBinding>
</i:IconPresenter.Visibility>
</i:IconPresenter>
<ContentPresenter VerticalAlignment="{TemplateBinding VerticalContentAlignment}" <ContentPresenter VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Margin="{TemplateBinding Padding}" Margin="{TemplateBinding Padding}"
......
...@@ -30,8 +30,31 @@ ...@@ -30,8 +30,31 @@
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"> HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
<i:IconPresenter x:Name="IpIcon" <i:IconPresenter x:Name="IpIcon"
Content="{Binding Path=(local:ComboBoxItemHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" Content="{Binding Icon, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" /> Margin="{Binding Path=(local:IconHelper.Margin), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Width="{Binding Path=(local:IconHelper.Width), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Height="{Binding Path=(local:IconHelper.Height), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinWidth="{Binding Path=(local:IconHelper.MinWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinHeight="{Binding Path=(local:IconHelper.MinHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxWidth="{Binding Path=(local:IconHelper.MaxWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxHeight="{Binding Path=(local:IconHelper.MaxHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
HorizontalContentAlignment="{Binding Path=(local:IconHelper.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalContentAlignment="{Binding Path=(local:IconHelper.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(local:IconHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontFamily="{Binding Path=(local:IconHelper.FontFamily), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontSize="{Binding Path=(local:IconHelper.FontSize), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
ToolTip="{Binding Path=(local:IconHelper.ToolTip), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<i:IconPresenter.Visibility>
<MultiBinding Converter="{StaticResource {x:Static irs:ConverterKeys.IconVisibilityConverter}}">
<Binding Path="Icon"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
<Binding Path="(local:IconHelper.HiddenOnNull)"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
</MultiBinding>
</i:IconPresenter.Visibility>
</i:IconPresenter>
<ContentPresenter Margin="{TemplateBinding Padding}" /> <ContentPresenter Margin="{TemplateBinding Padding}" />
</DockPanel> </DockPanel>
</Border> </Border>
......
...@@ -30,7 +30,30 @@ ...@@ -30,7 +30,30 @@
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"> HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
<i:IconPresenter x:Name="IpIcon" <i:IconPresenter x:Name="IpIcon"
Content="{Binding Path=(local:TextBoxHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" Content="{Binding Path=(local:TextBoxHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" /> Margin="{Binding Path=(local:IconHelper.Margin), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Width="{Binding Path=(local:IconHelper.Width), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Height="{Binding Path=(local:IconHelper.Height), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinWidth="{Binding Path=(local:IconHelper.MinWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinHeight="{Binding Path=(local:IconHelper.MinHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxWidth="{Binding Path=(local:IconHelper.MaxWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxHeight="{Binding Path=(local:IconHelper.MaxHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
HorizontalContentAlignment="{Binding Path=(local:IconHelper.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalContentAlignment="{Binding Path=(local:IconHelper.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(local:IconHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontFamily="{Binding Path=(local:IconHelper.FontFamily), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontSize="{Binding Path=(local:IconHelper.FontSize), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
ToolTip="{Binding Path=(local:IconHelper.ToolTip), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<i:IconPresenter.Visibility>
<MultiBinding Converter="{StaticResource {x:Static irs:ConverterKeys.IconVisibilityConverter}}">
<Binding Path="(local:TextBoxHelper.Icon)"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
<Binding Path="(local:IconHelper.HiddenOnNull)"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
</MultiBinding>
</i:IconPresenter.Visibility>
</i:IconPresenter>
<Grid> <Grid>
<Border Margin="{TemplateBinding Padding}"> <Border Margin="{TemplateBinding Padding}">
<ContentControl Margin="2,0,0,0" <ContentControl Margin="2,0,0,0"
...@@ -72,8 +95,30 @@ ...@@ -72,8 +95,30 @@
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"> HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
<i:IconPresenter x:Name="IpIcon" <i:IconPresenter x:Name="IpIcon"
Content="{Binding Path=(local:TextBoxHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" Content="{Binding Path=(local:TextBoxHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" /> Margin="{Binding Path=(local:IconHelper.Margin), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Width="{Binding Path=(local:IconHelper.Width), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Height="{Binding Path=(local:IconHelper.Height), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinWidth="{Binding Path=(local:IconHelper.MinWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinHeight="{Binding Path=(local:IconHelper.MinHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxWidth="{Binding Path=(local:IconHelper.MaxWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxHeight="{Binding Path=(local:IconHelper.MaxHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
HorizontalContentAlignment="{Binding Path=(local:IconHelper.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalContentAlignment="{Binding Path=(local:IconHelper.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(local:IconHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontFamily="{Binding Path=(local:IconHelper.FontFamily), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontSize="{Binding Path=(local:IconHelper.FontSize), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
ToolTip="{Binding Path=(local:IconHelper.ToolTip), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<i:IconPresenter.Visibility>
<MultiBinding Converter="{StaticResource {x:Static irs:ConverterKeys.IconVisibilityConverter}}">
<Binding Path="(local:TextBoxHelper.Icon)"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
<Binding Path="(local:IconHelper.HiddenOnNull)"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
</MultiBinding>
</i:IconPresenter.Visibility>
</i:IconPresenter>
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition /> <ColumnDefinition />
......
...@@ -67,9 +67,31 @@ ...@@ -67,9 +67,31 @@
Grid.Row="1" Grid.Row="1"
Visibility="{Binding IsCompleted, Converter={StaticResource {x:Static rs:ConverterKeys.TrueToCollapseConverter}}, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"> Visibility="{Binding IsCompleted, Converter={StaticResource {x:Static rs:ConverterKeys.TrueToCollapseConverter}}, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<i:IconPresenter x:Name="IpIcon" <i:IconPresenter x:Name="IpIcon"
Foreground="{Binding Path=(local:IconHelper.Foreground),RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Content="{Binding Icon, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" Content="{Binding Icon, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" /> Margin="{Binding Path=(local:IconHelper.Margin), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Width="{Binding Path=(local:IconHelper.Width), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Height="{Binding Path=(local:IconHelper.Height), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinWidth="{Binding Path=(local:IconHelper.MinWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinHeight="{Binding Path=(local:IconHelper.MinHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxWidth="{Binding Path=(local:IconHelper.MaxWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxHeight="{Binding Path=(local:IconHelper.MaxHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
HorizontalContentAlignment="{Binding Path=(local:IconHelper.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalContentAlignment="{Binding Path=(local:IconHelper.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(local:IconHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontFamily="{Binding Path=(local:IconHelper.FontFamily), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontSize="{Binding Path=(local:IconHelper.FontSize), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
ToolTip="{Binding Path=(local:IconHelper.ToolTip), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<i:IconPresenter.Visibility>
<MultiBinding Converter="{StaticResource {x:Static irs:ConverterKeys.IconVisibilityConverter}}">
<Binding Path="Icon"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
<Binding Path="(local:IconHelper.HiddenOnNull)"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
</MultiBinding>
</i:IconPresenter.Visibility>
</i:IconPresenter>
</Border> </Border>
<ContentControl x:Name="CcComplatedGlyph" <ContentControl x:Name="CcComplatedGlyph"
Content=" " Content=" "
...@@ -259,7 +281,30 @@ ...@@ -259,7 +281,30 @@
Visibility="{Binding Icon, Converter={StaticResource {x:Static rs:ConverterKeys.NullToCollapseConverter}}, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"> Visibility="{Binding Icon, Converter={StaticResource {x:Static rs:ConverterKeys.NullToCollapseConverter}}, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<i:IconPresenter x:Name="IpIcon" <i:IconPresenter x:Name="IpIcon"
Content="{Binding Icon, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" Content="{Binding Icon, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" /> Margin="{Binding Path=(local:IconHelper.Margin), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Width="{Binding Path=(local:IconHelper.Width), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Height="{Binding Path=(local:IconHelper.Height), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinWidth="{Binding Path=(local:IconHelper.MinWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinHeight="{Binding Path=(local:IconHelper.MinHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxWidth="{Binding Path=(local:IconHelper.MaxWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxHeight="{Binding Path=(local:IconHelper.MaxHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
HorizontalContentAlignment="{Binding Path=(local:IconHelper.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalContentAlignment="{Binding Path=(local:IconHelper.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(local:IconHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontFamily="{Binding Path=(local:IconHelper.FontFamily), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontSize="{Binding Path=(local:IconHelper.FontSize), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
ToolTip="{Binding Path=(local:IconHelper.ToolTip), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<i:IconPresenter.Visibility>
<MultiBinding Converter="{StaticResource {x:Static irs:ConverterKeys.IconVisibilityConverter}}">
<Binding Path="Icon"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
<Binding Path="(local:IconHelper.HiddenOnNull)"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
</MultiBinding>
</i:IconPresenter.Visibility>
</i:IconPresenter>
</Border> </Border>
<ContentPresenter Grid.Row="1" <ContentPresenter Grid.Row="1"
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
......
...@@ -133,13 +133,13 @@ ...@@ -133,13 +133,13 @@
</MultiDataTrigger.Conditions> </MultiDataTrigger.Conditions>
<Setter TargetName="SprPending" <Setter TargetName="SprPending"
Property="GlyphBrush" Property="GlyphBrush"
Value="{Binding Path=(local:ButtonHelper.ClickForeground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" /> Value="{Binding Path=(local:ToggleButtonHelper.ClickForeground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Setter TargetName="DockContainer" <Setter TargetName="DockContainer"
Property="TextElement.Foreground" Property="TextElement.Foreground"
Value="{Binding Path=(local:ButtonHelper.ClickForeground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" /> Value="{Binding Path=(local:ToggleButtonHelper.ClickForeground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Setter TargetName="DockContainer" <Setter TargetName="DockContainer"
Property="TextBlock.Foreground" Property="TextBlock.Foreground"
Value="{Binding Path=(local:ButtonHelper.ClickForeground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" /> Value="{Binding Path=(local:ToggleButtonHelper.ClickForeground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger> </MultiDataTrigger>
<MultiDataTrigger> <MultiDataTrigger>
<MultiDataTrigger.Conditions> <MultiDataTrigger.Conditions>
...@@ -170,9 +170,32 @@ ...@@ -170,9 +170,32 @@
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"> HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
<i:IconPresenter x:Name="IpIcon" <i:IconPresenter x:Name="IpIcon"
DockPanel.Dock="{Binding Path=(local:ButtonHelper.IconPlacement), Converter={StaticResource {x:Static irs:ConverterKeys.IconPlacementToDockConverter}}, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" DockPanel.Dock="{Binding Path=(local:ToggleButtonHelper.IconPlacement), Converter={StaticResource {x:Static irs:ConverterKeys.IconPlacementToDockConverter}}, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Content="{Binding Path=(local:ButtonHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" Content="{Binding Path=(local:ToggleButtonHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" /> Margin="{Binding Path=(local:IconHelper.Margin), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Width="{Binding Path=(local:IconHelper.Width), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Height="{Binding Path=(local:IconHelper.Height), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinWidth="{Binding Path=(local:IconHelper.MinWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinHeight="{Binding Path=(local:IconHelper.MinHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxWidth="{Binding Path=(local:IconHelper.MaxWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxHeight="{Binding Path=(local:IconHelper.MaxHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
HorizontalContentAlignment="{Binding Path=(local:IconHelper.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalContentAlignment="{Binding Path=(local:IconHelper.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(local:IconHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontFamily="{Binding Path=(local:IconHelper.FontFamily), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontSize="{Binding Path=(local:IconHelper.FontSize), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
ToolTip="{Binding Path=(local:IconHelper.ToolTip), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<i:IconPresenter.Visibility>
<MultiBinding Converter="{StaticResource {x:Static irs:ConverterKeys.IconVisibilityConverter}}">
<Binding Path="(local:ToggleButtonHelper.Icon)"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
<Binding Path="(local:IconHelper.HiddenOnNull)"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
</MultiBinding>
</i:IconPresenter.Visibility>
</i:IconPresenter>
<ContentPresenter x:Name="CpContent" <ContentPresenter x:Name="CpContent"
Margin="{TemplateBinding Padding}" Margin="{TemplateBinding Padding}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
......
...@@ -40,7 +40,30 @@ ...@@ -40,7 +40,30 @@
Width="{Binding Path=(local:TreeViewHelper.ItemsIconWidth), RelativeSource={RelativeSource AncestorType=TreeView}, Mode=OneWay}"> Width="{Binding Path=(local:TreeViewHelper.ItemsIconWidth), RelativeSource={RelativeSource AncestorType=TreeView}, Mode=OneWay}">
<i:IconPresenter x:Name="IpIcon" <i:IconPresenter x:Name="IpIcon"
Content="{Binding Path=(local:TreeViewItemHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" Content="{Binding Path=(local:TreeViewItemHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" /> Margin="{Binding Path=(local:IconHelper.Margin), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Width="{Binding Path=(local:IconHelper.Width), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Height="{Binding Path=(local:IconHelper.Height), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinWidth="{Binding Path=(local:IconHelper.MinWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MinHeight="{Binding Path=(local:IconHelper.MinHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxWidth="{Binding Path=(local:IconHelper.MaxWidth), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
MaxHeight="{Binding Path=(local:IconHelper.MaxHeight), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
HorizontalContentAlignment="{Binding Path=(local:IconHelper.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalContentAlignment="{Binding Path=(local:IconHelper.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Foreground="{Binding Path=(local:IconHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontFamily="{Binding Path=(local:IconHelper.FontFamily), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
FontSize="{Binding Path=(local:IconHelper.FontSize), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
ToolTip="{Binding Path=(local:IconHelper.ToolTip), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
<i:IconPresenter.Visibility>
<MultiBinding Converter="{StaticResource {x:Static irs:ConverterKeys.IconVisibilityConverter}}">
<Binding Path="(local:TreeViewItemHelper.Icon)"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
<Binding Path="(local:IconHelper.HiddenOnNull)"
RelativeSource="{RelativeSource TemplatedParent}"
Mode="OneWay" />
</MultiBinding>
</i:IconPresenter.Visibility>
</i:IconPresenter>
</Border> </Border>
<Grid Grid.Column="2"> <Grid Grid.Column="2">
<ContentPresenter x:Name="CpHeader" <ContentPresenter x:Name="CpHeader"
......
...@@ -17,6 +17,12 @@ namespace Panuon.WPF.UI ...@@ -17,6 +17,12 @@ namespace Panuon.WPF.UI
#region ComponentResourceKeys #region ComponentResourceKeys
public static ComponentResourceKey ToggleDataTemplateKey { get; } = public static ComponentResourceKey ToggleDataTemplateKey { get; } =
new ComponentResourceKey(typeof(Timeline), nameof(ToggleDataTemplateKey)); new ComponentResourceKey(typeof(Timeline), nameof(ToggleDataTemplateKey));
public static ComponentResourceKey PendingToggleDataTemplateKey { get; } =
new ComponentResourceKey(typeof(Timeline), nameof(PendingToggleDataTemplateKey));
public static ComponentResourceKey CompletedGlyphTemplateKey { get; } =
new ComponentResourceKey(typeof(Timeline), nameof(CompletedGlyphTemplateKey));
#endregion #endregion
#region Properties #region Properties
......
...@@ -25,5 +25,5 @@ using System.Windows.Markup; ...@@ -25,5 +25,5 @@ using System.Windows.Markup;
ResourceDictionaryLocation.SourceAssembly ResourceDictionaryLocation.SourceAssembly
)] )]
[assembly: AssemblyVersion("1.1.13")] [assembly: AssemblyVersion("1.1.13.1")]
[assembly: AssemblyFileVersion("1.1.13")] [assembly: AssemblyFileVersion("1.1.13.1")]
\ No newline at end of file \ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册