Skip to content

Commit 6e5cbcc

Browse files
Adding templated cs-winui project (#129)
* adding templated cs-winui project * sample updates to 1.0 GA Co-authored-by: Angela Zhang <[email protected]>
1 parent 001b504 commit 6e5cbcc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+790
-660
lines changed
Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
<!-- Copyright (c) Microsoft Corporation.
22
Licensed under the MIT License. -->
33
<Application
4-
x:Class="SampleApp.App"
4+
x:Class="Windowing.App"
55
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
66
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
7-
xmlns:local="using:SampleApp">
7+
xmlns:local="using:Windowing">
8+
89
<Application.Resources>
10+
<!-- Application-specific resources -->
911
<ResourceDictionary>
1012
<ResourceDictionary.MergedDictionaries>
11-
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
12-
<!-- Other merged dictionaries here -->
13+
<!--
14+
Styles that define common aspects of the platform look and feel
15+
Required by Visual Studio project and item templates
16+
-->
17+
<ResourceDictionary Source="ms-appx:///Styles.xaml"/>
1318
</ResourceDictionary.MergedDictionaries>
14-
<!-- Other app resources here -->
1519
</ResourceDictionary>
1620
</Application.Resources>
1721
</Application>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT License.
3+
4+
using Microsoft.UI.Xaml;
5+
6+
namespace Windowing
7+
{
8+
public partial class App : Application
9+
{
10+
private Window mainWindow;
11+
12+
public App()
13+
{
14+
this.InitializeComponent();
15+
}
16+
17+
protected override void OnLaunched(LaunchActivatedEventArgs args)
18+
{
19+
mainWindow = new MainWindow();
20+
mainWindow.Activate();
21+
}
22+
}
23+
}
76.3 KB
Loading
10.6 KB
Loading
2.73 KB
Loading
10.9 KB
Loading
3.06 KB
Loading
2.1 KB
Binary file not shown.
Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
<!-- Copyright (c) Microsoft Corporation.
22
Licensed under the MIT License. -->
3-
<Window
4-
x:Class="SampleApp.MainWindow"
3+
<Page
4+
x:Class="Windowing.MainPage"
55
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
66
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
7-
xmlns:local="using:SampleApp"
7+
xmlns:local="using:Windowing"
88
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
99
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
10-
mc:Ignorable="d"
11-
>
12-
<Grid>
10+
mc:Ignorable="d">
11+
12+
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
1313
<Grid.RowDefinitions>
1414
<RowDefinition Height="Auto"/>
1515
<RowDefinition />
1616
</Grid.RowDefinitions>
17-
1817
<Grid Grid.Row="0" x:Name="MyTitleBar" Background="Blue" x:FieldModifier="public" Visibility="Collapsed">
1918
<Grid.ColumnDefinitions>
2019
<ColumnDefinition Width="*"/>
@@ -33,18 +32,19 @@
3332
Style="{StaticResource CaptionTextBlockStyle}"
3433
Margin="44,8,0,0"/>
3534
</Grid>
36-
37-
<NavigationView Grid.Row="1" Loaded="NavigationView_Loaded" ItemInvoked="NavigationView_ItemInvoked" BackRequested="NavigationView_BackRequested" IsBackEnabled="{Binding ElementName=ContentFrame, Path=CanGoBack}">
35+
<NavigationView Grid.Row="1" x:Name="NavView"
36+
Loaded="NavView_Loaded"
37+
ItemInvoked="NavView_ItemInvoked"
38+
BackRequested="NavView_BackRequested">
3839
<NavigationView.MenuItems>
39-
<NavigationViewItem Tag="basics" Content="Window Basics"></NavigationViewItem>
40-
<NavigationViewItem Tag="presenters" Content="Presenters"></NavigationViewItem>
41-
<NavigationViewItem Tag="configs" Content="Window Configurations"></NavigationViewItem>
42-
<NavigationViewItem Tag="titlebar" Content="Titlebar"></NavigationViewItem>
40+
<NavigationViewItemHeader x:Name="MainPagesHeader" Content="Scenarios"/>
4341
</NavigationView.MenuItems>
44-
<ScrollViewer>
45-
<Frame x:Name="ContentFrame"></Frame>
46-
</ScrollViewer>
42+
43+
<Grid RowDefinitions="*,Auto">
44+
<ScrollViewer>
45+
<Frame Padding="50" x:Name="ContentFrame" Navigated="ContentFrame_Navigated" />
46+
</ScrollViewer>
47+
</Grid>
4748
</NavigationView>
4849
</Grid>
49-
50-
</Window>
50+
</Page>

0 commit comments

Comments
 (0)