mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 11:46:30 +02:00
archive
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<Application x:Class="SettingsMain.App"
|
||||
<Application x:Class="SettingsRunner.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:SettingsMain"
|
||||
xmlns:local="clr-namespace:SettingsRunner"
|
||||
StartupUri="MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
|
||||
namespace SettingsMain
|
||||
namespace SettingsRunner
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for App.xaml
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<Window x:Class="SettingsMain.MainWindow"
|
||||
<Window x:Class="SettingsRunner.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:SettingsMain"
|
||||
xmlns:local="clr-namespace:SettingsRunner"
|
||||
xmlns:Controls="clr-namespace:Microsoft.Toolkit.Wpf.UI.Controls;assembly=Microsoft.Toolkit.Wpf.UI.Controls"
|
||||
xmlns:xaml="clr-namespace:Microsoft.Toolkit.Wpf.UI.XamlHost;assembly=Microsoft.Toolkit.Wpf.UI.XamlHost"
|
||||
mc:Ignorable="d"
|
||||
Title="PowerToys Settings" Height="800" Width="800">
|
||||
|
||||
<Grid>
|
||||
|
||||
<xaml:WindowsXamlHost InitialTypeName="Microsoft.PowerToys.Settings.UI.Controls.DummyUserControl" ChildChanged="WindowsXamlHost_ChildChanged" />
|
||||
</Grid>
|
||||
|
||||
</Window>
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
using System.Windows;
|
||||
using Microsoft.Toolkit.Win32.UI.Controls.Interop.WinRT;
|
||||
using System;
|
||||
using System.Windows;
|
||||
using Microsoft.Toolkit.Wpf.UI.XamlHost;
|
||||
using Microsoft.PowerToys.Settings.UI.Controls;
|
||||
|
||||
namespace SettingsMain
|
||||
namespace SettingsRunner
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MainWindow.xaml
|
||||
@@ -12,5 +14,25 @@ namespace SettingsMain
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void WindowsXamlHost_ChildChanged(object sender, EventArgs e)
|
||||
{
|
||||
// Hook up x:Bind source.
|
||||
WindowsXamlHost windowsXamlHost = sender as WindowsXamlHost;
|
||||
DummyUserControl userControl = windowsXamlHost.GetUwpInternalObject() as DummyUserControl;
|
||||
|
||||
if (userControl != null)
|
||||
{
|
||||
userControl.XamlIslandMessage = this.WPFMessage;
|
||||
}
|
||||
}
|
||||
|
||||
public string WPFMessage
|
||||
{
|
||||
get
|
||||
{
|
||||
return "Binding from WPF to UWP XAML";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<UseWPF>true</UseWPF>
|
||||
<StartupObject>SettingsMain.Program</StartupObject>
|
||||
<StartupObject>SettingsRunner.Program</StartupObject>
|
||||
<Authors>Microsoft Corporation</Authors>
|
||||
<Product>PowerToys</Product>
|
||||
<Description>Windows system utilities to maximize productivity</Description>
|
||||
@@ -20,11 +20,6 @@
|
||||
<Win32Resource />
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Toolkit.Wpf.UI.Controls" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Toolkit.Wpf.UI.XamlHost" Version="6.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="..\settingsui\Assets\logo.png">
|
||||
<Pack>True</Pack>
|
||||
@@ -2,7 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace SettingsMain
|
||||
namespace SettingsRunner
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
@@ -11,7 +11,7 @@ namespace SettingsMain
|
||||
{
|
||||
using (new SettingsUI.App())
|
||||
{
|
||||
SettingsMain.App app = new SettingsMain.App();
|
||||
SettingsRunner.App app = new SettingsRunner.App();
|
||||
app.InitializeComponent();
|
||||
app.Run();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user