Skip to content

Commit 121ba00

Browse files
committed
Add StorageBar and StorageRing Samples
1 parent dabb4f9 commit 121ba00

10 files changed

Lines changed: 10457 additions & 15835 deletions

File tree

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ Install-Package DevWinUI
147147
## 🔥 DevWinUI.Controls 🔥
148148
### ⚡ What’s Inside? ⚡
149149

150+
- ✨ StorageRing
151+
- ✨ StorageBar
150152
- ✨ WindowedContentDialog
151153
- ✨ MessageBox
152154
- ✨ DepthLayerView
@@ -294,6 +296,12 @@ Install-Package DevWinUI.ContextMenu
294296

295297
## 🕰️ History 🕰️
296298

299+
### StorageBar
300+
![DevWinUI](https://raw.githubusercontent.com/ghost1372/DevWinUI-Resources/refs/heads/main/DevWinUI-Docs/StorageBar.gif)
301+
302+
### StorageRing
303+
![DevWinUI](https://raw.githubusercontent.com/ghost1372/DevWinUI-Resources/refs/heads/main/DevWinUI-Docs/StorageRing.gif)
304+
297305
### MessageBox
298306
![DevWinUI](https://raw.githubusercontent.com/ghost1372/DevWinUI-Resources/refs/heads/main/DevWinUI-Docs/MessageBox.png)
299307

dev/DevWinUI.Controls/Themes/Generic.xaml

Lines changed: 10303 additions & 15833 deletions
Large diffs are not rendered by default.

dev/DevWinUI.Controls/Themes/Styles/Controls/StorageRing.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@
118118
<Setter Property="Foreground" Value="{ThemeResource StorageRingValueBrush}" />
119119
<Setter Property="ValueRingThickness" Value="{ThemeResource StorageRingValueRingThickness}" />
120120
<Setter Property="TrackRingThickness" Value="{ThemeResource StorageRingTrackRingThickness}" />
121-
<Setter Property="Width" Value="16" />
122-
<Setter Property="Height" Value="16" />
121+
<Setter Property="Width" Value="128" />
122+
<Setter Property="Height" Value="128" />
123123
<Setter Property="MinAngle" Value="0" />
124124
<Setter Property="MaxAngle" Value="360" />
125125
<Setter Property="StartAngle" Value="0" />
2.92 KB
Loading

dev/DevWinUI.Gallery/Assets/NavViewMenu/AppData.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,20 @@
146146
"IsSpecialSection": false,
147147
"UseBuiltInNavigationViewInfoBadgeStyle": true,
148148
"Items": [
149+
{
150+
"UniqueId": "DevWinUIGallery.Views.StorageRingPage",
151+
"Title": "Storage Ring",
152+
"Subtitle": "Storage Ring",
153+
"IsNew": true,
154+
"ImagePath": "ms-appx:///Assets/Fluent/ProgressRing.png"
155+
},
156+
{
157+
"UniqueId": "DevWinUIGallery.Views.StorageBarPage",
158+
"Title": "Storage Bar",
159+
"Subtitle": "Storage Bar",
160+
"IsNew": true,
161+
"ImagePath": "ms-appx:///Assets/Fluent/ProgressBar.png"
162+
},
149163
{
150164
"UniqueId": "DevWinUIGallery.Views.GifImagePage",
151165
"Title": "Gif Image",

dev/DevWinUI.Gallery/T4Templates/NavigationPageMappings.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ public partial class NavigationPageMappings
3232
{"DevWinUIGallery.Views.ThemeManagerPage", typeof(DevWinUIGallery.Views.ThemeManagerPage)},
3333
{"DevWinUIGallery.Views.CheckUpdatePage", typeof(DevWinUIGallery.Views.CheckUpdatePage)},
3434
{"DevWinUIGallery.Views.PickersPage", typeof(DevWinUIGallery.Views.PickersPage)},
35+
{"DevWinUIGallery.Views.StorageRingPage", typeof(DevWinUIGallery.Views.StorageRingPage)},
36+
{"DevWinUIGallery.Views.StorageBarPage", typeof(DevWinUIGallery.Views.StorageBarPage)},
3537
{"DevWinUIGallery.Views.GifImagePage", typeof(DevWinUIGallery.Views.GifImagePage)},
3638
{"DevWinUIGallery.Views.AccordionPage", typeof(DevWinUIGallery.Views.AccordionPage)},
3739
{"DevWinUIGallery.Views.ArcProgressPage", typeof(DevWinUIGallery.Views.ArcProgressPage)},
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<Page x:Class="DevWinUIGallery.Views.StorageBarPage"
3+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6+
xmlns:dev="using:DevWinUI"
7+
xmlns:local="using:DevWinUIGallery"
8+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
9+
mc:Ignorable="d">
10+
11+
<ScrollViewer>
12+
<StackPanel Margin="10"
13+
dev:PanelAttach.ChildrenTransitions="Default"
14+
Spacing="10">
15+
<local:ControlExample DocPage="controls/storageBar"
16+
HeaderText="StorageBar">
17+
<local:ControlExample.Xaml>
18+
<x:String>
19+
&lt;dev:StorageBar Value="25" /&gt;
20+
</x:String>
21+
</local:ControlExample.Xaml>
22+
<local:ControlExample.Pane>
23+
<StackPanel Spacing="10">
24+
<Slider x:Name="SlValue"
25+
Header="Value"
26+
Value="26" />
27+
<Slider x:Name="SlValueBarHeight"
28+
Header="Value Bar Height"
29+
Value="6" />
30+
<Slider x:Name="SlTrackBarHeight"
31+
Header="Track Bar Height"
32+
Value="3" />
33+
<Slider x:Name="SlPercentCaution"
34+
Header="Percent Caution"
35+
Value="75.1" />
36+
<Slider x:Name="SlPercentCritical"
37+
Header="Percent Critical"
38+
Value="89.9" />
39+
</StackPanel>
40+
</local:ControlExample.Pane>
41+
<dev:StorageBar PercentCaution="{x:Bind SlPercentCaution.Value, Mode=OneWay}"
42+
PercentCritical="{x:Bind SlPercentCritical.Value, Mode=OneWay}"
43+
TrackBarHeight="{x:Bind SlTrackBarHeight.Value, Mode=OneWay}"
44+
ValueBarHeight="{x:Bind SlValueBarHeight.Value, Mode=OneWay}"
45+
Value="{x:Bind SlValue.Value, Mode=OneWay}" />
46+
</local:ControlExample>
47+
</StackPanel>
48+
</ScrollViewer>
49+
50+
</Page>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
namespace DevWinUIGallery.Views;
2+
3+
public sealed partial class StorageBarPage : Page
4+
{
5+
public StorageBarPage()
6+
{
7+
InitializeComponent();
8+
}
9+
}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<Page x:Class="DevWinUIGallery.Views.StorageRingPage"
3+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6+
xmlns:dev="using:DevWinUI"
7+
xmlns:local="using:DevWinUIGallery"
8+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
9+
mc:Ignorable="d">
10+
11+
<ScrollViewer>
12+
<StackPanel Margin="10"
13+
dev:PanelAttach.ChildrenTransitions="Default"
14+
Spacing="10">
15+
<local:ControlExample DocPage="controls/storageRing"
16+
HeaderText="StorageRing">
17+
<local:ControlExample.Xaml>
18+
<x:String>
19+
&lt;dev:StorageRing Value="25" /&gt;
20+
</x:String>
21+
</local:ControlExample.Xaml>
22+
<local:ControlExample.Pane>
23+
<StackPanel Spacing="10">
24+
<Slider x:Name="SlValue"
25+
Header="Value"
26+
Value="26" />
27+
<Slider x:Name="SlValueRingThickness"
28+
Header="Value Ring Thickness"
29+
Value="3" />
30+
<Slider x:Name="SlTrackRingThickness"
31+
Header="Track Ring Thickness"
32+
Value="1" />
33+
<Slider x:Name="SlPercentCaution"
34+
Header="Percent Caution"
35+
Value="75.1" />
36+
<Slider x:Name="SlPercentCritical"
37+
Header="Percent Critical"
38+
Value="89.9" />
39+
<Slider x:Name="SlMinAngle"
40+
Header="Min Angle"
41+
Maximum="360"
42+
Value="0" />
43+
<Slider x:Name="SlMaxAngle"
44+
Header="Max Angle"
45+
Maximum="360"
46+
Value="360" />
47+
</StackPanel>
48+
</local:ControlExample.Pane>
49+
<dev:StorageRing MaxAngle="{x:Bind SlMaxAngle.Value, Mode=OneWay}"
50+
MinAngle="{x:Bind SlMinAngle.Value, Mode=OneWay}"
51+
PercentCaution="{x:Bind SlPercentCaution.Value, Mode=OneWay}"
52+
PercentCritical="{x:Bind SlPercentCritical.Value, Mode=OneWay}"
53+
TrackRingThickness="{x:Bind SlTrackRingThickness.Value, Mode=OneWay}"
54+
ValueRingThickness="{x:Bind SlValueRingThickness.Value, Mode=OneWay}"
55+
Value="{x:Bind SlValue.Value, Mode=OneWay}" />
56+
</local:ControlExample>
57+
</StackPanel>
58+
</ScrollViewer>
59+
60+
</Page>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
namespace DevWinUIGallery.Views;
2+
3+
public sealed partial class StorageRingPage : Page
4+
{
5+
public StorageRingPage()
6+
{
7+
InitializeComponent();
8+
}
9+
}

0 commit comments

Comments
 (0)