Guest User

AppxPackage.cs for Taskbar

a guest
Nov 10th, 2024
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 22.35 KB | Source Code | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Diagnostics;
  4. using System.IO;
  5. using System.Linq;
  6. using System.Runtime.InteropServices;
  7. using System.Text;
  8. using Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.Interfaces;
  9.  
  10. namespace TestTaskbar2;
  11.  
  12. public sealed class AppxPackage {
  13.     private readonly List<AppxApp> _apps = [];
  14.     private IAppxManifestProperties _properties;
  15.  
  16.     private AppxPackage() {
  17.     }
  18.  
  19.     public string FullName { get; private set; }
  20.     public string Path { get; private set; }
  21.     public string Publisher { get; private set; }
  22.     public string PublisherId { get; private set; }
  23.     public string ResourceId { get; private set; }
  24.     public string FamilyName { get; private set; }
  25.     public string ApplicationUserModelId { get; private set; }
  26.     public string Logo { get; private set; }
  27.     public string PublisherDisplayName { get; private set; }
  28.     public string Description { get; private set; }
  29.     public string DisplayName { get; private set; }
  30.     public bool IsFramework { get; private set; }
  31.     public Version Version { get; private set; }
  32.     public AppxPackageArchitecture ProcessorArchitecture { get; private set; }
  33.  
  34.     public IReadOnlyList<AppxApp> Apps => this._apps;
  35.  
  36.     public IEnumerable<AppxPackage> DependencyGraph => QueryPackageInfo(this.FullName, PackageConstants.PACKAGE_FILTER_ALL_LOADED).Where(p => p.FullName != this.FullName);
  37.  
  38.     public void Show() {
  39.         this.Show(0);
  40.     }
  41.  
  42.     private void Show(int indent) {
  43.         string sindent = new(' ', indent);
  44.         Debug.WriteLine(sindent + "FullName               : " + this.FullName);
  45.         Debug.WriteLine(sindent + "FamilyName             : " + this.FamilyName);
  46.         Debug.WriteLine(sindent + "IsFramework            : " + this.IsFramework);
  47.         Debug.WriteLine(sindent + "ApplicationUserModelId : " + this.ApplicationUserModelId);
  48.         Debug.WriteLine(sindent + "Path                   : " + this.Path);
  49.         Debug.WriteLine(sindent + "Publisher              : " + this.Publisher);
  50.         Debug.WriteLine(sindent + "PublisherId            : " + this.PublisherId);
  51.         Debug.WriteLine(sindent + "Logo                   : " + this.Logo);
  52.         Debug.WriteLine(sindent + "Best Logo Path         : " + this.FindHighestScaleQualifiedImagePath(this.Logo));
  53.         Debug.WriteLine(sindent + "ProcessorArchitecture  : " + this.ProcessorArchitecture);
  54.         Debug.WriteLine(sindent + "Version                : " + this.Version);
  55.         Debug.WriteLine(sindent + "PublisherDisplayName   : " + this.PublisherDisplayName);
  56.         Debug.WriteLine(sindent + "   Localized           : " + this.LoadResourceString(this.PublisherDisplayName));
  57.         Debug.WriteLine(sindent + "DisplayName            : " + this.DisplayName);
  58.         Debug.WriteLine(sindent + "   Localized           : " + this.LoadResourceString(this.DisplayName));
  59.         Debug.WriteLine(sindent + "Description            : " + this.Description);
  60.         Debug.WriteLine(sindent + "   Localized           : " + this.LoadResourceString(this.Description));
  61.  
  62.         Debug.WriteLine(sindent + "Apps                   :");
  63.         int i = 0;
  64.         foreach (AppxApp app in this.Apps) {
  65.             Debug.WriteLine(sindent + " App [" + i + "] Description       : " + app.Description);
  66.             Debug.WriteLine(sindent + "   Localized           : " + this.LoadResourceString(app.Description));
  67.             Debug.WriteLine(sindent + " App [" + i + "] DisplayName       : " + app.DisplayName);
  68.             Debug.WriteLine(sindent + "   Localized           : " + this.LoadResourceString(app.DisplayName));
  69.             Debug.WriteLine(sindent + " App [" + i + "] ShortName         : " + app.ShortName);
  70.             Debug.WriteLine(sindent + "   Localized           : " + this.LoadResourceString(app.ShortName));
  71.             Debug.WriteLine(sindent + " App [" + i + "] EntryPoint        : " + app.EntryPoint);
  72.             Debug.WriteLine(sindent + " App [" + i + "] Executable        : " + app.Executable);
  73.             Debug.WriteLine(sindent + " App [" + i + "] Id                : " + app.Id);
  74.             Debug.WriteLine(sindent + " App [" + i + "] Logo              : " + app.Logo);
  75.             Debug.WriteLine(sindent + " App [" + i + "] SmallLogo         : " + app.SmallLogo);
  76.             Debug.WriteLine(sindent + " App [" + i + "] StartPage         : " + app.StartPage);
  77.             Debug.WriteLine(sindent + " App [" + i + "] Square150x150Logo : " + app.Square150x150Logo);
  78.             Debug.WriteLine(sindent + " App [" + i + "] Square30x30Logo   : " + app.Square30x30Logo);
  79.             Debug.WriteLine(sindent + " App [" + i + "] BackgroundColor   : " + app.BackgroundColor);
  80.             Debug.WriteLine(sindent + " App [" + i + "] ForegroundText    : " + app.ForegroundText);
  81.             Debug.WriteLine(sindent + " App [" + i + "] WideLogo          : " + app.WideLogo);
  82.             Debug.WriteLine(sindent + " App [" + i + "] Wide310x310Logo   : " + app.Wide310x310Logo);
  83.             Debug.WriteLine(sindent + " App [" + i + "] Square310x310Logo : " + app.Square310x310Logo);
  84.             Debug.WriteLine(sindent + " App [" + i + "] Square70x70Logo   : " + app.Square70x70Logo);
  85.             Debug.WriteLine(sindent + " App [" + i + "] MinWidth          : " + app.MinWidth);
  86.             Debug.WriteLine(sindent + " App [" + i + "] Square71x71Logo   : " + app.GetStringValue("Square71x71Logzo"));
  87.             i++;
  88.         }
  89.  
  90.         Console.WriteLine(sindent + "Deps                   :");
  91.         foreach (AppxPackage dep in this.DependencyGraph) {
  92.             dep.Show(indent + 1);
  93.         }
  94.     }
  95.  
  96.     public string FindHighestScaleQualifiedImagePath(string resourceName) {
  97.         ArgumentNullException.ThrowIfNull(resourceName);
  98.  
  99.         const string scaleToken = ".scale-";
  100.         List<int> sizes = [];
  101.         string name = System.IO.Path.GetFileNameWithoutExtension(resourceName);
  102.         string ext = System.IO.Path.GetExtension(resourceName);
  103.         foreach (string file in Directory.EnumerateFiles(System.IO.Path.Combine(this.Path, System.IO.Path.GetDirectoryName(resourceName)), name + scaleToken + "*" + ext)) {
  104.             string fileName = System.IO.Path.GetFileNameWithoutExtension(file);
  105.             int pos = fileName.IndexOf(scaleToken) + scaleToken.Length;
  106.             string sizeText = fileName[pos..];
  107.             if (int.TryParse(sizeText, out int size)) {
  108.                 sizes.Add(size);
  109.             }
  110.         }
  111.  
  112.         if (sizes.Count == 0) {
  113.             return null;
  114.         }
  115.  
  116.         sizes.Sort();
  117.         return System.IO.Path.Combine(this.Path, System.IO.Path.GetDirectoryName(resourceName), name + scaleToken + sizes.Last() + ext);
  118.     }
  119.  
  120.     public override string ToString() {
  121.         return this.FullName;
  122.     }
  123.  
  124.     public static AppxPackage FromWindow(IntPtr handle) {
  125.         _ = GetWindowThreadProcessId(handle, out int processId);
  126.         return processId == 0 ? null : FromProcess(processId);
  127.     }
  128.  
  129.     public static AppxPackage FromProcess(Process process) {
  130.         process ??= Process.GetCurrentProcess();
  131.  
  132.         try {
  133.             return FromProcess(process.Handle);
  134.         } catch {
  135.             // probably access denied on .Handle
  136.             return null;
  137.         }
  138.     }
  139.  
  140.     public static AppxPackage FromProcess(int processId) {
  141.         const int QueryLimitedInformation = 0x1000;
  142.         IntPtr hProcess = OpenProcess(QueryLimitedInformation, false, processId);
  143.         try {
  144.             return FromProcess(hProcess);
  145.         } finally {
  146.             if (hProcess != IntPtr.Zero) {
  147.                 CloseHandle(hProcess);
  148.             }
  149.         }
  150.     }
  151.  
  152.     public static AppxPackage FromProcess(IntPtr hProcess) {
  153.         if (hProcess == IntPtr.Zero) {
  154.             return null;
  155.         }
  156.  
  157.         // hprocess must have been opened with QueryLimitedInformation
  158.         int len = 0;
  159.         _ = GetPackageFullName(hProcess, ref len, null);
  160.         if (len == 0) {
  161.             return null;
  162.         }
  163.  
  164.         StringBuilder sb = new(len);
  165.         string fullName = GetPackageFullName(hProcess, ref len, sb) == 0 ? sb.ToString() : null;
  166.         if (string.IsNullOrEmpty(fullName)) // not an AppX
  167. {
  168.             return null;
  169.         }
  170.  
  171.         AppxPackage package = QueryPackageInfo(fullName, PackageConstants.PACKAGE_FILTER_HEAD).First();
  172.  
  173.         len = 0;
  174.         _ = GetApplicationUserModelId(hProcess, ref len, null);
  175.         sb = new StringBuilder(len);
  176.         package.ApplicationUserModelId = GetApplicationUserModelId(hProcess, ref len, sb) == 0 ? sb.ToString() : null;
  177.         return package;
  178.     }
  179.  
  180.     public string GetPropertyStringValue(string name) {
  181.         return name == null ? throw new ArgumentNullException(nameof(name)) : GetStringValue(this._properties, name);
  182.     }
  183.  
  184.     public bool GetPropertyBoolValue(string name) {
  185.         return name == null ? throw new ArgumentNullException(nameof(name)) : GetBoolValue(this._properties, name);
  186.     }
  187.  
  188.     public string LoadResourceString(string resource) {
  189.         return LoadResourceString(this.FullName, resource);
  190.     }
  191.  
  192.     private static IEnumerable<AppxPackage> QueryPackageInfo(string fullName, PackageConstants flags) {
  193.         _ = OpenPackageInfoByFullName(fullName, 0, out nint infoRef);
  194.         if (infoRef != IntPtr.Zero) {
  195.             IntPtr infoBuffer = IntPtr.Zero;
  196.             try {
  197.                 int len = 0;
  198.                 _ = GetPackageInfo(infoRef, flags, ref len, IntPtr.Zero, out int count);
  199.                 if (len > 0) {
  200.                     IAppxFactory factory = (IAppxFactory) new AppxFactory();
  201.                     infoBuffer = Marshal.AllocHGlobal(len);
  202.                     int res = GetPackageInfo(infoRef, flags, ref len, infoBuffer, out count);
  203.                     for (int i = 0; i < count; i++) {
  204.                         PACKAGE_INFO info = (PACKAGE_INFO) Marshal.PtrToStructure(infoBuffer + (i * Marshal.SizeOf(typeof(PACKAGE_INFO))), typeof(PACKAGE_INFO));
  205.                         AppxPackage package = new() {
  206.                             FamilyName = Marshal.PtrToStringUni(info.packageFamilyName),
  207.                             FullName = Marshal.PtrToStringUni(info.packageFullName),
  208.                             Path = Marshal.PtrToStringUni(info.path),
  209.                             Publisher = Marshal.PtrToStringUni(info.packageId.publisher),
  210.                             PublisherId = Marshal.PtrToStringUni(info.packageId.publisherId),
  211.                             ResourceId = Marshal.PtrToStringUni(info.packageId.resourceId),
  212.                             ProcessorArchitecture = info.packageId.processorArchitecture,
  213.                             Version = new Version(info.packageId.VersionMajor, info.packageId.VersionMinor, info.packageId.VersionBuild, info.packageId.VersionRevision)
  214.                         };
  215.  
  216.                         // read manifest
  217.                         string manifestPath = System.IO.Path.Combine(package.Path, "AppXManifest.xml");
  218.                         const int STGM_SHARE_DENY_NONE = 0x40;
  219.                         _ = SHCreateStreamOnFileEx(manifestPath, STGM_SHARE_DENY_NONE, 0, false, IntPtr.Zero, out IStream strm);
  220.                         if (strm != null) {
  221.                             IAppxManifestReader reader = factory.CreateManifestReader(strm);
  222.                             package._properties = reader.GetProperties();
  223.                             package.Description = package.GetPropertyStringValue("Description");
  224.                             package.DisplayName = package.GetPropertyStringValue("DisplayName");
  225.                             package.Logo = package.GetPropertyStringValue("Logo");
  226.                             package.PublisherDisplayName = package.GetPropertyStringValue("PublisherDisplayName");
  227.                             package.IsFramework = package.GetPropertyBoolValue("Framework");
  228.  
  229.                             IAppxManifestApplicationsEnumerator apps = reader.GetApplications();
  230.                             while (apps.GetHasCurrent()) {
  231.                                 IAppxManifestApplication app = apps.GetCurrent();
  232.                                 AppxApp appx = new(app) {
  233.                                     Description = GetStringValue(app, "Description"),
  234.                                     DisplayName = GetStringValue(app, "DisplayName"),
  235.                                     EntryPoint = GetStringValue(app, "EntryPoint"),
  236.                                     Executable = GetStringValue(app, "Executable"),
  237.                                     Id = GetStringValue(app, "Id"),
  238.                                     Logo = GetStringValue(app, "Logo"),
  239.                                     SmallLogo = GetStringValue(app, "SmallLogo"),
  240.                                     StartPage = GetStringValue(app, "StartPage"),
  241.                                     Square150x150Logo = GetStringValue(app, "Square150x150Logo"),
  242.                                     Square30x30Logo = GetStringValue(app, "Square30x30Logo"),
  243.                                     BackgroundColor = GetStringValue(app, "BackgroundColor"),
  244.                                     ForegroundText = GetStringValue(app, "ForegroundText"),
  245.                                     WideLogo = GetStringValue(app, "WideLogo"),
  246.                                     Wide310x310Logo = GetStringValue(app, "Wide310x310Logo"),
  247.                                     ShortName = GetStringValue(app, "ShortName"),
  248.                                     Square310x310Logo = GetStringValue(app, "Square310x310Logo"),
  249.                                     Square70x70Logo = GetStringValue(app, "Square70x70Logo"),
  250.                                     MinWidth = GetStringValue(app, "MinWidth")
  251.                                 };
  252.                                 package._apps.Add(appx);
  253.                                 apps.MoveNext();
  254.                             }
  255.  
  256.                             Marshal.ReleaseComObject(strm);
  257.                         }
  258.  
  259.                         yield return package;
  260.                     }
  261.  
  262.                     Marshal.ReleaseComObject(factory);
  263.                 }
  264.             } finally {
  265.                 if (infoBuffer != IntPtr.Zero) {
  266.                     Marshal.FreeHGlobal(infoBuffer);
  267.                 }
  268.  
  269.                 _ = ClosePackageInfo(infoRef);
  270.             }
  271.         }
  272.     }
  273.  
  274.     public static string LoadResourceString(string packageFullName, string resource) {
  275.         ArgumentNullException.ThrowIfNull(packageFullName);
  276.  
  277.         if (string.IsNullOrWhiteSpace(resource)) {
  278.             return null;
  279.         }
  280.  
  281.         const string resourceScheme = "ms-resource:";
  282.         if (!resource.StartsWith(resourceScheme)) {
  283.             return null;
  284.         }
  285.  
  286.         string part = resource[resourceScheme.Length..];
  287.         string url = part.StartsWith('/') ? resourceScheme + "//" + part : resourceScheme + "///resources/" + part;
  288.  
  289.         string source = string.Format("@{{{0}? {1}}}", packageFullName, url);
  290.         StringBuilder sb = new(1024);
  291.         int i = SHLoadIndirectString(source, sb, sb.Capacity, IntPtr.Zero);
  292.         return i != 0 ? null : sb.ToString();
  293.     }
  294.  
  295.     private static string GetStringValue(IAppxManifestProperties props, string name) {
  296.         if (props == null) {
  297.             return null;
  298.         }
  299.  
  300.         props.GetStringValue(name, out string value);
  301.         return value;
  302.     }
  303.  
  304.     private static bool GetBoolValue(IAppxManifestProperties props, string name) {
  305.         props.GetBoolValue(name, out bool value);
  306.         return value;
  307.     }
  308.  
  309.     internal static string GetStringValue(IAppxManifestApplication app, string name) {
  310.         app.GetStringValue(name, out string value);
  311.         return value;
  312.     }
  313.  
  314.     [Guid("5842a140-ff9f-4166-8f5c-62f5b7b0c781"), ComImport]
  315.     private class AppxFactory {
  316.     }
  317.  
  318. #pragma warning disable IDE1006 // Naming Styles
  319.     [Guid("BEB94909-E451-438B-B5A7-D79E767B75D8"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
  320.     private interface IAppxFactory {
  321.         void _VtblGap0_2(); // skip 2 methods
  322.         IAppxManifestReader CreateManifestReader(IStream inputStream);
  323.     }
  324.  
  325.     [Guid("4E1BD148-55A0-4480-A3D1-15544710637C"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
  326.     private interface IAppxManifestReader {
  327.         void _VtblGap0_1(); // skip 1 method
  328.         IAppxManifestProperties GetProperties();
  329.         void _VtblGap1_5(); // skip 5 methods
  330.         IAppxManifestApplicationsEnumerator GetApplications();
  331.     }
  332. #pragma warning restore IDE1006 // Naming Styles
  333.  
  334.     [Guid("9EB8A55A-F04B-4D0D-808D-686185D4847A"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
  335.     private interface IAppxManifestApplicationsEnumerator {
  336.         IAppxManifestApplication GetCurrent();
  337.         bool GetHasCurrent();
  338.         bool MoveNext();
  339.     }
  340.  
  341.     [Guid("5DA89BF4-3773-46BE-B650-7E744863B7E8"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
  342.     internal interface IAppxManifestApplication {
  343.         [PreserveSig]
  344.         int GetStringValue([MarshalAs(UnmanagedType.LPWStr)] string name, [MarshalAs(UnmanagedType.LPWStr)] out string vaue);
  345.     }
  346.  
  347.     [Guid("03FAF64D-F26F-4B2C-AAF7-8FE7789B8BCA"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
  348.     private interface IAppxManifestProperties {
  349.         [PreserveSig]
  350.         int GetBoolValue([MarshalAs(UnmanagedType.LPWStr)] string name, out bool value);
  351.         [PreserveSig]
  352.         int GetStringValue([MarshalAs(UnmanagedType.LPWStr)] string name, [MarshalAs(UnmanagedType.LPWStr)] out string vaue);
  353.     }
  354.  
  355. #pragma warning disable SYSLIB1054 // Use 'LibraryImportAttribute' instead of 'DllImportAttribute' to generate P/Invoke marshalling code at compile time
  356.     [DllImport("shlwapi.dll", CharSet = CharSet.Unicode)]
  357.     private static extern int SHLoadIndirectString(string pszSource, StringBuilder pszOutBuf, int cchOutBuf, IntPtr ppvReserved);
  358.  
  359.     [DllImport("shlwapi.dll", CharSet = CharSet.Unicode)]
  360.  
  361.     private static extern int SHCreateStreamOnFileEx(string fileName, int grfMode, int attributes, bool create, IntPtr reserved, out IStream stream);
  362.  
  363.  
  364.     [DllImport("user32.dll")]
  365.     private static extern int GetWindowThreadProcessId(IntPtr hWnd, out int lpdwProcessId);
  366.  
  367.     [DllImport("kernel32.dll")]
  368.     private static extern IntPtr OpenProcess(int dwDesiredAccess, bool bInheritHandle, int dwProcessId);
  369.  
  370.     [DllImport("kernel32.dll")]
  371.     private static extern bool CloseHandle(IntPtr hObject);
  372.  
  373.     [DllImport("kernel32.dll", CharSet = CharSet.Unicode)]
  374.     private static extern int OpenPackageInfoByFullName(string packageFullName, int reserved, out IntPtr packageInfoReference);
  375.  
  376.     [DllImport("kernel32.dll", CharSet = CharSet.Unicode)]
  377.     private static extern int GetPackageInfo(IntPtr packageInfoReference, PackageConstants flags, ref int bufferLength, IntPtr buffer, out int count);
  378.  
  379.     [DllImport("kernel32.dll", CharSet = CharSet.Unicode)]
  380.     private static extern int ClosePackageInfo(IntPtr packageInfoReference);
  381.  
  382.     [DllImport("kernel32.dll", CharSet = CharSet.Unicode)]
  383.     private static extern int GetPackageFullName(IntPtr hProcess, ref int packageFullNameLength, StringBuilder packageFullName);
  384.  
  385.     [DllImport("kernel32.dll", CharSet = CharSet.Unicode)]
  386.     private static extern int GetApplicationUserModelId(IntPtr hProcess, ref int applicationUserModelIdLength, StringBuilder applicationUserModelId);
  387. #pragma warning restore SYSLIB1054 // Use 'LibraryImportAttribute' instead of 'DllImportAttribute' to generate P/Invoke marshalling code at compile time
  388.  
  389.     [Flags]
  390.     private enum PackageConstants {
  391.         PACKAGE_FILTER_ALL_LOADED = 0x00000000,
  392.         PACKAGE_PROPERTY_FRAMEWORK = 0x00000001,
  393.         PACKAGE_PROPERTY_RESOURCE = 0x00000002,
  394.         PACKAGE_PROPERTY_BUNDLE = 0x00000004,
  395.         PACKAGE_FILTER_HEAD = 0x00000010,
  396.         PACKAGE_FILTER_DIRECT = 0x00000020,
  397.         PACKAGE_FILTER_RESOURCE = 0x00000040,
  398.         PACKAGE_FILTER_BUNDLE = 0x00000080,
  399.         PACKAGE_INFORMATION_BASIC = 0x00000000,
  400.         PACKAGE_INFORMATION_FULL = 0x00000100,
  401.         PACKAGE_PROPERTY_DEVELOPMENT_MODE = 0x00010000,
  402.     }
  403.  
  404.     [StructLayout(LayoutKind.Sequential, Pack = 4)]
  405.     private struct PACKAGE_INFO {
  406.         public int reserved;
  407.         public int flags;
  408.         public IntPtr path;
  409.         public IntPtr packageFullName;
  410.         public IntPtr packageFamilyName;
  411.         public PACKAGE_ID packageId;
  412.     }
  413.  
  414.     [StructLayout(LayoutKind.Sequential, Pack = 4)]
  415.     private struct PACKAGE_ID {
  416.         public int reserved;
  417.         public AppxPackageArchitecture processorArchitecture;
  418.         public ushort VersionRevision;
  419.         public ushort VersionBuild;
  420.         public ushort VersionMinor;
  421.         public ushort VersionMajor;
  422.         public IntPtr name;
  423.         public IntPtr publisher;
  424.         public IntPtr resourceId;
  425.         public IntPtr publisherId;
  426.     }
  427. }
  428.  
  429. public sealed class AppxApp {
  430.     private readonly AppxPackage.IAppxManifestApplication _app;
  431.  
  432.     internal AppxApp(AppxPackage.IAppxManifestApplication app) {
  433.         this._app = app;
  434.     }
  435.  
  436.     public string GetStringValue(string name) {
  437.         return name == null ? throw new ArgumentNullException(nameof(name)) : AppxPackage.GetStringValue(this._app, name);
  438.     }
  439.  
  440.     // we code well-known but there are others (like Square71x71Logo, Square44x44Logo, whatever ...)
  441.     // https://msdn.microsoft.com/en-us/library/windows/desktop/hh446703.aspx
  442.     public string Description { get; internal set; }
  443.     public string DisplayName { get; internal set; }
  444.     public string EntryPoint { get; internal set; }
  445.     public string Executable { get; internal set; }
  446.     public string Id { get; internal set; }
  447.     public string Logo { get; internal set; }
  448.     public string SmallLogo { get; internal set; }
  449.     public string StartPage { get; internal set; }
  450.     public string Square150x150Logo { get; internal set; }
  451.     public string Square30x30Logo { get; internal set; }
  452.     public string BackgroundColor { get; internal set; }
  453.     public string ForegroundText { get; internal set; }
  454.     public string WideLogo { get; internal set; }
  455.     public string Wide310x310Logo { get; internal set; }
  456.     public string ShortName { get; internal set; }
  457.     public string Square310x310Logo { get; internal set; }
  458.     public string Square70x70Logo { get; internal set; }
  459.     public string MinWidth { get; internal set; }
  460. }
  461.  
  462. public enum AppxPackageArchitecture {
  463.     x86 = 0,
  464.     Arm = 5,
  465.     x64 = 9,
  466.     Neutral = 11,
  467.     Arm64 = 12
  468. }
  469.  
Advertisement
Add Comment
Please, Sign In to add comment