9 changed files with 174 additions and 25 deletions
@ -0,0 +1,24 @@ |
|||
<UserControl xmlns="https://github.com/avaloniaui"> |
|||
<StackPanel Orientation="Vertical" Gap="4"> |
|||
<TextBlock Classes="h1">ProgressBar</TextBlock> |
|||
<TextBlock Classes="h2">A progress bar control</TextBlock> |
|||
|
|||
<StackPanel> |
|||
<StackPanel Orientation="Horizontal" |
|||
Margin="0,16,0,0" |
|||
HorizontalAlignment="Center" |
|||
Gap="16"> |
|||
<StackPanel Gap="16"> |
|||
<ProgressBar Value="{Binding #hprogress.Value}" /> |
|||
<ProgressBar IsIndeterminate="True"/> |
|||
</StackPanel> |
|||
<ProgressBar Value="{Binding #vprogress.Value}" Orientation="Vertical" /> |
|||
<ProgressBar Orientation="Vertical" IsIndeterminate="True" /> |
|||
</StackPanel> |
|||
<StackPanel Margin="16"> |
|||
<Slider Name="hprogress" Maximum="100" Value="40"/> |
|||
<Slider Name="vprogress" Maximum="100" Value="60"/> |
|||
</StackPanel> |
|||
</StackPanel> |
|||
</StackPanel> |
|||
</UserControl> |
|||
@ -0,0 +1,18 @@ |
|||
using Avalonia.Controls; |
|||
using Avalonia.Markup.Xaml; |
|||
|
|||
namespace ControlCatalog.Pages |
|||
{ |
|||
public class ProgressBarPage : UserControl |
|||
{ |
|||
public ProgressBarPage() |
|||
{ |
|||
this.InitializeComponent(); |
|||
} |
|||
|
|||
private void InitializeComponent() |
|||
{ |
|||
AvaloniaXamlLoader.Load(this); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,21 @@ |
|||
// Copyright (c) The Avalonia Project. All rights reserved.
|
|||
// Licensed under the MIT license. See licence.md file in the project root for full license information.
|
|||
|
|||
namespace Avalonia.Controls |
|||
{ |
|||
/// <summary>
|
|||
/// Defines vertical or horizontal orientation.
|
|||
/// </summary>
|
|||
public enum Orientation |
|||
{ |
|||
/// <summary>
|
|||
/// Horizontal orientation.
|
|||
/// </summary>
|
|||
Horizontal, |
|||
|
|||
/// <summary>
|
|||
/// Vertical orientation.
|
|||
/// </summary>
|
|||
Vertical, |
|||
} |
|||
} |
|||
Loading…
Reference in new issue