Skip to content

Commit 9488b8c

Browse files
dotnet 8 xaml intro
1 parent 51a3e35 commit 9488b8c

File tree

9 files changed

+30
-38
lines changed

9 files changed

+30
-38
lines changed

4_Apps/Windows/XAMLIntro/AttachedProperty/AttachedProperty/AttachedProperty.csproj

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>WinExe</OutputType>
4-
<TargetFramework>net7.0-windows10.0.19041.0</TargetFramework>
4+
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
55
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
66
<RootNamespace>AttachedProperty</RootNamespace>
77
<ApplicationManifest>app.manifest</ApplicationManifest>
88
<Platforms>x86;x64;arm64</Platforms>
9-
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
10-
<PublishProfile>win10-$(Platform).pubxml</PublishProfile>
9+
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
10+
<PublishProfile>win-$(Platform).pubxml</PublishProfile>
1111
<UseWinUI>true</UseWinUI>
12-
<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
12+
<EnableMsixTooling>true</EnableMsixTooling>
1313
<Nullable>enable</Nullable>
1414
<ImplicitUsings>enable</ImplicitUsings>
1515
</PropertyGroup>

4_Apps/Windows/XAMLIntro/CustomMarkupExtensions/CustomMarkupExtensions/CustomMarkupExtensions.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>WinExe</OutputType>
4-
<TargetFramework>net7.0-windows10.0.19041.0</TargetFramework>
4+
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
55
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
66
<RootNamespace>CustomMarkupExtensions</RootNamespace>
77
<ApplicationManifest>app.manifest</ApplicationManifest>
88
<Platforms>x86;x64;arm64</Platforms>
9-
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
10-
<PublishProfile>win10-$(Platform).pubxml</PublishProfile>
9+
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
10+
<PublishProfile>win-$(Platform).pubxml</PublishProfile>
1111
<UseWinUI>true</UseWinUI>
1212
<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
1313
<Nullable>enable</Nullable>

4_Apps/Windows/XAMLIntro/DependencyObjectSample/DependencyObjectSample/DependencyObjectSample.csproj

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>WinExe</OutputType>
4-
<TargetFramework>net7.0-windows10.0.19041.0</TargetFramework>
4+
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
55
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
66
<RootNamespace>DependencyObjectSample</RootNamespace>
77
<ApplicationManifest>app.manifest</ApplicationManifest>
88
<Platforms>x86;x64;arm64</Platforms>
9-
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
10-
<PublishProfile>win10-$(Platform).pubxml</PublishProfile>
9+
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
10+
<PublishProfile>win-$(Platform).pubxml</PublishProfile>
1111
<UseWinUI>true</UseWinUI>
12-
<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
12+
<EnableMsixTooling>true</EnableMsixTooling>
1313
<Nullable>enable</Nullable>
1414
<ImplicitUsings>enable</ImplicitUsings>
1515
</PropertyGroup>

4_Apps/Windows/XAMLIntro/HelloWindows/HelloWindows/HelloWindows.csproj

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>WinExe</OutputType>
4-
<TargetFramework>net7.0-windows10.0.19041.0</TargetFramework>
4+
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
55
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
66
<RootNamespace>HelloWindows</RootNamespace>
77
<ApplicationManifest>app.manifest</ApplicationManifest>
88
<Platforms>x86;x64;arm64</Platforms>
9-
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
10-
<PublishProfile>win10-$(Platform).pubxml</PublishProfile>
9+
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
10+
<PublishProfile>win-$(Platform).pubxml</PublishProfile>
1111
<UseWinUI>true</UseWinUI>
12-
<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
12+
<EnableMsixTooling>true</EnableMsixTooling>
1313
<Nullable>enable</Nullable>
1414
<ImplicitUsings>enable</ImplicitUsings>
1515
</PropertyGroup>

4_Apps/Windows/XAMLIntro/Intro/DataLib/DataLib.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
77
</PropertyGroup>
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>WinExe</OutputType>
4-
<TargetFramework>net7.0-windows10.0.19041.0</TargetFramework>
4+
<TargetFramework>net8.0-windows10.0.22000.0</TargetFramework>
55
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
66
<RootNamespace>IntroXAML</RootNamespace>
77
<ApplicationManifest>app.manifest</ApplicationManifest>
88
<Platforms>x86;x64;arm64</Platforms>
9-
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
10-
<PublishProfile>win10-$(Platform).pubxml</PublishProfile>
9+
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
10+
<PublishProfile>win-$(Platform).pubxml</PublishProfile>
1111
<UseWinUI>true</UseWinUI>
12-
<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
12+
<EnableMsixTooling>true</EnableMsixTooling>
1313
<Nullable>enable</Nullable>
1414
<ImplicitUsings>enable</ImplicitUsings>
1515
</PropertyGroup>
@@ -21,7 +21,6 @@
2121
<SubType>Designer</SubType>
2222
</AppxManifest>
2323
</ItemGroup>
24-
2524
<ItemGroup>
2625
<Content Include="Assets\SplashScreen.scale-200.png" />
2726
<Content Include="Assets\LockScreenLogo.scale-200.png" />
@@ -31,13 +30,11 @@
3130
<Content Include="Assets\StoreLogo.png" />
3231
<Content Include="Assets\Wide310x150Logo.scale-200.png" />
3332
</ItemGroup>
34-
3533
<ItemGroup>
3634
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.1.5" />
3735
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.1" />
3836
<Manifest Include="$(ApplicationManifest)" />
3937
</ItemGroup>
40-
4138
<!-- Defining the "Msix" ProjectCapability here allows the Single-project MSIX Packaging
4239
Tools extension to be activated for this project even if the Windows App SDK Nuget
4340
package has not yet been restored -->
@@ -47,5 +44,4 @@
4744
<ItemGroup>
4845
<ProjectReference Include="..\..\DataLib\DataLib.csproj" />
4946
</ItemGroup>
50-
51-
</Project>
47+
</Project>

4_Apps/Windows/XAMLIntro/Intro/Intro/Intro/MainWindow.xaml.cs

+2-6
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33
using Microsoft.UI.Xaml;
44
using Microsoft.UI.Xaml.Controls;
55

6-
using Windows.UI.Popups;
7-
8-
using WinRT.Interop;
9-
106
namespace IntroXAML;
117

128
/// <summary>
@@ -29,7 +25,7 @@ public MainWindow()
2925
Title = "Message",
3026
Content = "button 2 clicked",
3127
PrimaryButtonText = "OK",
32-
XamlRoot = this.Content.XamlRoot
28+
XamlRoot = Content.XamlRoot
3329
};
3430

3531
await dlg.ShowAsync();
@@ -47,7 +43,7 @@ private async void OnButtonClick(object sender, RoutedEventArgs e)
4743
Title = "Message",
4844
Content = "button 1 clicked",
4945
PrimaryButtonText = "OK",
50-
XamlRoot = this.Content.XamlRoot
46+
XamlRoot = Content.XamlRoot
5147
};
5248
await dlg.ShowAsync();
5349
}

4_Apps/Windows/XAMLIntro/MarkupExtensions/MarkupExtensions/MarkupExtensions.csproj

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>WinExe</OutputType>
4-
<TargetFramework>net7.0-windows10.0.19041.0</TargetFramework>
4+
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
55
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
66
<RootNamespace>MarkupExtensions</RootNamespace>
77
<ApplicationManifest>app.manifest</ApplicationManifest>
88
<Platforms>x86;x64;arm64</Platforms>
9-
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
10-
<PublishProfile>win10-$(Platform).pubxml</PublishProfile>
9+
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
10+
<PublishProfile>win-$(Platform).pubxml</PublishProfile>
1111
<UseWinUI>true</UseWinUI>
12-
<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
12+
<EnableMsixTooling>true</EnableMsixTooling>
1313
<Nullable>enable</Nullable>
1414
<ImplicitUsings>enable</ImplicitUsings>
1515
</PropertyGroup>

4_Apps/Windows/XAMLIntro/RoutedEvents/RoutedEvents/RoutedEvents.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>WinExe</OutputType>
4-
<TargetFramework>net7.0-windows10.0.19041.0</TargetFramework>
4+
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
55
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
66
<RootNamespace>RoutedEvents</RootNamespace>
77
<ApplicationManifest>app.manifest</ApplicationManifest>
88
<Platforms>x86;x64;arm64</Platforms>
9-
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
9+
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
1010
<PublishProfile>win10-$(Platform).pubxml</PublishProfile>
1111
<UseWinUI>true</UseWinUI>
12-
<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
12+
<EnableMsixTooling>true</EnableMsixTooling>
1313
<Nullable>enable</Nullable>
1414
<ImplicitUsings>enable</ImplicitUsings>
1515
</PropertyGroup>

0 commit comments

Comments
 (0)