-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add avalonia ProgressBar demo.
- Loading branch information
Showing
9 changed files
with
818 additions
and
21 deletions.
There are no files selected for viewing
100 changes: 100 additions & 0 deletions
100
src/Avalonia/HandyControlDemo_Avalonia/UserControl/Styles/NativeProgressBarDemo.axaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
<UserControl xmlns="https://github.com/avaloniaui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:hc="https://handyorg.github.io/handycontrol" | ||
x:Class="HandyControlDemo.UserControl.NativeProgressBarDemo"> | ||
<ScrollViewer> | ||
<hc:UniformSpacingPanel Margin="32" | ||
Spacing="32" | ||
ChildWrapping="Wrap"> | ||
<hc:UniformSpacingPanel Spacing="10" | ||
ItemWidth="400" | ||
Orientation="Vertical"> | ||
<ProgressBar Value="20" | ||
ShowProgressText="True" /> | ||
<ProgressBar Theme="{StaticResource ProgressBarSuccess}" | ||
Value="40" | ||
ShowProgressText="True" /> | ||
<ProgressBar Theme="{StaticResource ProgressBarInfo}" | ||
Value="60" | ||
ShowProgressText="True" /> | ||
<ProgressBar Theme="{StaticResource ProgressBarWarning}" | ||
Value="80" | ||
ShowProgressText="True" /> | ||
<ProgressBar Theme="{StaticResource ProgressBarDanger}" | ||
ShowProgressText="True" | ||
Value="100" | ||
Maximum="200" | ||
IsIndeterminate="True" /> | ||
|
||
<ProgressBar Theme="{StaticResource ProgressBarPrimaryStripe}" | ||
Value="120" | ||
Maximum="200" /> | ||
<ProgressBar Theme="{StaticResource ProgressBarSuccessStripe}" | ||
Value="60" | ||
Maximum="200" /> | ||
<ProgressBar Theme="{StaticResource ProgressBarInfoStripe}" | ||
Value="50" | ||
Maximum="200" /> | ||
<ProgressBar Theme="{StaticResource ProgressBarWarningStripe}" | ||
Value="180" | ||
Maximum="200" /> | ||
<ProgressBar Theme="{StaticResource ProgressBarDangerStripe}" | ||
IsIndeterminate="True" | ||
Maximum="200" /> | ||
<ProgressBar Theme="{StaticResource ProgressBarFlat}" | ||
Value="110" | ||
Maximum="200" | ||
IsIndeterminate="True" /> | ||
</hc:UniformSpacingPanel> | ||
<hc:UniformSpacingPanel Spacing="10" | ||
ItemHeight="300"> | ||
<ProgressBar Value="20" | ||
ShowProgressText="True" | ||
Orientation="Vertical" /> | ||
<ProgressBar Theme="{StaticResource ProgressBarSuccess}" | ||
Value="40" | ||
ShowProgressText="True" | ||
Orientation="Vertical" /> | ||
<ProgressBar Theme="{StaticResource ProgressBarInfo}" | ||
Value="60" | ||
ShowProgressText="True" | ||
Orientation="Vertical" /> | ||
<ProgressBar Theme="{StaticResource ProgressBarWarning}" | ||
Value="80" | ||
ShowProgressText="True" | ||
Orientation="Vertical" /> | ||
<ProgressBar Theme="{StaticResource ProgressBarDanger}" | ||
Value="100" | ||
Maximum="200" | ||
IsIndeterminate="True" | ||
Orientation="Vertical" /> | ||
|
||
<ProgressBar Theme="{StaticResource ProgressBarPrimaryStripe}" | ||
Value="120" | ||
Maximum="200" | ||
Orientation="Vertical" /> | ||
<ProgressBar Theme="{StaticResource ProgressBarSuccessStripe}" | ||
Value="60" | ||
Maximum="200" | ||
Orientation="Vertical" /> | ||
<ProgressBar Theme="{StaticResource ProgressBarInfoStripe}" | ||
Value="50" | ||
Maximum="200" | ||
Orientation="Vertical" /> | ||
<ProgressBar Theme="{StaticResource ProgressBarWarningStripe}" | ||
Value="180" | ||
Maximum="200" | ||
Orientation="Vertical" /> | ||
<ProgressBar Theme="{StaticResource ProgressBarDangerStripe}" | ||
IsIndeterminate="True" | ||
Maximum="200" | ||
Orientation="Vertical" /> | ||
<ProgressBar Theme="{StaticResource ProgressBarFlat}" | ||
Value="110" | ||
Maximum="200" | ||
IsIndeterminate="True" | ||
Orientation="Vertical" /> | ||
</hc:UniformSpacingPanel> | ||
</hc:UniformSpacingPanel> | ||
</ScrollViewer> | ||
</UserControl> |
10 changes: 10 additions & 0 deletions
10
src/Avalonia/HandyControlDemo_Avalonia/UserControl/Styles/NativeProgressBarDemo.axaml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace HandyControlDemo.UserControl; | ||
|
||
public partial class NativeProgressBarDemo : Avalonia.Controls.UserControl | ||
{ | ||
public NativeProgressBarDemo() | ||
{ | ||
InitializeComponent(); | ||
} | ||
} | ||
|
15 changes: 9 additions & 6 deletions
15
src/Avalonia/HandyControl_Avalonia/Themes/Basic/Converters.axaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
<ResourceDictionary xmlns="https://github.com/avaloniaui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:converter="clr-namespace:HandyControl.Tools.Converter"> | ||
xmlns:hc="clr-namespace:HandyControl.Tools.Converter" | ||
xmlns:avalonia="using:Avalonia.Controls.Converters"> | ||
|
||
<converter:BorderClipConverter x:Key="BorderClipConverter" /> | ||
<converter:BorderCircularConverter x:Key="BorderCircularConverter" /> | ||
<converter:BorderCircularClipConverter x:Key="BorderCircularClipConverter" /> | ||
<converter:GeometrySpacingConverter x:Key="GeometrySpacingConverter" /> | ||
<converter:CornerRadiusSplitConverter x:Key="CornerRadiusSplitConverter" /> | ||
<hc:BorderClipConverter x:Key="BorderClipConverter" /> | ||
<hc:BorderCircularConverter x:Key="BorderCircularConverter" /> | ||
<hc:BorderCircularClipConverter x:Key="BorderCircularClipConverter" /> | ||
<hc:GeometrySpacingConverter x:Key="GeometrySpacingConverter" /> | ||
<hc:CornerRadiusSplitConverter x:Key="CornerRadiusSplitConverter" /> | ||
<hc:DoubleExpandConverter x:Key="DoubleExpandConverter" /> | ||
<avalonia:StringFormatConverter x:Key="StringFormatConverter" /> | ||
|
||
</ResourceDictionary> |
Oops, something went wrong.