-
Notifications
You must be signed in to change notification settings - Fork 742
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8850 from unoplatform/mergify/bp/release/stable/4…
….3/pr-8848 feat: Add WinUI 3 item templates (backport #8848)
- Loading branch information
Showing
37 changed files
with
369 additions
and
28 deletions.
There are no files selected for viewing
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
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
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
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
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
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
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions
19
src/UnoItemTemplate/BlankPage.WinUI/BlankPage.winui.vstemplate
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,19 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<VSTemplate Version="3.0.0" Type="Item" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.microsoft.com/developer/vstemplate/2005"> | ||
<TemplateData> | ||
<Name>Page (Uno Platform WinUI 3)</Name> | ||
<Description>A Page control</Description> | ||
<Icon Package="{2581426E-BF4F-4A49-A42A-20EF9D51EF49}" ID="4007" /> | ||
<TemplateID>Uno.WinUI.CS.BlankPage</TemplateID> | ||
<AppliesTo>CSharp + SharedAssetsProject</AppliesTo> | ||
<ProjectType>CSharp</ProjectType> | ||
<NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp> | ||
<DefaultName>BlankPage.xaml</DefaultName> | ||
<SortOrder>40</SortOrder> | ||
<PreviewImage>BlankPage.png</PreviewImage> | ||
</TemplateData> | ||
<TemplateContent> | ||
<ProjectItem OpenInEditor="true" ReplaceParameters="true" ItemType="Page" SubType="Designer" CustomTool="MSBuild:Compile" TargetFileName="$fileinputname$.xaml">BlankPage.xaml</ProjectItem> | ||
<ProjectItem ReplaceParameters="true" TargetFileName="$fileinputname$.xaml.cs">BlankPage.xaml.cs</ProjectItem> | ||
</TemplateContent> | ||
</VSTemplate> |
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,14 @@ | ||
<Page | ||
x:Class="$rootnamespace$.$safeitemname$" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="using:$rootnamespace$" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
mc:Ignorable="d" | ||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> | ||
|
||
<Grid> | ||
|
||
</Grid> | ||
</Page> |
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,30 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Runtime.InteropServices.WindowsRuntime; | ||
using Windows.Foundation; | ||
using Windows.Foundation.Collections; | ||
using Microsoft.UI.Xaml; | ||
using Microsoft.UI.Xaml.Controls; | ||
using Microsoft.UI.Xaml.Controls.Primitives; | ||
using Microsoft.UI.Xaml.Data; | ||
using Microsoft.UI.Xaml.Input; | ||
using Microsoft.UI.Xaml.Media; | ||
using Microsoft.UI.Xaml.Navigation; | ||
|
||
// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238 | ||
|
||
namespace $rootnamespace$ | ||
{ | ||
/// <summary> | ||
/// An empty page that can be used on its own or navigated to within a Frame. | ||
/// </summary> | ||
public sealed partial class $safeitemname$ : Page | ||
{ | ||
public $safeitemname$() | ||
{ | ||
this.InitializeComponent(); | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 18 additions & 0 deletions
18
src/UnoItemTemplate/ContentDialog.WinUI/ContentDialog.winui.vstemplate
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,18 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<VSTemplate Version="3.0.0" Type="Item" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.microsoft.com/developer/vstemplate/2005"> | ||
<TemplateData> | ||
<Name>ContentDialog (Uno Platform WinUI 3)</Name> | ||
<Description>A ContentDialog control</Description> | ||
<Icon Package="{2581426E-BF4F-4A49-A42A-20EF9D51EF49}" ID="4007" /> | ||
<TemplateID>Uno.WinUI.CS.ContentDialog</TemplateID> | ||
<AppliesTo>CSharp + SharedAssetsProject</AppliesTo> | ||
<ProjectType>CSharp</ProjectType> | ||
<NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp> | ||
<DefaultName>ContentDialog.xaml</DefaultName> | ||
<SortOrder>40</SortOrder> | ||
</TemplateData> | ||
<TemplateContent> | ||
<ProjectItem OpenInEditor="true" ReplaceParameters="true" ItemType="Page" SubType="Designer" CustomTool="MSBuild:Compile" TargetFileName="$fileinputname$.xaml">ContentDialog.xaml</ProjectItem> | ||
<ProjectItem ReplaceParameters="true" TargetFileName="$fileinputname$.xaml.cs">ContentDialog.xaml.cs</ProjectItem> | ||
</TemplateContent> | ||
</VSTemplate> |
15 changes: 15 additions & 0 deletions
15
src/UnoItemTemplate/ContentDialog.WinUI/ContentDialog.xaml
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,15 @@ | ||
<ContentDialog | ||
x:Class="$rootnamespace$.$safeitemname$" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="using:$rootnamespace$" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
Title="TITLE" | ||
PrimaryButtonText="Button1" | ||
SecondaryButtonText="Button2" | ||
PrimaryButtonClick="ContentDialog_PrimaryButtonClick" | ||
SecondaryButtonClick="ContentDialog_SecondaryButtonClick"> | ||
|
||
<Grid> | ||
</Grid> | ||
</ContentDialog> |
33 changes: 33 additions & 0 deletions
33
src/UnoItemTemplate/ContentDialog.WinUI/ContentDialog.xaml.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,33 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Runtime.InteropServices.WindowsRuntime; | ||
using Windows.Foundation; | ||
using Windows.Foundation.Collections; | ||
using Microsoft.UI.Xaml; | ||
using Microsoft.UI.Xaml.Controls; | ||
using Microsoft.UI.Xaml.Controls.Primitives; | ||
using Microsoft.UI.Xaml.Data; | ||
using Microsoft.UI.Xaml.Input; | ||
using Microsoft.UI.Xaml.Media; | ||
using Microsoft.UI.Xaml.Navigation; | ||
|
||
namespace $rootnamespace$ | ||
{ | ||
public sealed partial class $safeitemname$ : ContentDialog | ||
{ | ||
public $safeitemname$() | ||
{ | ||
this.InitializeComponent(); | ||
} | ||
|
||
private void ContentDialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args) | ||
{ | ||
} | ||
|
||
private void ContentDialog_SecondaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args) | ||
{ | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 18 additions & 0 deletions
18
.../ResourceDictionaryWithCodeBehind.WinUI/ResourceDictionaryWithCodeBehind.winui.vstemplate
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,18 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<VSTemplate Version="3.0.0" Type="Item" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.microsoft.com/developer/vstemplate/2005"> | ||
<TemplateData> | ||
<Name>ResourceDictionary with code behind (Uno Platform WinUI 3)</Name> | ||
<Description>A ResourceDictionary with code behind.</Description> | ||
<Icon Package="{2581426E-BF4F-4A49-A42A-20EF9D51EF49}" ID="4007" /> | ||
<TemplateID>Uno.WinUI.CS.ResourceDictionaryWithCodeBehind</TemplateID> | ||
<AppliesTo>CSharp + SharedAssetsProject</AppliesTo> | ||
<ProjectType>CSharp</ProjectType> | ||
<NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp> | ||
<DefaultName>ResourceDictionaryWithCodeBehind.xaml</DefaultName> | ||
<SortOrder>40</SortOrder> | ||
</TemplateData> | ||
<TemplateContent> | ||
<ProjectItem OpenInEditor="true" ReplaceParameters="true" ItemType="Page" SubType="Designer" CustomTool="MSBuild:Compile" TargetFileName="$fileinputname$.xaml">ResourceDictionaryWithCodeBehind.xaml</ProjectItem> | ||
<ProjectItem ReplaceParameters="true" TargetFileName="$fileinputname$.xaml.cs">ResourceDictionaryWithCodeBehind.xaml.cs</ProjectItem> | ||
</TemplateContent> | ||
</VSTemplate> |
6 changes: 6 additions & 0 deletions
6
...ItemTemplate/ResourceDictionaryWithCodeBehind.WinUI/ResourceDictionaryWithCodeBehind.xaml
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,6 @@ | ||
<ResourceDictionary | ||
x:Class="$rootnamespace$.$safeitemname$" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> | ||
|
||
</ResourceDictionary> |
25 changes: 25 additions & 0 deletions
25
...mTemplate/ResourceDictionaryWithCodeBehind.WinUI/ResourceDictionaryWithCodeBehind.xaml.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,25 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Runtime.InteropServices.WindowsRuntime; | ||
using Windows.Foundation; | ||
using Windows.Foundation.Collections; | ||
using Microsoft.UI.Xaml; | ||
using Microsoft.UI.Xaml.Controls; | ||
using Microsoft.UI.Xaml.Controls.Primitives; | ||
using Microsoft.UI.Xaml.Data; | ||
using Microsoft.UI.Xaml.Input; | ||
using Microsoft.UI.Xaml.Media; | ||
using Microsoft.UI.Xaml.Navigation; | ||
|
||
namespace $rootnamespace$ | ||
{ | ||
public sealed partial class $safeitemname$ : ResourceDictionary | ||
{ | ||
public $safeitemname$() | ||
{ | ||
this.InitializeComponent(); | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
24 changes: 24 additions & 0 deletions
24
src/UnoItemTemplate/Uno.Neutral.Cs.TemplatedControl.WinUI/CustomControl.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,24 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Runtime.InteropServices.WindowsRuntime; | ||
using Microsoft.UI.Xaml; | ||
using Microsoft.UI.Xaml.Controls; | ||
using Microsoft.UI.Xaml.Data; | ||
using Microsoft.UI.Xaml.Documents; | ||
using Microsoft.UI.Xaml.Input; | ||
using Microsoft.UI.Xaml.Media; | ||
|
||
// To learn more about WinUI, the WinUI project structure, | ||
// and more about our project templates, see: http://aka.ms/winui-project-info. | ||
|
||
namespace $rootnamespace$ | ||
{ | ||
public sealed class $safeitemname$ : Control | ||
{ | ||
public $safeitemname$() | ||
{ | ||
this.DefaultStyleKey = typeof($safeitemname$); | ||
} | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
...te/Uno.Neutral.Cs.TemplatedControl.WinUI/Uno.Neutral.Cs.TemplatedControl.winui.vstemplate
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,24 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<VSTemplate Version="3.0.0" Type="Item" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" xmlns:sdk="http://schemas.microsoft.com/developer/vstemplate-sdkextension/2010"> | ||
<TemplateData> | ||
<DefaultName>CustomControl.cs</DefaultName> | ||
<Name>Custom Control (Uno Platform WinUI 3)</Name> | ||
<Description>A custom control for apps based on the UWP Library.</Description> | ||
<Icon Package="{2581426E-BF4F-4A49-A42A-20EF9D51EF49}" ID="4007" /> | ||
<ProjectType>CSharp</ProjectType> | ||
<TemplateID>Uno.WinUI.Neutral.UWP.TemplatedControl</TemplateID> | ||
<AppliesTo>CSharp + SharedAssetsProject</AppliesTo> | ||
<NumberOfParentCategoriesToRollUp>2</NumberOfParentCategoriesToRollUp> | ||
<ShowByDefault>true</ShowByDefault> | ||
<TargetPlatformName>Windows</TargetPlatformName> | ||
<AppIdFilter>blend</AppIdFilter> | ||
<LanguageTag>csharp</LanguageTag> | ||
<PlatformTag>windows</PlatformTag> | ||
<ProjectTypeTag>uwp</ProjectTypeTag> | ||
<ProjectTypeTag>desktop</ProjectTypeTag> | ||
</TemplateData> | ||
<TemplateContent> | ||
<ProjectItem ReplaceParameters="true" TargetFileName="$fileinputname$.cs">CustomControl.cs</ProjectItem> | ||
</TemplateContent> | ||
</VSTemplate> | ||
|
Oops, something went wrong.