committed by
GitHub
232 changed files with 15295 additions and 13223 deletions
@ -0,0 +1,27 @@ |
|||
using Avalonia; |
|||
using MiniMvvm; |
|||
|
|||
namespace ControlCatalog.ViewModels |
|||
{ |
|||
public class ExpanderPageViewModel : ViewModelBase |
|||
{ |
|||
private object _cornerRadius = AvaloniaProperty.UnsetValue; |
|||
private bool _rounded; |
|||
|
|||
public object CornerRadius |
|||
{ |
|||
get => _cornerRadius; |
|||
private set => RaiseAndSetIfChanged(ref _cornerRadius, value); |
|||
} |
|||
|
|||
public bool Rounded |
|||
{ |
|||
get => _rounded; |
|||
set |
|||
{ |
|||
if (RaiseAndSetIfChanged(ref _rounded, value)) |
|||
CornerRadius = _rounded ? new CornerRadius(25) : AvaloniaProperty.UnsetValue; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -1,11 +1,11 @@ |
|||
namespace Avalonia.Markup.Xaml |
|||
namespace Avalonia.Metadata |
|||
{ |
|||
public interface IAddChild |
|||
{ |
|||
void AddChild(object child); |
|||
} |
|||
|
|||
public interface IAddChild<T> : IAddChild |
|||
public interface IAddChild<T> |
|||
{ |
|||
void AddChild(T child); |
|||
} |
|||
@ -0,0 +1,67 @@ |
|||
using System; |
|||
|
|||
namespace Avalonia.Styling |
|||
{ |
|||
/// <summary>
|
|||
/// Defines a switchable theme for a control.
|
|||
/// </summary>
|
|||
public class ControlTheme : StyleBase |
|||
{ |
|||
/// <summary>
|
|||
/// Initializes a new instance of the <see cref="ControlTheme"/> class.
|
|||
/// </summary>
|
|||
public ControlTheme() { } |
|||
|
|||
/// <summary>
|
|||
/// Initializes a new instance of the <see cref="ControlTheme"/> class.
|
|||
/// </summary>
|
|||
/// <param name="targetType">The value for <see cref="TargetType"/>.</param>
|
|||
public ControlTheme(Type targetType) => TargetType = targetType; |
|||
|
|||
/// <summary>
|
|||
/// Gets or sets the type for which this control theme is intended.
|
|||
/// </summary>
|
|||
public Type? TargetType { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Gets or sets a control theme that is the basis of the current theme.
|
|||
/// </summary>
|
|||
public ControlTheme? BasedOn { get; set; } |
|||
|
|||
public override SelectorMatchResult TryAttach(IStyleable target, object? host) |
|||
{ |
|||
_ = target ?? throw new ArgumentNullException(nameof(target)); |
|||
|
|||
if (TargetType is null) |
|||
throw new InvalidOperationException("ControlTheme has no TargetType."); |
|||
|
|||
var result = BasedOn?.TryAttach(target, host) ?? SelectorMatchResult.NeverThisType; |
|||
|
|||
if (HasSettersOrAnimations && TargetType.IsAssignableFrom(target.StyleKey)) |
|||
{ |
|||
Attach(target, null); |
|||
result = SelectorMatchResult.AlwaysThisType; |
|||
} |
|||
|
|||
var childResult = TryAttachChildren(target, host); |
|||
|
|||
if (childResult > result) |
|||
result = childResult; |
|||
|
|||
return result; |
|||
} |
|||
|
|||
public override string ToString() |
|||
{ |
|||
if (TargetType is not null) |
|||
return "ControlTheme: " + TargetType.Name; |
|||
else |
|||
return "ControlTheme"; |
|||
} |
|||
|
|||
internal override void SetParent(StyleBase? parent) |
|||
{ |
|||
throw new InvalidOperationException("ControlThemes cannot be added as a nested style."); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,124 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using Avalonia.Animation; |
|||
using Avalonia.Controls; |
|||
using Avalonia.Metadata; |
|||
using Avalonia.Styling.Activators; |
|||
|
|||
namespace Avalonia.Styling |
|||
{ |
|||
/// <summary>
|
|||
/// Base class for <see cref="Style"/> and <see cref="ControlTheme"/>.
|
|||
/// </summary>
|
|||
public abstract class StyleBase : AvaloniaObject, IStyle, IResourceProvider |
|||
{ |
|||
private IResourceHost? _owner; |
|||
private StyleChildren? _children; |
|||
private IResourceDictionary? _resources; |
|||
private List<ISetter>? _setters; |
|||
private List<IAnimation>? _animations; |
|||
private StyleCache? _childCache; |
|||
|
|||
public IList<IStyle> Children => _children ??= new(this); |
|||
|
|||
public IResourceHost? Owner |
|||
{ |
|||
get => _owner; |
|||
private set |
|||
{ |
|||
if (_owner != value) |
|||
{ |
|||
_owner = value; |
|||
OwnerChanged?.Invoke(this, EventArgs.Empty); |
|||
} |
|||
} |
|||
} |
|||
|
|||
public IStyle? Parent { get; private set; } |
|||
|
|||
public IResourceDictionary Resources |
|||
{ |
|||
get => _resources ?? (Resources = new ResourceDictionary()); |
|||
set |
|||
{ |
|||
value = value ?? throw new ArgumentNullException(nameof(value)); |
|||
|
|||
var hadResources = _resources?.HasResources ?? false; |
|||
|
|||
_resources = value; |
|||
|
|||
if (Owner is object) |
|||
{ |
|||
_resources.AddOwner(Owner); |
|||
|
|||
if (hadResources || _resources.HasResources) |
|||
{ |
|||
Owner.NotifyHostedResourcesChanged(ResourcesChangedEventArgs.Empty); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
public IList<ISetter> Setters => _setters ??= new List<ISetter>(); |
|||
public IList<IAnimation> Animations => _animations ??= new List<IAnimation>(); |
|||
|
|||
bool IResourceNode.HasResources => _resources?.Count > 0; |
|||
IReadOnlyList<IStyle> IStyle.Children => (IReadOnlyList<IStyle>?)_children ?? Array.Empty<IStyle>(); |
|||
|
|||
internal bool HasSettersOrAnimations => _setters?.Count > 0 || _animations?.Count > 0; |
|||
|
|||
public void Add(ISetter setter) => Setters.Add(setter); |
|||
public void Add(IStyle style) => Children.Add(style); |
|||
|
|||
public event EventHandler? OwnerChanged; |
|||
|
|||
public abstract SelectorMatchResult TryAttach(IStyleable target, object? host); |
|||
|
|||
public bool TryGetResource(object key, out object? result) |
|||
{ |
|||
result = null; |
|||
return _resources?.TryGetResource(key, out result) ?? false; |
|||
} |
|||
|
|||
internal void Attach(IStyleable target, IStyleActivator? activator) |
|||
{ |
|||
var instance = new StyleInstance(this, target, _setters, _animations, activator); |
|||
target.StyleApplied(instance); |
|||
instance.Start(); |
|||
} |
|||
|
|||
internal SelectorMatchResult TryAttachChildren(IStyleable target, object? host) |
|||
{ |
|||
if (_children is null || _children.Count == 0) |
|||
return SelectorMatchResult.NeverThisType; |
|||
_childCache ??= new StyleCache(); |
|||
return _childCache.TryAttach(_children, target, host); |
|||
} |
|||
|
|||
internal virtual void SetParent(StyleBase? parent) => Parent = parent; |
|||
|
|||
void IResourceProvider.AddOwner(IResourceHost owner) |
|||
{ |
|||
owner = owner ?? throw new ArgumentNullException(nameof(owner)); |
|||
|
|||
if (Owner != null) |
|||
{ |
|||
throw new InvalidOperationException("The Style already has a parent."); |
|||
} |
|||
|
|||
Owner = owner; |
|||
_resources?.AddOwner(owner); |
|||
} |
|||
|
|||
void IResourceProvider.RemoveOwner(IResourceHost owner) |
|||
{ |
|||
owner = owner ?? throw new ArgumentNullException(nameof(owner)); |
|||
|
|||
if (Owner == owner) |
|||
{ |
|||
Owner = null; |
|||
_resources?.RemoveOwner(owner); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -1,188 +1,190 @@ |
|||
<Styles xmlns="https://github.com/avaloniaui" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
x:CompileBindings="True"> |
|||
<ResourceDictionary xmlns="https://github.com/avaloniaui" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
x:CompileBindings="True"> |
|||
|
|||
<Style Selector="Thumb.ColorSliderThumbStyle"> |
|||
<Setter Property="BorderThickness" Value="0" /> |
|||
<ControlTheme x:Key="ColorSliderThumbTheme" |
|||
TargetType="Thumb"> |
|||
<Setter Property="Background" Value="Transparent" /> |
|||
<Setter Property="BorderBrush" Value="{DynamicResource SystemControlForegroundBaseHighBrush}" /> |
|||
<Setter Property="BorderThickness" Value="3" /> |
|||
<Setter Property="CornerRadius" Value="10" /> |
|||
<Setter Property="Template"> |
|||
<Setter.Value> |
|||
<ControlTemplate> |
|||
<Border Background="{TemplateBinding Background}" |
|||
BorderBrush="{TemplateBinding BorderBrush}" |
|||
BorderThickness="{TemplateBinding BorderThickness}" |
|||
CornerRadius="10" /> |
|||
CornerRadius="{TemplateBinding CornerRadius}" /> |
|||
</ControlTemplate> |
|||
</Setter.Value> |
|||
</Setter> |
|||
</Style> |
|||
</ControlTheme> |
|||
|
|||
<Style Selector="ColorSlider:horizontal"> |
|||
<Setter Property="BorderThickness" Value="0" /> |
|||
<Setter Property="CornerRadius" Value="10" /> |
|||
<Setter Property="Height" Value="20" /> |
|||
<Setter Property="Template"> |
|||
<ControlTemplate TargetType="{x:Type ColorSlider}"> |
|||
<Border BorderThickness="{TemplateBinding BorderThickness}" |
|||
BorderBrush="{TemplateBinding BorderBrush}" |
|||
CornerRadius="{TemplateBinding CornerRadius}"> |
|||
<Grid Margin="{TemplateBinding Padding}"> |
|||
<Rectangle HorizontalAlignment="Stretch" |
|||
VerticalAlignment="Stretch" |
|||
Fill="{StaticResource ColorControlCheckeredBackgroundBrush}" |
|||
RadiusX="{TemplateBinding CornerRadius, Converter={StaticResource TopLeftCornerRadiusConverter}}" |
|||
RadiusY="{TemplateBinding CornerRadius, Converter={StaticResource BottomRightCornerRadiusConverter}}" /> |
|||
<Rectangle HorizontalAlignment="Stretch" |
|||
VerticalAlignment="Stretch" |
|||
Fill="{TemplateBinding Background}" |
|||
RadiusX="{TemplateBinding CornerRadius, Converter={StaticResource TopLeftCornerRadiusConverter}}" |
|||
RadiusY="{TemplateBinding CornerRadius, Converter={StaticResource BottomRightCornerRadiusConverter}}" /> |
|||
<Track Name="PART_Track" |
|||
HorizontalAlignment="Stretch" |
|||
VerticalAlignment="Stretch" |
|||
Minimum="{TemplateBinding Minimum}" |
|||
Maximum="{TemplateBinding Maximum}" |
|||
Value="{TemplateBinding Value, Mode=TwoWay}" |
|||
IsDirectionReversed="{TemplateBinding IsDirectionReversed}" |
|||
Orientation="Horizontal"> |
|||
<Track.DecreaseButton> |
|||
<RepeatButton Name="PART_DecreaseButton" |
|||
Background="Transparent" |
|||
Focusable="False" |
|||
HorizontalAlignment="Stretch" |
|||
VerticalAlignment="Stretch"> |
|||
<RepeatButton.Template> |
|||
<ControlTemplate> |
|||
<Border Name="FocusTarget" |
|||
Background="Transparent" |
|||
Margin="0,-10" /> |
|||
</ControlTemplate> |
|||
</RepeatButton.Template> |
|||
</RepeatButton> |
|||
</Track.DecreaseButton> |
|||
<Track.IncreaseButton> |
|||
<RepeatButton Name="PART_IncreaseButton" |
|||
Background="Transparent" |
|||
Focusable="False" |
|||
HorizontalAlignment="Stretch" |
|||
VerticalAlignment="Stretch"> |
|||
<RepeatButton.Template> |
|||
<ControlTemplate> |
|||
<Border Name="FocusTarget" |
|||
Background="Transparent" |
|||
Margin="0,-10" /> |
|||
</ControlTemplate> |
|||
</RepeatButton.Template> |
|||
</RepeatButton> |
|||
</Track.IncreaseButton> |
|||
<Thumb Classes="ColorSliderThumbStyle" |
|||
Name="ColorSliderThumb" |
|||
Margin="0" |
|||
Padding="0" |
|||
DataContext="{TemplateBinding Value}" |
|||
Height="{TemplateBinding Height}" |
|||
Width="{TemplateBinding Height}" /> |
|||
</Track> |
|||
</Grid> |
|||
</Border> |
|||
</ControlTemplate> |
|||
</Setter> |
|||
</Style> |
|||
<ControlTheme x:Key="{x:Type ColorSlider}" |
|||
TargetType="ColorSlider"> |
|||
|
|||
<Style Selector="ColorSlider:vertical"> |
|||
<Setter Property="BorderThickness" Value="0" /> |
|||
<Setter Property="CornerRadius" Value="10" /> |
|||
<Setter Property="Width" Value="20" /> |
|||
<Setter Property="Template"> |
|||
<ControlTemplate TargetType="{x:Type ColorSlider}"> |
|||
<Border BorderThickness="{TemplateBinding BorderThickness}" |
|||
BorderBrush="{TemplateBinding BorderBrush}" |
|||
CornerRadius="{TemplateBinding CornerRadius}"> |
|||
<Grid Margin="{TemplateBinding Padding}"> |
|||
<Rectangle HorizontalAlignment="Stretch" |
|||
VerticalAlignment="Stretch" |
|||
Fill="{StaticResource ColorControlCheckeredBackgroundBrush}" |
|||
RadiusX="{TemplateBinding CornerRadius, Converter={StaticResource TopLeftCornerRadiusConverter}}" |
|||
RadiusY="{TemplateBinding CornerRadius, Converter={StaticResource BottomRightCornerRadiusConverter}}" /> |
|||
<Rectangle HorizontalAlignment="Stretch" |
|||
VerticalAlignment="Stretch" |
|||
Fill="{TemplateBinding Background}" |
|||
RadiusX="{TemplateBinding CornerRadius, Converter={StaticResource TopLeftCornerRadiusConverter}}" |
|||
RadiusY="{TemplateBinding CornerRadius, Converter={StaticResource BottomRightCornerRadiusConverter}}" /> |
|||
<Track Name="PART_Track" |
|||
HorizontalAlignment="Stretch" |
|||
VerticalAlignment="Stretch" |
|||
Minimum="{TemplateBinding Minimum}" |
|||
Maximum="{TemplateBinding Maximum}" |
|||
Value="{TemplateBinding Value, Mode=TwoWay}" |
|||
IsDirectionReversed="{TemplateBinding IsDirectionReversed}" |
|||
Orientation="Vertical"> |
|||
<Track.DecreaseButton> |
|||
<RepeatButton Name="PART_DecreaseButton" |
|||
Background="Transparent" |
|||
Focusable="False" |
|||
HorizontalAlignment="Stretch" |
|||
VerticalAlignment="Stretch"> |
|||
<RepeatButton.Template> |
|||
<ControlTemplate> |
|||
<Border Name="FocusTarget" |
|||
Background="Transparent" |
|||
Margin="0,-10" /> |
|||
</ControlTemplate> |
|||
</RepeatButton.Template> |
|||
</RepeatButton> |
|||
</Track.DecreaseButton> |
|||
<Track.IncreaseButton> |
|||
<RepeatButton Name="PART_IncreaseButton" |
|||
Background="Transparent" |
|||
Focusable="False" |
|||
HorizontalAlignment="Stretch" |
|||
VerticalAlignment="Stretch"> |
|||
<RepeatButton.Template> |
|||
<ControlTemplate> |
|||
<Border Name="FocusTarget" |
|||
Background="Transparent" |
|||
Margin="0,-10" /> |
|||
</ControlTemplate> |
|||
</RepeatButton.Template> |
|||
</RepeatButton> |
|||
</Track.IncreaseButton> |
|||
<Thumb Classes="ColorSliderThumbStyle" |
|||
Name="ColorSliderThumb" |
|||
Margin="0" |
|||
Padding="0" |
|||
DataContext="{TemplateBinding Value}" |
|||
Height="{TemplateBinding Width}" |
|||
Width="{TemplateBinding Width}" /> |
|||
</Track> |
|||
</Grid> |
|||
</Border> |
|||
</ControlTemplate> |
|||
</Setter> |
|||
</Style> |
|||
<Style Selector="^:horizontal"> |
|||
<Setter Property="BorderThickness" Value="0" /> |
|||
<Setter Property="CornerRadius" Value="10" /> |
|||
<Setter Property="Height" Value="20" /> |
|||
<Setter Property="Template"> |
|||
<ControlTemplate TargetType="{x:Type ColorSlider}"> |
|||
<Border BorderThickness="{TemplateBinding BorderThickness}" |
|||
BorderBrush="{TemplateBinding BorderBrush}" |
|||
CornerRadius="{TemplateBinding CornerRadius}"> |
|||
<Grid Margin="{TemplateBinding Padding}"> |
|||
<Rectangle HorizontalAlignment="Stretch" |
|||
VerticalAlignment="Stretch" |
|||
Fill="{StaticResource ColorControlCheckeredBackgroundBrush}" |
|||
RadiusX="{TemplateBinding CornerRadius, Converter={StaticResource TopLeftCornerRadiusConverter}}" |
|||
RadiusY="{TemplateBinding CornerRadius, Converter={StaticResource BottomRightCornerRadiusConverter}}" /> |
|||
<Rectangle HorizontalAlignment="Stretch" |
|||
VerticalAlignment="Stretch" |
|||
Fill="{TemplateBinding Background}" |
|||
RadiusX="{TemplateBinding CornerRadius, Converter={StaticResource TopLeftCornerRadiusConverter}}" |
|||
RadiusY="{TemplateBinding CornerRadius, Converter={StaticResource BottomRightCornerRadiusConverter}}" /> |
|||
<Track Name="PART_Track" |
|||
HorizontalAlignment="Stretch" |
|||
VerticalAlignment="Stretch" |
|||
Minimum="{TemplateBinding Minimum}" |
|||
Maximum="{TemplateBinding Maximum}" |
|||
Value="{TemplateBinding Value, Mode=TwoWay}" |
|||
IsDirectionReversed="{TemplateBinding IsDirectionReversed}" |
|||
Orientation="Horizontal"> |
|||
<Track.DecreaseButton> |
|||
<RepeatButton Name="PART_DecreaseButton" |
|||
Background="Transparent" |
|||
Focusable="False" |
|||
HorizontalAlignment="Stretch" |
|||
VerticalAlignment="Stretch"> |
|||
<RepeatButton.Template> |
|||
<ControlTemplate> |
|||
<Border Name="FocusTarget" |
|||
Background="Transparent" |
|||
Margin="0,-10" /> |
|||
</ControlTemplate> |
|||
</RepeatButton.Template> |
|||
</RepeatButton> |
|||
</Track.DecreaseButton> |
|||
<Track.IncreaseButton> |
|||
<RepeatButton Name="PART_IncreaseButton" |
|||
Background="Transparent" |
|||
Focusable="False" |
|||
HorizontalAlignment="Stretch" |
|||
VerticalAlignment="Stretch"> |
|||
<RepeatButton.Template> |
|||
<ControlTemplate> |
|||
<Border Name="FocusTarget" |
|||
Background="Transparent" |
|||
Margin="0,-10" /> |
|||
</ControlTemplate> |
|||
</RepeatButton.Template> |
|||
</RepeatButton> |
|||
</Track.IncreaseButton> |
|||
<Thumb Name="ColorSliderThumb" |
|||
Theme="{StaticResource ColorSliderThumbTheme}" |
|||
Margin="0" |
|||
Padding="0" |
|||
DataContext="{TemplateBinding Value}" |
|||
Height="{TemplateBinding Height}" |
|||
Width="{TemplateBinding Height}" /> |
|||
</Track> |
|||
</Grid> |
|||
</Border> |
|||
</ControlTemplate> |
|||
</Setter> |
|||
</Style> |
|||
|
|||
<!-- Normal State --> |
|||
<Style Selector="ColorSlider /template/ Thumb.ColorSliderThumbStyle"> |
|||
<Setter Property="Background" Value="Transparent" /> |
|||
<Setter Property="BorderBrush" Value="{DynamicResource SystemControlForegroundBaseHighBrush}" /> |
|||
<Setter Property="BorderThickness" Value="3" /> |
|||
</Style> |
|||
<Style Selector="^:vertical"> |
|||
<Setter Property="BorderThickness" Value="0" /> |
|||
<Setter Property="CornerRadius" Value="10" /> |
|||
<Setter Property="Width" Value="20" /> |
|||
<Setter Property="Template"> |
|||
<ControlTemplate TargetType="{x:Type ColorSlider}"> |
|||
<Border BorderThickness="{TemplateBinding BorderThickness}" |
|||
BorderBrush="{TemplateBinding BorderBrush}" |
|||
CornerRadius="{TemplateBinding CornerRadius}"> |
|||
<Grid Margin="{TemplateBinding Padding}"> |
|||
<Rectangle HorizontalAlignment="Stretch" |
|||
VerticalAlignment="Stretch" |
|||
Fill="{StaticResource ColorControlCheckeredBackgroundBrush}" |
|||
RadiusX="{TemplateBinding CornerRadius, Converter={StaticResource TopLeftCornerRadiusConverter}}" |
|||
RadiusY="{TemplateBinding CornerRadius, Converter={StaticResource BottomRightCornerRadiusConverter}}" /> |
|||
<Rectangle HorizontalAlignment="Stretch" |
|||
VerticalAlignment="Stretch" |
|||
Fill="{TemplateBinding Background}" |
|||
RadiusX="{TemplateBinding CornerRadius, Converter={StaticResource TopLeftCornerRadiusConverter}}" |
|||
RadiusY="{TemplateBinding CornerRadius, Converter={StaticResource BottomRightCornerRadiusConverter}}" /> |
|||
<Track Name="PART_Track" |
|||
HorizontalAlignment="Stretch" |
|||
VerticalAlignment="Stretch" |
|||
Minimum="{TemplateBinding Minimum}" |
|||
Maximum="{TemplateBinding Maximum}" |
|||
Value="{TemplateBinding Value, Mode=TwoWay}" |
|||
IsDirectionReversed="{TemplateBinding IsDirectionReversed}" |
|||
Orientation="Vertical"> |
|||
<Track.DecreaseButton> |
|||
<RepeatButton Name="PART_DecreaseButton" |
|||
Background="Transparent" |
|||
Focusable="False" |
|||
HorizontalAlignment="Stretch" |
|||
VerticalAlignment="Stretch"> |
|||
<RepeatButton.Template> |
|||
<ControlTemplate> |
|||
<Border Name="FocusTarget" |
|||
Background="Transparent" |
|||
Margin="0,-10" /> |
|||
</ControlTemplate> |
|||
</RepeatButton.Template> |
|||
</RepeatButton> |
|||
</Track.DecreaseButton> |
|||
<Track.IncreaseButton> |
|||
<RepeatButton Name="PART_IncreaseButton" |
|||
Background="Transparent" |
|||
Focusable="False" |
|||
HorizontalAlignment="Stretch" |
|||
VerticalAlignment="Stretch"> |
|||
<RepeatButton.Template> |
|||
<ControlTemplate> |
|||
<Border Name="FocusTarget" |
|||
Background="Transparent" |
|||
Margin="0,-10" /> |
|||
</ControlTemplate> |
|||
</RepeatButton.Template> |
|||
</RepeatButton> |
|||
</Track.IncreaseButton> |
|||
<Thumb Name="ColorSliderThumb" |
|||
Theme="{StaticResource ColorSliderThumbTheme}" |
|||
Margin="0" |
|||
Padding="0" |
|||
DataContext="{TemplateBinding Value}" |
|||
Height="{TemplateBinding Width}" |
|||
Width="{TemplateBinding Width}" /> |
|||
</Track> |
|||
</Grid> |
|||
</Border> |
|||
</ControlTemplate> |
|||
</Setter> |
|||
</Style> |
|||
|
|||
<!-- Selector/Thumb Color --> |
|||
<Style Selector="^:pointerover /template/ Thumb#ColorSliderThumb"> |
|||
<Setter Property="Opacity" Value="0.75" /> |
|||
</Style> |
|||
<Style Selector="^:pointerover:dark-selector /template/ Thumb#ColorSliderThumb"> |
|||
<Setter Property="Opacity" Value="0.7" /> |
|||
</Style> |
|||
<Style Selector="^:pointerover:light-selector /template/ Thumb#ColorSliderThumb"> |
|||
<Setter Property="Opacity" Value="0.8" /> |
|||
</Style> |
|||
|
|||
<!-- Selector/Thumb Color --> |
|||
<Style Selector="ColorSlider:pointerover /template/ Thumb.ColorSliderThumbStyle"> |
|||
<Setter Property="Opacity" Value="0.75" /> |
|||
</Style> |
|||
<Style Selector="ColorSlider:pointerover:dark-selector /template/ Thumb.ColorSliderThumbStyle"> |
|||
<Setter Property="Opacity" Value="0.7" /> |
|||
</Style> |
|||
<Style Selector="ColorSlider:pointerover:light-selector /template/ Thumb.ColorSliderThumbStyle"> |
|||
<Setter Property="Opacity" Value="0.8" /> |
|||
</Style> |
|||
<Style Selector="^:dark-selector /template/ Thumb#ColorSliderThumb"> |
|||
<Setter Property="BorderBrush" Value="{DynamicResource SystemControlBackgroundChromeBlackHighBrush}" /> |
|||
</Style> |
|||
<Style Selector="^:light-selector /template/ Thumb#ColorSliderThumb"> |
|||
<Setter Property="BorderBrush" Value="{DynamicResource SystemControlBackgroundChromeWhiteBrush}" /> |
|||
</Style> |
|||
|
|||
<Style Selector="ColorSlider:dark-selector /template/ Thumb.ColorSliderThumbStyle"> |
|||
<Setter Property="BorderBrush" Value="{DynamicResource SystemControlBackgroundChromeBlackHighBrush}" /> |
|||
</Style> |
|||
<Style Selector="ColorSlider:light-selector /template/ Thumb.ColorSliderThumbStyle"> |
|||
<Setter Property="BorderBrush" Value="{DynamicResource SystemControlBackgroundChromeWhiteBrush}" /> |
|||
</Style> |
|||
</ControlTheme> |
|||
|
|||
</Styles> |
|||
</ResourceDictionary> |
|||
|
|||
File diff suppressed because it is too large
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue