Skip to content

Commit

Permalink
Add sample for .NET 8 Mile.Xaml App (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
driver1998 authored Aug 11, 2024
1 parent 9a4a0c8 commit 0ff761f
Show file tree
Hide file tree
Showing 17 changed files with 483 additions and 3 deletions.
38 changes: 38 additions & 0 deletions Mile.Xaml.Samples.sln
Original file line number Diff line number Diff line change
Expand Up @@ -11,60 +11,98 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MileXamlBlankAppNetFramewor
EndProject
Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "MileXamlBlankAppNetFrameworkPackage", "MileXamlBlankAppNetFrameworkPackage\MileXamlBlankAppNetFrameworkPackage.wapproj", "{73F2781A-8EC6-40FB-AD81-7DFE9CC94F3C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MileXamlBlankAppNetCore", "MileXamlBlankAppNetCore\MileXamlBlankAppNetCore.csproj", "{94C8CE45-8213-4C8B-AF1B-5A835887F19B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|ARM64 = Debug|ARM64
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|ARM64 = Release|ARM64
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B30D3882-3C80-4C8C-B64C-52FB9083F5D7}.Debug|Any CPU.ActiveCfg = Debug|x64
{B30D3882-3C80-4C8C-B64C-52FB9083F5D7}.Debug|Any CPU.Build.0 = Debug|x64
{B30D3882-3C80-4C8C-B64C-52FB9083F5D7}.Debug|ARM64.ActiveCfg = Debug|ARM64
{B30D3882-3C80-4C8C-B64C-52FB9083F5D7}.Debug|ARM64.Build.0 = Debug|ARM64
{B30D3882-3C80-4C8C-B64C-52FB9083F5D7}.Debug|x64.ActiveCfg = Debug|x64
{B30D3882-3C80-4C8C-B64C-52FB9083F5D7}.Debug|x64.Build.0 = Debug|x64
{B30D3882-3C80-4C8C-B64C-52FB9083F5D7}.Debug|x86.ActiveCfg = Debug|Win32
{B30D3882-3C80-4C8C-B64C-52FB9083F5D7}.Debug|x86.Build.0 = Debug|Win32
{B30D3882-3C80-4C8C-B64C-52FB9083F5D7}.Release|Any CPU.ActiveCfg = Release|x64
{B30D3882-3C80-4C8C-B64C-52FB9083F5D7}.Release|Any CPU.Build.0 = Release|x64
{B30D3882-3C80-4C8C-B64C-52FB9083F5D7}.Release|ARM64.ActiveCfg = Release|ARM64
{B30D3882-3C80-4C8C-B64C-52FB9083F5D7}.Release|ARM64.Build.0 = Release|ARM64
{B30D3882-3C80-4C8C-B64C-52FB9083F5D7}.Release|x64.ActiveCfg = Release|x64
{B30D3882-3C80-4C8C-B64C-52FB9083F5D7}.Release|x64.Build.0 = Release|x64
{B30D3882-3C80-4C8C-B64C-52FB9083F5D7}.Release|x86.ActiveCfg = Release|Win32
{B30D3882-3C80-4C8C-B64C-52FB9083F5D7}.Release|x86.Build.0 = Release|Win32
{5674D8DF-3C1E-4D7B-8382-E4FBAE12AAA5}.Debug|Any CPU.ActiveCfg = Debug|x64
{5674D8DF-3C1E-4D7B-8382-E4FBAE12AAA5}.Debug|Any CPU.Build.0 = Debug|x64
{5674D8DF-3C1E-4D7B-8382-E4FBAE12AAA5}.Debug|ARM64.ActiveCfg = Debug|ARM64
{5674D8DF-3C1E-4D7B-8382-E4FBAE12AAA5}.Debug|ARM64.Build.0 = Debug|ARM64
{5674D8DF-3C1E-4D7B-8382-E4FBAE12AAA5}.Debug|x64.ActiveCfg = Debug|x64
{5674D8DF-3C1E-4D7B-8382-E4FBAE12AAA5}.Debug|x64.Build.0 = Debug|x64
{5674D8DF-3C1E-4D7B-8382-E4FBAE12AAA5}.Debug|x86.ActiveCfg = Debug|Win32
{5674D8DF-3C1E-4D7B-8382-E4FBAE12AAA5}.Debug|x86.Build.0 = Debug|Win32
{5674D8DF-3C1E-4D7B-8382-E4FBAE12AAA5}.Release|Any CPU.ActiveCfg = Release|x64
{5674D8DF-3C1E-4D7B-8382-E4FBAE12AAA5}.Release|Any CPU.Build.0 = Release|x64
{5674D8DF-3C1E-4D7B-8382-E4FBAE12AAA5}.Release|ARM64.ActiveCfg = Release|ARM64
{5674D8DF-3C1E-4D7B-8382-E4FBAE12AAA5}.Release|ARM64.Build.0 = Release|ARM64
{5674D8DF-3C1E-4D7B-8382-E4FBAE12AAA5}.Release|x64.ActiveCfg = Release|x64
{5674D8DF-3C1E-4D7B-8382-E4FBAE12AAA5}.Release|x64.Build.0 = Release|x64
{5674D8DF-3C1E-4D7B-8382-E4FBAE12AAA5}.Release|x86.ActiveCfg = Release|Win32
{5674D8DF-3C1E-4D7B-8382-E4FBAE12AAA5}.Release|x86.Build.0 = Release|Win32
{58DCE199-78EF-4D81-A632-10B4C93E02FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{58DCE199-78EF-4D81-A632-10B4C93E02FB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{58DCE199-78EF-4D81-A632-10B4C93E02FB}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{58DCE199-78EF-4D81-A632-10B4C93E02FB}.Debug|x64.ActiveCfg = Debug|Any CPU
{58DCE199-78EF-4D81-A632-10B4C93E02FB}.Debug|x64.Build.0 = Debug|Any CPU
{58DCE199-78EF-4D81-A632-10B4C93E02FB}.Debug|x64.Deploy.0 = Debug|Any CPU
{58DCE199-78EF-4D81-A632-10B4C93E02FB}.Debug|x86.ActiveCfg = Debug|Any CPU
{58DCE199-78EF-4D81-A632-10B4C93E02FB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{58DCE199-78EF-4D81-A632-10B4C93E02FB}.Release|Any CPU.Build.0 = Release|Any CPU
{58DCE199-78EF-4D81-A632-10B4C93E02FB}.Release|ARM64.ActiveCfg = Release|Any CPU
{58DCE199-78EF-4D81-A632-10B4C93E02FB}.Release|x64.ActiveCfg = Release|Any CPU
{58DCE199-78EF-4D81-A632-10B4C93E02FB}.Release|x64.Build.0 = Release|Any CPU
{58DCE199-78EF-4D81-A632-10B4C93E02FB}.Release|x64.Deploy.0 = Release|Any CPU
{58DCE199-78EF-4D81-A632-10B4C93E02FB}.Release|x86.ActiveCfg = Release|Any CPU
{73F2781A-8EC6-40FB-AD81-7DFE9CC94F3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{73F2781A-8EC6-40FB-AD81-7DFE9CC94F3C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{73F2781A-8EC6-40FB-AD81-7DFE9CC94F3C}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{73F2781A-8EC6-40FB-AD81-7DFE9CC94F3C}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{73F2781A-8EC6-40FB-AD81-7DFE9CC94F3C}.Debug|x64.ActiveCfg = Debug|Any CPU
{73F2781A-8EC6-40FB-AD81-7DFE9CC94F3C}.Debug|x64.Build.0 = Debug|Any CPU
{73F2781A-8EC6-40FB-AD81-7DFE9CC94F3C}.Debug|x64.Deploy.0 = Debug|Any CPU
{73F2781A-8EC6-40FB-AD81-7DFE9CC94F3C}.Debug|x86.ActiveCfg = Debug|Any CPU
{73F2781A-8EC6-40FB-AD81-7DFE9CC94F3C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{73F2781A-8EC6-40FB-AD81-7DFE9CC94F3C}.Release|Any CPU.Build.0 = Release|Any CPU
{73F2781A-8EC6-40FB-AD81-7DFE9CC94F3C}.Release|Any CPU.Deploy.0 = Release|Any CPU
{73F2781A-8EC6-40FB-AD81-7DFE9CC94F3C}.Release|ARM64.ActiveCfg = Release|Any CPU
{73F2781A-8EC6-40FB-AD81-7DFE9CC94F3C}.Release|x64.ActiveCfg = Release|Any CPU
{73F2781A-8EC6-40FB-AD81-7DFE9CC94F3C}.Release|x64.Build.0 = Release|Any CPU
{73F2781A-8EC6-40FB-AD81-7DFE9CC94F3C}.Release|x64.Deploy.0 = Release|Any CPU
{73F2781A-8EC6-40FB-AD81-7DFE9CC94F3C}.Release|x86.ActiveCfg = Release|Any CPU
{94C8CE45-8213-4C8B-AF1B-5A835887F19B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{94C8CE45-8213-4C8B-AF1B-5A835887F19B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{94C8CE45-8213-4C8B-AF1B-5A835887F19B}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{94C8CE45-8213-4C8B-AF1B-5A835887F19B}.Debug|ARM64.Build.0 = Debug|Any CPU
{94C8CE45-8213-4C8B-AF1B-5A835887F19B}.Debug|x64.ActiveCfg = Debug|Any CPU
{94C8CE45-8213-4C8B-AF1B-5A835887F19B}.Debug|x64.Build.0 = Debug|Any CPU
{94C8CE45-8213-4C8B-AF1B-5A835887F19B}.Debug|x86.ActiveCfg = Debug|Any CPU
{94C8CE45-8213-4C8B-AF1B-5A835887F19B}.Debug|x86.Build.0 = Debug|Any CPU
{94C8CE45-8213-4C8B-AF1B-5A835887F19B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{94C8CE45-8213-4C8B-AF1B-5A835887F19B}.Release|Any CPU.Build.0 = Release|Any CPU
{94C8CE45-8213-4C8B-AF1B-5A835887F19B}.Release|ARM64.ActiveCfg = Release|Any CPU
{94C8CE45-8213-4C8B-AF1B-5A835887F19B}.Release|ARM64.Build.0 = Release|Any CPU
{94C8CE45-8213-4C8B-AF1B-5A835887F19B}.Release|x64.ActiveCfg = Release|Any CPU
{94C8CE45-8213-4C8B-AF1B-5A835887F19B}.Release|x64.Build.0 = Release|Any CPU
{94C8CE45-8213-4C8B-AF1B-5A835887F19B}.Release|x86.ActiveCfg = Release|Any CPU
{94C8CE45-8213-4C8B-AF1B-5A835887F19B}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
2 changes: 1 addition & 1 deletion MileXamlBlankApp/MileXamlBlankApp.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Mile.Xaml">
<Version>2.2.1017</Version>
<Version>2.3.1064</Version>
</PackageReference>
</ItemGroup>
<Import Project="..\Mile.Project.Windows\Mile.Project.Cpp.targets" />
Expand Down
47 changes: 47 additions & 0 deletions MileXamlBlankAppNetCore/App.manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">

<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>

<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<maxversiontested Id="10.0.18362.0"/>
<maxversiontested Id="10.0.19041.0"/>
<maxversiontested Id="10.0.20348.0"/>
<maxversiontested Id="10.0.22000.0"/>
<maxversiontested Id="10.0.22621.0"/>
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
</application>
</compatibility>

<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<autoElevate xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">False</autoElevate>
<disableTheming xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">False</disableTheming>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">True/PM</dpiAware>
<disableWindowFiltering xmlns="http://schemas.microsoft.com/SMI/2011/WindowsSettings">True</disableWindowFiltering>
<printerDriverIsolation xmlns="http://schemas.microsoft.com/SMI/2011/WindowsSettings">True</printerDriverIsolation>
<highResolutionScrollingAware xmlns="http://schemas.microsoft.com/SMI/2013/WindowsSettings">True</highResolutionScrollingAware>
<ultraHighResolutionScrollingAware xmlns="http://schemas.microsoft.com/SMI/2013/WindowsSettings">True</ultraHighResolutionScrollingAware>
<forceFocusBasedMouseWheel xmlns="http://schemas.microsoft.com/SMI/2014/WindowsSettings">False</forceFocusBasedMouseWheel>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2, PerMonitor, System, Unaware</dpiAwareness>
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">True</longPathAware>
<gdiScaling xmlns="http://schemas.microsoft.com/SMI/2017/WindowsSettings">False</gdiScaling>
<activeCodePage xmlns="http://schemas.microsoft.com/SMI/2019/WindowsSettings">UTF-8</activeCodePage>
<heapType xmlns="http://schemas.microsoft.com/SMI/2020/WindowsSettings">SegmentHeap</heapType>
</windowsSettings>
</application>

<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*" />
</dependentAssembly>
</dependency>

</assembly>
13 changes: 13 additions & 0 deletions MileXamlBlankAppNetCore/App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<wux:Application
x:Class="MileXamlBlankAppNetCore.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:wux="using:Windows.UI.Xaml">
<wux:Application.Resources>
<wux:ResourceDictionary>
<wux:ResourceDictionary.MergedDictionaries>
<wux:ResourceDictionary Source="ms-appx:///Mile.Xaml.Styles.SunValley.xbf" />
</wux:ResourceDictionary.MergedDictionaries>
</wux:ResourceDictionary>
</wux:Application.Resources>
</wux:Application>
20 changes: 20 additions & 0 deletions MileXamlBlankAppNetCore/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using Mile.Xaml;
using Windows.UI.Xaml;

namespace MileXamlBlankAppNetCore
{
sealed partial class App : Application
{
public App()
{
this.ThreadInitialize();
this.InitializeComponent();
}

public void Close()
{
this.Exit();
this.ThreadUninitialize();
}
}
}
45 changes: 45 additions & 0 deletions MileXamlBlankAppNetCore/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions MileXamlBlankAppNetCore/Form1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using Mile.Xaml;
using System;
using System.Windows.Forms;

namespace MileXamlBlankAppNetCore
{
public partial class Form1 : Form
{
WindowsXamlHost xamlHost = new WindowsXamlHost();

public Form1()
{
InitializeComponent();


this.Controls.Add(xamlHost);
xamlHost.AutoSize = true;
xamlHost.Dock = DockStyle.Fill;
xamlHost.Child = new MainPage();

this.Load += Form1_Load;
}

private void Form1_Load(object sender, EventArgs e)
{

}
}
}
120 changes: 120 additions & 0 deletions MileXamlBlankAppNetCore/Form1.resx
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
Loading

0 comments on commit 0ff761f

Please sign in to comment.