Skip to content

Commit 75457b2

Browse files
committed
Add OutOfBoxPage Sample
1 parent b6f1743 commit 75457b2

4 files changed

Lines changed: 129 additions & 0 deletions

File tree

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,13 @@
141141
"IsSpecialSection": false,
142142
"UseBuiltInNavigationViewInfoBadgeStyle": true,
143143
"Items": [
144+
{
145+
"UniqueId": "DevWinUIGallery.Views.OutOfBoxPagePage",
146+
"Title": "OutOfBoxPage",
147+
"Subtitle": "Out Of Box Page",
148+
"IsNew": true,
149+
"ImagePath": "ms-appx:///Assets/Fluent/dataGrid.png"
150+
},
144151
{
145152
"UniqueId": "DevWinUIGallery.Views.CardPage",
146153
"Title": "Card",

dev/DevWinUI.Gallery/T4Templates/NavigationPageMappings.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ 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.OutOfBoxPagePage", typeof(DevWinUIGallery.Views.OutOfBoxPagePage)},
3536
{"DevWinUIGallery.Views.CardPage", typeof(DevWinUIGallery.Views.CardPage)},
3637
{"DevWinUIGallery.Views.StorageRingPage", typeof(DevWinUIGallery.Views.StorageRingPage)},
3738
{"DevWinUIGallery.Views.StorageBarPage", typeof(DevWinUIGallery.Views.StorageBarPage)},
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<Page x:Class="DevWinUIGallery.Views.OutOfBoxPagePage"
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/outOfBoxPage"
16+
HeaderText="OutOfBoxPage">
17+
<local:ControlExample.Xaml>
18+
<x:String>
19+
&lt;dev:OutOfBoxPage Title="Title" Description="Description" /&gt;
20+
</x:String>
21+
</local:ControlExample.Xaml>
22+
<local:ControlExample.Pane>
23+
<StackPanel Spacing="10">
24+
<ToggleSwitch x:Name="TGTopHeroImage"
25+
Header="Use Top HeroImage" />
26+
<TextBox x:Name="TxtTitle"
27+
Header="Title"
28+
PlaceholderText="Title"
29+
Text="FileExplorer Preview" />
30+
<TextBox x:Name="TxtDescription"
31+
Header="Description"
32+
PlaceholderText="Description"
33+
Text="These settings allow you to manage your Windows File Explorer custom preview handlers." />
34+
<TextBox x:Name="TxtSecondaryLinksHeader"
35+
Header="Secondary Links Header"
36+
PlaceholderText="Attribution"
37+
Text="Attribution" />
38+
</StackPanel>
39+
</local:ControlExample.Pane>
40+
<dev:OutOfBoxPage Title="{x:Bind TxtTitle.Text, Mode=OneWay}"
41+
Description="{x:Bind TxtDescription.Text, Mode=OneWay}"
42+
HeroImage="ms-appx:///Assets/Modules/OOBE/FileExplorer.png"
43+
SecondaryLinksHeader="{x:Bind TxtSecondaryLinksHeader.Text, Mode=OneWay}"
44+
UseTopHeroImage="{x:Bind TGTopHeroImage.IsOn, Mode=OneWay}">
45+
<dev:OutOfBoxPage.ActionContent>
46+
<Grid Padding="0,0,4,0"
47+
ColumnSpacing="16">
48+
<Grid.ColumnDefinitions>
49+
<ColumnDefinition Width="Auto" />
50+
<ColumnDefinition Width="*" />
51+
</Grid.ColumnDefinitions>
52+
<Border Width="20"
53+
Height="20"
54+
CornerRadius="10">
55+
<Border.Background>
56+
<LinearGradientBrush StartPoint="0,0" EndPoint="0.5,1">
57+
<GradientStop Offset="0.0" Color="#6FB538" />
58+
<GradientStop Offset="1.0" Color="#397A24" />
59+
</LinearGradientBrush>
60+
</Border.Background>
61+
<FontIcon AutomationProperties.AccessibilityView="Raw"
62+
FontSize="11"
63+
Foreground="White"
64+
Glyph="&#xE73E;" />
65+
</Border>
66+
<StackPanel Grid.Column="1">
67+
<TextBlock FontWeight="SemiBold"
68+
Text="You're up to date" />
69+
<TextBlock Foreground="{ThemeResource TextFillColorSecondaryBrush}"
70+
Style="{StaticResource CaptionTextBlockStyle}"
71+
Text="Last checked: 25/05/1404" />
72+
</StackPanel>
73+
</Grid>
74+
</dev:OutOfBoxPage.ActionContent>
75+
<dev:OutOfBoxPage.Content>
76+
<StackPanel dev:PanelAttach.ChildrenTransitions="Default"
77+
Orientation="Vertical">
78+
<dev:SettingsCard Header="Enable FileExplorer"
79+
HeaderIcon="{dev:BitmapIcon Source=/Assets/Fluent/fileExplorerPreview.png}">
80+
<ToggleSwitch OffContent="Off"
81+
OnContent="On" />
82+
</dev:SettingsCard>
83+
<InfoBar Title="The system administrator is forcing this setting."
84+
IsClosable="False"
85+
IsOpen="True"
86+
Severity="Informational" />
87+
</StackPanel>
88+
</dev:OutOfBoxPage.Content>
89+
90+
<dev:OutOfBoxPage.PrimaryLinks>
91+
<dev:OutOfBoxPageLink Link="https://aka.ms/PowerToysOverview_Awake"
92+
Text="FileExplorer" />
93+
<dev:OutOfBoxPageLink Link="https://aka.ms/PowerToysOverview_Awake"
94+
Text="FileExplorer" />
95+
<dev:OutOfBoxPageLink Link="https://aka.ms/PowerToysOverview_Awake"
96+
Text="FileExplorer" />
97+
98+
</dev:OutOfBoxPage.PrimaryLinks>
99+
<dev:OutOfBoxPage.SecondaryLinks>
100+
<dev:OutOfBoxPageLink Link="https://Awake.den.dev"
101+
Text="File Explorer add-ons" />
102+
<dev:OutOfBoxPageLink Link="https://Awake.den.dev"
103+
Text="File Explorer add-ons" />
104+
105+
</dev:OutOfBoxPage.SecondaryLinks>
106+
</dev:OutOfBoxPage>
107+
108+
</local:ControlExample>
109+
</StackPanel>
110+
</ScrollViewer>
111+
112+
</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 OutOfBoxPagePage : Page
4+
{
5+
public OutOfBoxPagePage()
6+
{
7+
InitializeComponent();
8+
}
9+
}

0 commit comments

Comments
 (0)