fixed some bugs
This commit is contained in:
1 parent
dec0d37b31
commit
7171398966
11 files changed
+230
-110
No files matched your search
@@ -40,6 +40,14 @@ namespace HandyControl.Controls
|
||||
|
||||
private ItemsPresenter _itemsControl;
|
||||
|
||||
private int _pageIndex = -1;
|
||||
|
||||
private Button _selectedButton;
|
||||
|
||||
private DispatcherTimer _updateTimer;
|
||||
|
||||
private readonly List<double> _widthList = new List<double>();
|
||||
|
||||
#endregion Data
|
||||
|
||||
public override void OnApplyTemplate()
|
||||
@@ -63,7 +71,7 @@ namespace HandyControl.Controls
|
||||
private void Update()
|
||||
{
|
||||
TimerSwitch(AutoRun);
|
||||
UpdatePageButtons();
|
||||
UpdatePageButtons(_pageIndex);
|
||||
}
|
||||
|
||||
private void CheckNull()
|
||||
@@ -99,14 +107,6 @@ namespace HandyControl.Controls
|
||||
set => SetValue(IsCenterProperty, value);
|
||||
}
|
||||
|
||||
private int _pageIndex;
|
||||
|
||||
private Button _selectedButton;
|
||||
|
||||
private DispatcherTimer _updateTimer;
|
||||
|
||||
private readonly List<double> _widthList = new List<double>();
|
||||
|
||||
public Carousel()
|
||||
{
|
||||
CommandBindings.Add(new CommandBinding(ControlCommands.Prev, ButtonPrev_OnClick));
|
||||
@@ -167,24 +167,21 @@ namespace HandyControl.Controls
|
||||
private void TimerSwitch(bool run)
|
||||
{
|
||||
if (!_appliedTemplate) return;
|
||||
if (run)
|
||||
|
||||
if (_updateTimer != null)
|
||||
{
|
||||
_updateTimer = new DispatcherTimer
|
||||
{
|
||||
Interval = Interval
|
||||
};
|
||||
_updateTimer.Tick += UpdateTimer_Tick;
|
||||
_updateTimer.Start();
|
||||
_updateTimer.Tick -= UpdateTimer_Tick;
|
||||
_updateTimer.Stop();
|
||||
_updateTimer = null;
|
||||
}
|
||||
else
|
||||
|
||||
if (!run) return;
|
||||
_updateTimer = new DispatcherTimer
|
||||
{
|
||||
if (_updateTimer != null)
|
||||
{
|
||||
_updateTimer.Tick -= UpdateTimer_Tick;
|
||||
_updateTimer.Stop();
|
||||
_updateTimer = null;
|
||||
}
|
||||
}
|
||||
Interval = Interval
|
||||
};
|
||||
_updateTimer.Tick += UpdateTimer_Tick;
|
||||
_updateTimer.Start();
|
||||
}
|
||||
|
||||
private void UpdateTimer_Tick(object sender, EventArgs e)
|
||||
@@ -196,40 +193,41 @@ namespace HandyControl.Controls
|
||||
/// <summary>
|
||||
/// 更新页按钮
|
||||
/// </summary>
|
||||
public void UpdatePageButtons(int? index = null)
|
||||
public void UpdatePageButtons(int index = -1)
|
||||
{
|
||||
if (!_appliedTemplate) return;
|
||||
if (index == null)
|
||||
{
|
||||
var count = Items.Count;
|
||||
_widthList.Clear();
|
||||
_widthList.Add(0);
|
||||
var width = .0;
|
||||
foreach (FrameworkElement item in Items)
|
||||
{
|
||||
item.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
|
||||
width += item.DesiredSize.Width;
|
||||
_widthList.Add(width);
|
||||
}
|
||||
|
||||
_itemsControl.Width = _widthList.Last() + ExtendWidth;
|
||||
_panelPage.Children.Clear();
|
||||
for (var i = 0; i < count; i++)
|
||||
_panelPage.Children.Add(CreatePateButton());
|
||||
var count = Items.Count;
|
||||
_widthList.Clear();
|
||||
_widthList.Add(0);
|
||||
var width = .0;
|
||||
foreach (FrameworkElement item in Items)
|
||||
{
|
||||
item.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
|
||||
width += item.DesiredSize.Width;
|
||||
_widthList.Add(width);
|
||||
}
|
||||
|
||||
_itemsControl.Width = _widthList.Last() + ExtendWidth;
|
||||
_panelPage.Children.Clear();
|
||||
for (var i = 0; i < count; i++)
|
||||
{
|
||||
_panelPage.Children.Add(CreatePateButton());
|
||||
}
|
||||
|
||||
if (index == -1)
|
||||
{
|
||||
if (count > 0)
|
||||
{
|
||||
var button = _panelPage.Children[0];
|
||||
button.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent, button));
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (index >= 0 && index < count)
|
||||
{
|
||||
if (index >= 0 && index < _panelPage.Children.Count)
|
||||
{
|
||||
var button = _panelPage.Children[(int)index];
|
||||
button.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent, button));
|
||||
UpdateItemsPosition();
|
||||
}
|
||||
var button = _panelPage.Children[index];
|
||||
button.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent, button));
|
||||
UpdateItemsPosition();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -241,14 +241,7 @@ namespace HandyControl.Controls
|
||||
_appliedTemplate = true;
|
||||
if (_isLoaded)
|
||||
{
|
||||
if (SelectedTime.HasValue)
|
||||
{
|
||||
Update(SelectedTime.Value);
|
||||
}
|
||||
else
|
||||
{
|
||||
DisplayTime = DateTime.Now;
|
||||
}
|
||||
Update(SelectedTime ?? DisplayTime);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -51,6 +51,8 @@ namespace HandyControl.Controls
|
||||
|
||||
private Slider _sliderOpacity;
|
||||
|
||||
private bool _appliedTemplate;
|
||||
|
||||
/// <summary>
|
||||
/// 当前显示的颜色类型
|
||||
/// </summary>
|
||||
@@ -348,6 +350,7 @@ namespace HandyControl.Controls
|
||||
|
||||
public override void OnApplyTemplate()
|
||||
{
|
||||
_appliedTemplate = false;
|
||||
if (_sliderColor != null)
|
||||
{
|
||||
_sliderColor.ValueChanged -= SliderColor_OnValueChanged;
|
||||
@@ -392,6 +395,7 @@ namespace HandyControl.Controls
|
||||
collection.Add(behavior);
|
||||
}
|
||||
|
||||
_appliedTemplate = true;
|
||||
if (_isLoaded)
|
||||
{
|
||||
Init();
|
||||
@@ -405,6 +409,7 @@ namespace HandyControl.Controls
|
||||
private void Init()
|
||||
{
|
||||
UpdateStatus(SelectedBrush.Color);
|
||||
_panelColor.Children.Clear();
|
||||
foreach (var item in _colorPresetList)
|
||||
{
|
||||
_panelColor.Children.Add(CreateColorButton(item));
|
||||
@@ -558,7 +563,7 @@ namespace HandyControl.Controls
|
||||
|
||||
private void SliderColor_OnValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
|
||||
{
|
||||
if (!_isLoaded || !IsNeedUpdateInfo) return;
|
||||
if (!_appliedTemplate || !IsNeedUpdateInfo) return;
|
||||
var index = Math.Min(5, (int)Math.Floor(e.NewValue));
|
||||
var sub = e.NewValue - index;
|
||||
var range = _colorRangeList[index];
|
||||
@@ -573,7 +578,7 @@ namespace HandyControl.Controls
|
||||
|
||||
private void SliderOpacity_OnValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
|
||||
{
|
||||
if (!_isLoaded || !IsNeedUpdateInfo) return;
|
||||
if (!_appliedTemplate || !IsNeedUpdateInfo) return;
|
||||
var color = SelectedBrush.Color;
|
||||
SelectedBrush = new SolidColorBrush(Color.FromArgb((byte)_sliderOpacity.Value, color.R, color.G, color.B));
|
||||
}
|
||||
@@ -638,7 +643,7 @@ namespace HandyControl.Controls
|
||||
// ReSharper disable once UnusedParameter.Local
|
||||
private void NumericUpDownRgb_OnValueChanged(object sender, FunctionEventArgs<double> e)
|
||||
{
|
||||
if (!_isLoaded || !IsNeedUpdateInfo) return;
|
||||
if (!_appliedTemplate || !IsNeedUpdateInfo) return;
|
||||
if (e.OriginalSource is NumericUpDown ctl && ctl.Tag is string tag)
|
||||
{
|
||||
var color = SelectedBrush.Color;
|
||||
|
||||
@@ -24,25 +24,36 @@ namespace HandyControl.Controls
|
||||
set => SetValue(SourceContentProperty, value);
|
||||
}
|
||||
|
||||
private bool _isLoaded;
|
||||
//private bool _isLoaded;
|
||||
|
||||
private double _tempValue;
|
||||
//private double _tempValue;
|
||||
|
||||
public CompareSlider()
|
||||
{
|
||||
Loaded += delegate
|
||||
{
|
||||
if (_isLoaded) return;
|
||||
_isLoaded = true;
|
||||
Value = _tempValue;
|
||||
};
|
||||
}
|
||||
//public CompareSlider()
|
||||
//{
|
||||
// //Loaded += delegate
|
||||
// //{
|
||||
// // if (_isLoaded) return;
|
||||
// // _isLoaded = true;
|
||||
// // Value = _tempValue;
|
||||
// //};
|
||||
//}
|
||||
|
||||
public override void OnApplyTemplate()
|
||||
{
|
||||
base.OnApplyTemplate();
|
||||
_tempValue = Value;
|
||||
Value = Orientation == Orientation.Horizontal ? Maximum : 0;
|
||||
}
|
||||
////protected override void OnRender(DrawingContext drawingContext)
|
||||
////{
|
||||
//// base.OnRender(drawingContext);
|
||||
|
||||
//// Value = _tempValue;
|
||||
////}
|
||||
|
||||
////public override void OnApplyTemplate()
|
||||
////{
|
||||
//// base.OnApplyTemplate();
|
||||
//// _tempValue = Value;
|
||||
//// Value = Orientation == Orientation.Horizontal ? Maximum : 0;
|
||||
//// if (_isLoaded)
|
||||
//// {
|
||||
//// Value = _tempValue;
|
||||
//// }
|
||||
////}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
|
||||
namespace HandyControl.Controls
|
||||
{
|
||||
public class CompareTrack : Track
|
||||
{
|
||||
protected override Size ArrangeOverride(Size arrangeSize)
|
||||
{
|
||||
base.ArrangeOverride(arrangeSize);
|
||||
|
||||
var isVertical = Orientation == Orientation.Vertical;
|
||||
ComputeSliderLengths(arrangeSize, isVertical, out var decreaseButtonLength, out var thumbLength,
|
||||
out var increaseButtonLength);
|
||||
|
||||
var offset = new Point();
|
||||
var pieceSize = arrangeSize;
|
||||
var isDirectionReversed = IsDirectionReversed;
|
||||
|
||||
if (isVertical)
|
||||
{
|
||||
CoerceLength(ref decreaseButtonLength, arrangeSize.Height);
|
||||
CoerceLength(ref increaseButtonLength, arrangeSize.Height);
|
||||
CoerceLength(ref thumbLength, arrangeSize.Height);
|
||||
|
||||
offset.Y = isDirectionReversed ? decreaseButtonLength + thumbLength : 0.0;
|
||||
pieceSize.Height = increaseButtonLength;
|
||||
|
||||
IncreaseRepeatButton?.Arrange(new Rect(offset, pieceSize));
|
||||
|
||||
offset.Y = isDirectionReversed ? 0.0 : increaseButtonLength + thumbLength;
|
||||
pieceSize.Height = decreaseButtonLength;
|
||||
|
||||
if (DecreaseRepeatButton != null)
|
||||
{
|
||||
DecreaseRepeatButton.Arrange(new Rect(offset, pieceSize));
|
||||
DecreaseRepeatButton.Height = pieceSize.Height;
|
||||
}
|
||||
|
||||
offset.Y = isDirectionReversed ? decreaseButtonLength : increaseButtonLength;
|
||||
pieceSize.Height = thumbLength;
|
||||
|
||||
Thumb?.Arrange(new Rect(offset, pieceSize));
|
||||
}
|
||||
else
|
||||
{
|
||||
CoerceLength(ref decreaseButtonLength, arrangeSize.Width);
|
||||
CoerceLength(ref increaseButtonLength, arrangeSize.Width);
|
||||
CoerceLength(ref thumbLength, arrangeSize.Width);
|
||||
|
||||
offset.X = isDirectionReversed ? increaseButtonLength + thumbLength : 0.0;
|
||||
pieceSize.Width = decreaseButtonLength;
|
||||
|
||||
DecreaseRepeatButton?.Arrange(new Rect(offset, pieceSize));
|
||||
|
||||
|
||||
offset.X = isDirectionReversed ? 0.0 : decreaseButtonLength + thumbLength;
|
||||
pieceSize.Width = increaseButtonLength;
|
||||
|
||||
if (IncreaseRepeatButton != null)
|
||||
{
|
||||
IncreaseRepeatButton.Arrange(new Rect(offset, pieceSize));
|
||||
IncreaseRepeatButton.Width = pieceSize.Width;
|
||||
}
|
||||
|
||||
offset.X = isDirectionReversed ? increaseButtonLength : decreaseButtonLength;
|
||||
pieceSize.Width = thumbLength;
|
||||
|
||||
Thumb?.Arrange(new Rect(offset, pieceSize));
|
||||
}
|
||||
|
||||
return arrangeSize;
|
||||
}
|
||||
|
||||
private void ComputeSliderLengths(Size arrangeSize, bool isVertical, out double decreaseButtonLength,
|
||||
out double thumbLength, out double increaseButtonLength)
|
||||
{
|
||||
var min = Minimum;
|
||||
var range = Math.Max(0.0, Maximum - min);
|
||||
var offset = Math.Min(range, Value - min);
|
||||
|
||||
double trackLength;
|
||||
|
||||
// Compute thumb size
|
||||
if (isVertical)
|
||||
{
|
||||
trackLength = arrangeSize.Height;
|
||||
thumbLength = Thumb?.DesiredSize.Height ?? 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
trackLength = arrangeSize.Width;
|
||||
thumbLength = Thumb?.DesiredSize.Width ?? 0;
|
||||
}
|
||||
|
||||
CoerceLength(ref thumbLength, trackLength);
|
||||
|
||||
var remainingTrackLength = trackLength - thumbLength;
|
||||
|
||||
decreaseButtonLength = remainingTrackLength * offset / range;
|
||||
CoerceLength(ref decreaseButtonLength, remainingTrackLength);
|
||||
|
||||
increaseButtonLength = remainingTrackLength - decreaseButtonLength;
|
||||
CoerceLength(ref increaseButtonLength, remainingTrackLength);
|
||||
}
|
||||
|
||||
private static void CoerceLength(ref double componentLength, double trackLength)
|
||||
{
|
||||
if (componentLength < 0)
|
||||
componentLength = 0.0;
|
||||
else if (componentLength > trackLength || double.IsNaN(componentLength))
|
||||
componentLength = trackLength;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -33,13 +33,10 @@ namespace HandyControl.Controls
|
||||
|
||||
private void ItemContainerGenerator_StatusChanged(object sender, EventArgs e)
|
||||
{
|
||||
var count = Items.Count;
|
||||
if (count > 0)
|
||||
if (ItemContainerGenerator.Status == GeneratorStatus.ContainersGenerated)
|
||||
{
|
||||
if (ItemContainerGenerator.ContainerFromIndex(0) is StepBarItem item)
|
||||
{
|
||||
item.Status = StepStatus.UnderWay;
|
||||
}
|
||||
var count = Items.Count;
|
||||
if (count <= 0) return;
|
||||
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
@@ -48,6 +45,21 @@ namespace HandyControl.Controls
|
||||
stepBarItem.Index = i + 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (StepIndex < count)
|
||||
{
|
||||
for (int i = 0; i < StepIndex; i++)
|
||||
{
|
||||
if (ItemContainerGenerator.ContainerFromIndex(i) is StepBarItem stepBarItem)
|
||||
{
|
||||
stepBarItem.Status = StepStatus.Complete;
|
||||
}
|
||||
}
|
||||
if (ItemContainerGenerator.ContainerFromIndex(StepIndex) is StepBarItem item)
|
||||
{
|
||||
item.Status = StepStatus.UnderWay;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +89,7 @@ namespace HandyControl.Controls
|
||||
|
||||
public int StepIndex
|
||||
{
|
||||
get => (int) GetValue(StepIndexProperty);
|
||||
get => (int)GetValue(StepIndexProperty);
|
||||
protected set => SetValue(StepIndexProperty, value);
|
||||
}
|
||||
|
||||
@@ -86,7 +98,7 @@ namespace HandyControl.Controls
|
||||
|
||||
public Dock Dock
|
||||
{
|
||||
get => (Dock) GetValue(DockProperty);
|
||||
get => (Dock)GetValue(DockProperty);
|
||||
set => SetValue(DockProperty, value);
|
||||
}
|
||||
|
||||
|
||||
@@ -11,13 +11,8 @@ using HandyControl.Tools;
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace HandyControl.Controls
|
||||
{
|
||||
[TemplatePart(Name = CloseButtonKey, Type = typeof(Button))]
|
||||
public class TabItem : System.Windows.Controls.TabItem
|
||||
{
|
||||
private const string CloseButtonKey = "PART_CloseButton";
|
||||
|
||||
private Button _buttonClose;
|
||||
|
||||
/// <summary>
|
||||
/// 动画速度
|
||||
/// </summary>
|
||||
@@ -170,16 +165,6 @@ namespace HandyControl.Controls
|
||||
Focus();
|
||||
}
|
||||
|
||||
public override void OnApplyTemplate()
|
||||
{
|
||||
base.OnApplyTemplate();
|
||||
_buttonClose = Template.FindName(CloseButtonKey, this) as Button;
|
||||
if (_buttonClose != null)
|
||||
{
|
||||
_buttonClose.Click += Close;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 关闭
|
||||
/// </summary>
|
||||
|
||||
@@ -59,6 +59,7 @@
|
||||
<Compile Include="Controls\Attach\IconElement.cs" />
|
||||
<Compile Include="Controls\Slider\CompareSlider.cs" />
|
||||
<Compile Include="Controls\ColorPicker.cs" />
|
||||
<Compile Include="Controls\Slider\CompareTrack.cs" />
|
||||
<Compile Include="Controls\Slider\PreviewSlider.cs" />
|
||||
<Compile Include="Controls\ScrollViewer.cs" />
|
||||
<Compile Include="Controls\Loading\LoadingBase.cs" />
|
||||
|
||||
@@ -63,9 +63,7 @@
|
||||
<Border Background="{DynamicResource RegionBrush}" HorizontalAlignment="Center" CornerRadius="12" BorderThickness="2" BorderBrush="{TemplateBinding Foreground}" Height="24" MinWidth="24">
|
||||
<TextBlock Foreground="{TemplateBinding Foreground}" Style="{StaticResource TextBlockDefaultThiLight}" Text="{Binding Index,RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||
</Border>
|
||||
<StackPanel Margin="10,0,0,0">
|
||||
<ContentPresenter HorizontalAlignment="Left" ContentTemplate="{Binding ItemTemplate,RelativeSource={RelativeSource FindAncestor,AncestorType=controls:StepBar}}" TextElement.Foreground="{TemplateBinding Foreground}" Margin="0,4,0,0"/>
|
||||
</StackPanel>
|
||||
<ContentPresenter HorizontalAlignment="Left" ContentTemplate="{Binding ItemTemplate,RelativeSource={RelativeSource FindAncestor,AncestorType=controls:StepBar}}" TextElement.Foreground="{TemplateBinding Foreground}" Margin="10,4,0,0"/>
|
||||
</StackPanel>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
|
||||
@@ -218,11 +218,11 @@
|
||||
|
||||
<ControlTemplate x:Key="CompareSliderHorizontal" TargetType="controls:CompareSlider">
|
||||
<Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
||||
<Track Margin="-14,0,-15,0" x:Name="PART_Track">
|
||||
<controls:CompareTrack Margin="-14,0,-15,0" x:Name="PART_Track">
|
||||
<Track.DecreaseRepeatButton>
|
||||
<RepeatButton Margin="14,0,-15,0" Command="{x:Static Slider.DecreaseLarge}" Style="{StaticResource CompareSliderRepeatButtonTransparent}">
|
||||
<RepeatButton.Content>
|
||||
<Border HorizontalAlignment="Right" Width="{TemplateBinding Width}">
|
||||
<Border HorizontalAlignment="Left" Width="{TemplateBinding Width}">
|
||||
<ContentPresenter Content="{TemplateBinding TargetContent}"/>
|
||||
</Border>
|
||||
</RepeatButton.Content>
|
||||
@@ -231,7 +231,7 @@
|
||||
<Track.IncreaseRepeatButton>
|
||||
<RepeatButton Margin="-15,0,15,0" Command="{x:Static Slider.IncreaseLarge}" Style="{StaticResource CompareSliderRepeatButtonTransparent}">
|
||||
<RepeatButton.Content>
|
||||
<Border HorizontalAlignment="Right" Width="{TemplateBinding Width}">
|
||||
<Border HorizontalAlignment="Right" Width="{TemplateBinding ActualWidth}">
|
||||
<ContentPresenter Content="{TemplateBinding SourceContent}"/>
|
||||
</Border>
|
||||
</RepeatButton.Content>
|
||||
@@ -240,7 +240,7 @@
|
||||
<Track.Thumb>
|
||||
<Thumb x:Name="Thumb" Focusable="False" OverridesDefaultStyle="True" Template="{StaticResource CompareSliderThumbHorizontal}" Width="30" Margin="0,0,0,0"/>
|
||||
</Track.Thumb>
|
||||
</Track>
|
||||
</controls:CompareTrack>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
|
||||
@@ -322,7 +322,7 @@
|
||||
|
||||
<ControlTemplate x:Key="CompareSliderVertical" TargetType="controls:CompareSlider">
|
||||
<Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
||||
<Track Margin="0,-14,0,-15" x:Name="PART_Track">
|
||||
<controls:CompareTrack Margin="0,-14,0,-15" x:Name="PART_Track">
|
||||
<Track.DecreaseRepeatButton>
|
||||
<RepeatButton Margin="0,-15,0,15" Command="{x:Static Slider.DecreaseLarge}" Style="{StaticResource CompareSliderRepeatButtonTransparent}">
|
||||
<RepeatButton.Content>
|
||||
@@ -335,7 +335,7 @@
|
||||
<Track.IncreaseRepeatButton>
|
||||
<RepeatButton Margin="0,14,0,-15" Command="{x:Static Slider.IncreaseLarge}" Style="{StaticResource CompareSliderRepeatButtonTransparent}">
|
||||
<RepeatButton.Content>
|
||||
<Border VerticalAlignment="Bottom" Height="{TemplateBinding Height}">
|
||||
<Border VerticalAlignment="Top" Height="{TemplateBinding Height}">
|
||||
<ContentPresenter Content="{TemplateBinding SourceContent}"/>
|
||||
</Border>
|
||||
</RepeatButton.Content>
|
||||
@@ -344,7 +344,7 @@
|
||||
<Track.Thumb>
|
||||
<Thumb x:Name="Thumb" Focusable="False" Height="30" OverridesDefaultStyle="True" Template="{StaticResource CompareSliderThumbVertical}" VerticalAlignment="Top"/>
|
||||
</Track.Thumb>
|
||||
</Track>
|
||||
</controls:CompareTrack>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
</LinearGradientBrush>
|
||||
</ContentPresenter.OpacityMask>
|
||||
</ContentPresenter>
|
||||
<Button Grid.Column="1" x:Name="PART_CloseButton" Visibility="{Binding ShowCloseButton,RelativeSource={RelativeSource FindAncestor,AncestorType=controls:TabControl},Converter={StaticResource Boolean2VisibilityConverter}}" Background="Transparent" Style="{StaticResource ButtonCustom}" Width="28">
|
||||
<Button Grid.Column="1" Command="interactivity:ControlCommands.Close" Visibility="{Binding ShowCloseButton,RelativeSource={RelativeSource FindAncestor,AncestorType=controls:TabControl},Converter={StaticResource Boolean2VisibilityConverter}}" Background="Transparent" Style="{StaticResource ButtonCustom}" Width="28">
|
||||
<Path Fill="{DynamicResource PrimaryTextBrush}" Width="8" Height="8" Style="{StaticResource ClosePathStyle}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
Reference in new issue
Block a user