Browse Source

Merge pull request #11195 from robloo/progressbar-updates

Progressbar Updates
pull/11200/head
Max Katz 3 years ago
committed by GitHub
parent
commit
3b2c7135c2
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 95
      src/Avalonia.Controls/ProgressBar.cs
  2. 6
      src/Avalonia.Controls/SplitView/SplitView.cs
  3. 4
      src/Avalonia.Controls/SplitView/SplitViewTemplateSettings.cs
  4. 32
      src/Avalonia.Themes.Fluent/Controls/ProgressBar.xaml
  5. 4
      src/Avalonia.Themes.Simple/Controls/ProgressBar.xaml

95
src/Avalonia.Controls/ProgressBar.cs

@ -17,7 +17,13 @@ namespace Avalonia.Controls
[PseudoClasses(":vertical", ":horizontal", ":indeterminate")] [PseudoClasses(":vertical", ":horizontal", ":indeterminate")]
public class ProgressBar : RangeBase public class ProgressBar : RangeBase
{ {
public class ProgressBarTemplateProperties : AvaloniaObject /// <summary>
/// Provides calculated values for use with the <see cref="ProgressBar"/>'s control theme or template.
/// </summary>
/// <remarks>
/// This class is NOT intended for general use outside of control templates.
/// </remarks>
public class ProgressBarTemplateSettings : AvaloniaObject
{ {
private double _container2Width; private double _container2Width;
private double _containerWidth; private double _containerWidth;
@ -26,38 +32,38 @@ namespace Avalonia.Controls
private double _container2AnimationStartPosition; private double _container2AnimationStartPosition;
private double _container2AnimationEndPosition; private double _container2AnimationEndPosition;
public static readonly DirectProperty<ProgressBarTemplateProperties, double> ContainerAnimationStartPositionProperty = public static readonly DirectProperty<ProgressBarTemplateSettings, double> ContainerAnimationStartPositionProperty =
AvaloniaProperty.RegisterDirect<ProgressBarTemplateProperties, double>( AvaloniaProperty.RegisterDirect<ProgressBarTemplateSettings, double>(
nameof(ContainerAnimationStartPosition), nameof(ContainerAnimationStartPosition),
p => p.ContainerAnimationStartPosition, p => p.ContainerAnimationStartPosition,
(p, o) => p.ContainerAnimationStartPosition = o, 0d); (p, o) => p.ContainerAnimationStartPosition = o, 0d);
public static readonly DirectProperty<ProgressBarTemplateProperties, double> ContainerAnimationEndPositionProperty = public static readonly DirectProperty<ProgressBarTemplateSettings, double> ContainerAnimationEndPositionProperty =
AvaloniaProperty.RegisterDirect<ProgressBarTemplateProperties, double>( AvaloniaProperty.RegisterDirect<ProgressBarTemplateSettings, double>(
nameof(ContainerAnimationEndPosition), nameof(ContainerAnimationEndPosition),
p => p.ContainerAnimationEndPosition, p => p.ContainerAnimationEndPosition,
(p, o) => p.ContainerAnimationEndPosition = o, 0d); (p, o) => p.ContainerAnimationEndPosition = o, 0d);
public static readonly DirectProperty<ProgressBarTemplateProperties, double> Container2AnimationStartPositionProperty = public static readonly DirectProperty<ProgressBarTemplateSettings, double> Container2AnimationStartPositionProperty =
AvaloniaProperty.RegisterDirect<ProgressBarTemplateProperties, double>( AvaloniaProperty.RegisterDirect<ProgressBarTemplateSettings, double>(
nameof(Container2AnimationStartPosition), nameof(Container2AnimationStartPosition),
p => p.Container2AnimationStartPosition, p => p.Container2AnimationStartPosition,
(p, o) => p.Container2AnimationStartPosition = o, 0d); (p, o) => p.Container2AnimationStartPosition = o, 0d);
public static readonly DirectProperty<ProgressBarTemplateProperties, double> Container2AnimationEndPositionProperty = public static readonly DirectProperty<ProgressBarTemplateSettings, double> Container2AnimationEndPositionProperty =
AvaloniaProperty.RegisterDirect<ProgressBarTemplateProperties, double>( AvaloniaProperty.RegisterDirect<ProgressBarTemplateSettings, double>(
nameof(Container2AnimationEndPosition), nameof(Container2AnimationEndPosition),
p => p.Container2AnimationEndPosition, p => p.Container2AnimationEndPosition,
(p, o) => p.Container2AnimationEndPosition = o); (p, o) => p.Container2AnimationEndPosition = o);
public static readonly DirectProperty<ProgressBarTemplateProperties, double> Container2WidthProperty = public static readonly DirectProperty<ProgressBarTemplateSettings, double> Container2WidthProperty =
AvaloniaProperty.RegisterDirect<ProgressBarTemplateProperties, double>( AvaloniaProperty.RegisterDirect<ProgressBarTemplateSettings, double>(
nameof(Container2Width), nameof(Container2Width),
p => p.Container2Width, p => p.Container2Width,
(p, o) => p.Container2Width = o); (p, o) => p.Container2Width = o);
public static readonly DirectProperty<ProgressBarTemplateProperties, double> ContainerWidthProperty = public static readonly DirectProperty<ProgressBarTemplateSettings, double> ContainerWidthProperty =
AvaloniaProperty.RegisterDirect<ProgressBarTemplateProperties, double>( AvaloniaProperty.RegisterDirect<ProgressBarTemplateSettings, double>(
nameof(ContainerWidth), nameof(ContainerWidth),
p => p.ContainerWidth, p => p.ContainerWidth,
(p, o) => p.ContainerWidth = o); (p, o) => p.ContainerWidth = o);
@ -103,29 +109,57 @@ namespace Avalonia.Controls
private Border? _indicator; private Border? _indicator;
private IDisposable? _trackSizeChangedListener; private IDisposable? _trackSizeChangedListener;
/// <summary>
/// Defines the <see cref="IsIndeterminate"/> property.
/// </summary>
public static readonly StyledProperty<bool> IsIndeterminateProperty = public static readonly StyledProperty<bool> IsIndeterminateProperty =
AvaloniaProperty.Register<ProgressBar, bool>(nameof(IsIndeterminate)); AvaloniaProperty.Register<ProgressBar, bool>(nameof(IsIndeterminate));
/// <summary>
/// Defines the <see cref="ShowProgressText"/> property.
/// </summary>
public static readonly StyledProperty<bool> ShowProgressTextProperty = public static readonly StyledProperty<bool> ShowProgressTextProperty =
AvaloniaProperty.Register<ProgressBar, bool>(nameof(ShowProgressText)); AvaloniaProperty.Register<ProgressBar, bool>(nameof(ShowProgressText));
/// <summary>
/// Defines the <see cref="ProgressTextFormat"/> property.
/// </summary>
public static readonly StyledProperty<string> ProgressTextFormatProperty = public static readonly StyledProperty<string> ProgressTextFormatProperty =
AvaloniaProperty.Register<ProgressBar, string>(nameof(ProgressTextFormat), "{1:0}%"); AvaloniaProperty.Register<ProgressBar, string>(nameof(ProgressTextFormat), "{1:0}%");
/// <summary>
/// Defines the <see cref="Orientation"/> property.
/// </summary>
public static readonly StyledProperty<Orientation> OrientationProperty = public static readonly StyledProperty<Orientation> OrientationProperty =
AvaloniaProperty.Register<ProgressBar, Orientation>(nameof(Orientation), Orientation.Horizontal); AvaloniaProperty.Register<ProgressBar, Orientation>(nameof(Orientation), Orientation.Horizontal);
/// <summary>
/// Defines the <see cref="Percentage"/> property.
/// </summary>
public static readonly DirectProperty<ProgressBar, double> PercentageProperty = public static readonly DirectProperty<ProgressBar, double> PercentageProperty =
AvaloniaProperty.RegisterDirect<ProgressBar, double>( AvaloniaProperty.RegisterDirect<ProgressBar, double>(
nameof(Percentage), nameof(Percentage),
o => o.Percentage); o => o.Percentage);
/// <summary>
/// Defines the <see cref="IndeterminateStartingOffset"/> property.
/// </summary>
public static readonly StyledProperty<double> IndeterminateStartingOffsetProperty = public static readonly StyledProperty<double> IndeterminateStartingOffsetProperty =
AvaloniaProperty.Register<ProgressBar, double>(nameof(IndeterminateStartingOffset)); AvaloniaProperty.Register<ProgressBar, double>(nameof(IndeterminateStartingOffset));
/// <summary>
/// Defines the <see cref="IndeterminateEndingOffset"/> property.
/// </summary>
public static readonly StyledProperty<double> IndeterminateEndingOffsetProperty = public static readonly StyledProperty<double> IndeterminateEndingOffsetProperty =
AvaloniaProperty.Register<ProgressBar, double>(nameof(IndeterminateEndingOffset)); AvaloniaProperty.Register<ProgressBar, double>(nameof(IndeterminateEndingOffset));
/// <summary>
/// Gets the overall percentage complete of the progress
/// </summary>
/// <remarks>
/// This read-only property is automatically calculated using the current <see cref="RangeBase.Value"/> and
/// the effective range (<see cref="RangeBase.Maximum"/> - <see cref="RangeBase.Minimum"/>).
/// </remarks>
public double Percentage public double Percentage
{ {
get { return _percentage; } get { return _percentage; }
@ -154,31 +188,50 @@ namespace Avalonia.Controls
OrientationProperty.Changed.AddClassHandler<ProgressBar>((x, e) => x.UpdateIndicatorWhenPropChanged(e)); OrientationProperty.Changed.AddClassHandler<ProgressBar>((x, e) => x.UpdateIndicatorWhenPropChanged(e));
} }
/// <summary>
/// Initializes a new instance of the <see cref="ProgressBar"/> class.
/// </summary>
public ProgressBar() public ProgressBar()
{ {
UpdatePseudoClasses(IsIndeterminate, Orientation); UpdatePseudoClasses(IsIndeterminate, Orientation);
} }
public ProgressBarTemplateProperties TemplateProperties { get; } = new ProgressBarTemplateProperties(); /// <summary>
/// Gets or sets the TemplateSettings for the <see cref="ProgressBar"/>.
/// </summary>
public ProgressBarTemplateSettings TemplateSettings { get; } = new ProgressBarTemplateSettings();
/// <summary>
/// Gets or sets a value indicating whether the progress bar shows the actual value or a generic,
/// continues progress indicator (indeterminate state).
/// </summary>
public bool IsIndeterminate public bool IsIndeterminate
{ {
get => GetValue(IsIndeterminateProperty); get => GetValue(IsIndeterminateProperty);
set => SetValue(IsIndeterminateProperty, value); set => SetValue(IsIndeterminateProperty, value);
} }
/// <summary>
/// Gets or sets a value indicating whether progress text will be shown.
/// </summary>
public bool ShowProgressText public bool ShowProgressText
{ {
get => GetValue(ShowProgressTextProperty); get => GetValue(ShowProgressTextProperty);
set => SetValue(ShowProgressTextProperty, value); set => SetValue(ShowProgressTextProperty, value);
} }
/// <summary>
/// Gets or sets the format string applied to the internally calculated progress text before it is shown.
/// </summary>
public string ProgressTextFormat public string ProgressTextFormat
{ {
get => GetValue(ProgressTextFormatProperty); get => GetValue(ProgressTextFormatProperty);
set => SetValue(ProgressTextFormatProperty, value); set => SetValue(ProgressTextFormatProperty, value);
} }
/// <summary>
/// Gets or sets the orientation of the <see cref="ProgressBar"/>.
/// </summary>
public Orientation Orientation public Orientation Orientation
{ {
get => GetValue(OrientationProperty); get => GetValue(OrientationProperty);
@ -193,6 +246,7 @@ namespace Avalonia.Controls
return result; return result;
} }
/// <inheritdoc/>
protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change) protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
{ {
base.OnPropertyChanged(change); base.OnPropertyChanged(change);
@ -242,15 +296,14 @@ namespace Avalonia.Controls
var barIndicatorWidth = dim * 0.4; // Indicator width at 40% of ProgressBar var barIndicatorWidth = dim * 0.4; // Indicator width at 40% of ProgressBar
var barIndicatorWidth2 = dim * 0.6; // Indicator width at 60% of ProgressBar var barIndicatorWidth2 = dim * 0.6; // Indicator width at 60% of ProgressBar
TemplateProperties.ContainerWidth = barIndicatorWidth; TemplateSettings.ContainerWidth = barIndicatorWidth;
TemplateProperties.Container2Width = barIndicatorWidth2; TemplateSettings.Container2Width = barIndicatorWidth2;
TemplateProperties.ContainerAnimationStartPosition = barIndicatorWidth * -1.8; // Position at -180%
TemplateProperties.ContainerAnimationEndPosition = barIndicatorWidth * 3.0; // Position at 300%
TemplateProperties.Container2AnimationStartPosition = barIndicatorWidth2 * -1.5; // Position at -150% TemplateSettings.ContainerAnimationStartPosition = barIndicatorWidth * -1.8; // Position at -180%
TemplateProperties.Container2AnimationEndPosition = barIndicatorWidth2 * 1.66; // Position at 166% TemplateSettings.ContainerAnimationEndPosition = barIndicatorWidth * 3.0; // Position at 300%
TemplateSettings.Container2AnimationStartPosition = barIndicatorWidth2 * -1.5; // Position at -150%
TemplateSettings.Container2AnimationEndPosition = barIndicatorWidth2 * 1.66; // Position at 166%
// Remove these properties when we switch to fluent as default and removed the old one. // Remove these properties when we switch to fluent as default and removed the old one.
SetCurrentValue(IndeterminateStartingOffsetProperty,-dim); SetCurrentValue(IndeterminateStartingOffsetProperty,-dim);

6
src/Avalonia.Controls/SplitView/SplitView.cs

@ -217,8 +217,8 @@ namespace Avalonia.Controls
/// <summary> /// <summary>
/// Gets or sets whether WinUI equivalent LightDismissOverlayMode is enabled /// Gets or sets whether WinUI equivalent LightDismissOverlayMode is enabled
/// <para>When enabled, and the pane is open in Overlay or CompactOverlay mode, /// <para>When enabled, and the pane is open in Overlay or CompactOverlay mode,
/// the contents of the splitview are darkened to visually separate the open pane /// the contents of the <see cref="SplitView"/> are darkened to visually separate the open pane
/// and the rest of the SplitView</para> /// and the rest of the <see cref="SplitView"/>.</para>
/// </summary> /// </summary>
public bool UseLightDismissOverlayMode public bool UseLightDismissOverlayMode
{ {
@ -227,7 +227,7 @@ namespace Avalonia.Controls
} }
/// <summary> /// <summary>
/// Gets or sets the TemplateSettings for the SplitView /// Gets or sets the TemplateSettings for the <see cref="SplitView"/>.
/// </summary> /// </summary>
public SplitViewTemplateSettings TemplateSettings public SplitViewTemplateSettings TemplateSettings
{ {

4
src/Avalonia.Controls/SplitView/SplitViewTemplateSettings.cs

@ -2,8 +2,10 @@
{ {
/// <summary> /// <summary>
/// Provides calculated values for use with the <see cref="SplitView"/>'s control theme or template. /// Provides calculated values for use with the <see cref="SplitView"/>'s control theme or template.
/// This class is NOT intended for general use.
/// </summary> /// </summary>
/// <remarks>
/// This class is NOT intended for general use outside of control templates.
/// </remarks>
public class SplitViewTemplateSettings : AvaloniaObject public class SplitViewTemplateSettings : AvaloniaObject
{ {
internal SplitViewTemplateSettings() { } internal SplitViewTemplateSettings() { }

32
src/Avalonia.Themes.Fluent/Controls/ProgressBar.xaml

@ -125,13 +125,13 @@
<Style.Animations> <Style.Animations>
<Animation IterationCount="Infinite" Duration="0:0:2"> <Animation IterationCount="Infinite" Duration="0:0:2">
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0"> <KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0">
<Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateProperties.ContainerAnimationStartPosition}" /> <Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerAnimationStartPosition}" />
</KeyFrame> </KeyFrame>
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:1.5"> <KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:1.5">
<Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateProperties.ContainerAnimationEndPosition}" /> <Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerAnimationEndPosition}" />
</KeyFrame> </KeyFrame>
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:2"> <KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:2">
<Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateProperties.ContainerAnimationEndPosition}" /> <Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerAnimationEndPosition}" />
</KeyFrame> </KeyFrame>
</Animation> </Animation>
</Style.Animations> </Style.Animations>
@ -140,13 +140,13 @@
<Style.Animations> <Style.Animations>
<Animation IterationCount="Infinite" Duration="0:0:2"> <Animation IterationCount="Infinite" Duration="0:0:2">
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0"> <KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0">
<Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateProperties.Container2AnimationStartPosition}" /> <Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2AnimationStartPosition}" />
</KeyFrame> </KeyFrame>
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0.75"> <KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0.75">
<Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateProperties.Container2AnimationStartPosition}" /> <Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2AnimationStartPosition}" />
</KeyFrame> </KeyFrame>
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:2"> <KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:2">
<Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateProperties.Container2AnimationEndPosition}" /> <Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2AnimationEndPosition}" />
</KeyFrame> </KeyFrame>
</Animation> </Animation>
</Style.Animations> </Style.Animations>
@ -155,13 +155,13 @@
<Style.Animations> <Style.Animations>
<Animation IterationCount="Infinite" Duration="0:0:2"> <Animation IterationCount="Infinite" Duration="0:0:2">
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0"> <KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0">
<Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateProperties.ContainerAnimationStartPosition}" /> <Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerAnimationStartPosition}" />
</KeyFrame> </KeyFrame>
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:1.5"> <KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:1.5">
<Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateProperties.ContainerAnimationEndPosition}" /> <Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerAnimationEndPosition}" />
</KeyFrame> </KeyFrame>
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:2"> <KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:2">
<Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateProperties.ContainerAnimationEndPosition}" /> <Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerAnimationEndPosition}" />
</KeyFrame> </KeyFrame>
</Animation> </Animation>
</Style.Animations> </Style.Animations>
@ -170,28 +170,28 @@
<Style.Animations> <Style.Animations>
<Animation IterationCount="Infinite" Duration="0:0:2"> <Animation IterationCount="Infinite" Duration="0:0:2">
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0"> <KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0">
<Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateProperties.Container2AnimationStartPosition}" /> <Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2AnimationStartPosition}" />
</KeyFrame> </KeyFrame>
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0.75"> <KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0.75">
<Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateProperties.Container2AnimationStartPosition}" /> <Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2AnimationStartPosition}" />
</KeyFrame> </KeyFrame>
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:2"> <KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:2">
<Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateProperties.Container2AnimationEndPosition}" /> <Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2AnimationEndPosition}" />
</KeyFrame> </KeyFrame>
</Animation> </Animation>
</Style.Animations> </Style.Animations>
</Style> </Style>
<Style Selector="^:horizontal /template/ Border#IndeterminateProgressBarIndicator"> <Style Selector="^:horizontal /template/ Border#IndeterminateProgressBarIndicator">
<Setter Property="Width" Value="{Binding $parent[ProgressBar].TemplateProperties.ContainerWidth}" /> <Setter Property="Width" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerWidth}" />
</Style> </Style>
<Style Selector="^:horizontal /template/ Border#IndeterminateProgressBarIndicator2"> <Style Selector="^:horizontal /template/ Border#IndeterminateProgressBarIndicator2">
<Setter Property="Width" Value="{Binding $parent[ProgressBar].TemplateProperties.Container2Width}" /> <Setter Property="Width" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2Width}" />
</Style> </Style>
<Style Selector="^:vertical /template/ Border#IndeterminateProgressBarIndicator"> <Style Selector="^:vertical /template/ Border#IndeterminateProgressBarIndicator">
<Setter Property="Height" Value="{Binding $parent[ProgressBar].TemplateProperties.ContainerWidth}" /> <Setter Property="Height" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerWidth}" />
</Style> </Style>
<Style Selector="^:vertical /template/ Border#IndeterminateProgressBarIndicator2"> <Style Selector="^:vertical /template/ Border#IndeterminateProgressBarIndicator2">
<Setter Property="Height" Value="{Binding $parent[ProgressBar].TemplateProperties.Container2Width}" /> <Setter Property="Height" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2Width}" />
</Style> </Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

4
src/Avalonia.Themes.Simple/Controls/ProgressBar.xaml

@ -93,7 +93,7 @@
</KeyFrame> </KeyFrame>
</Animation> </Animation>
</Style.Animations> </Style.Animations>
<Setter Property="Width" Value="{Binding TemplateProperties.ContainerWidth, RelativeSource={RelativeSource TemplatedParent}}" /> <Setter Property="Width" Value="{Binding TemplateSettings.ContainerWidth, RelativeSource={RelativeSource TemplatedParent}}" />
</Style> </Style>
<Style Selector="^:vertical:indeterminate /template/ Border#PART_IndeterminateIndicator"> <Style Selector="^:vertical:indeterminate /template/ Border#PART_IndeterminateIndicator">
<Style.Animations> <Style.Animations>
@ -108,7 +108,7 @@
</KeyFrame> </KeyFrame>
</Animation> </Animation>
</Style.Animations> </Style.Animations>
<Setter Property="Height" Value="{Binding TemplateProperties.ContainerWidth, RelativeSource={RelativeSource TemplatedParent}}" /> <Setter Property="Height" Value="{Binding TemplateSettings.ContainerWidth, RelativeSource={RelativeSource TemplatedParent}}" />
</Style> </Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

Loading…
Cancel
Save