mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-15 03:07:56 +01:00
[Registry Preview] UI refresh (#25094)
* Init * Add WinUIEx.dll to the installer Update notice.md --------- Co-authored-by: Stefan Markovic <stefan@janeasystems.com>
This commit is contained in:
@@ -27,7 +27,7 @@
|
|||||||
<PackageVersion Include="Microsoft.Windows.CsWin32" Version="0.2.46-beta" />
|
<PackageVersion Include="Microsoft.Windows.CsWin32" Version="0.2.46-beta" />
|
||||||
<PackageVersion Include="Microsoft.Windows.CsWinRT" Version="2.0.1" />
|
<PackageVersion Include="Microsoft.Windows.CsWinRT" Version="2.0.1" />
|
||||||
<PackageVersion Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.755" />
|
<PackageVersion Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.755" />
|
||||||
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.2.230217.4" />
|
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.2.230313.1" />
|
||||||
<PackageVersion Include="Microsoft.Xaml.Behaviors.WinUI.Managed" Version="2.0.9" />
|
<PackageVersion Include="Microsoft.Xaml.Behaviors.WinUI.Managed" Version="2.0.9" />
|
||||||
<PackageVersion Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.39" />
|
<PackageVersion Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.39" />
|
||||||
<PackageVersion Include="ModernWpfUI" Version="0.9.4" />
|
<PackageVersion Include="ModernWpfUI" Version="0.9.4" />
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
<PackageVersion Include="UnitsNet" Version="4.145.0" />
|
<PackageVersion Include="UnitsNet" Version="4.145.0" />
|
||||||
<PackageVersion Include="Vanara.PInvoke.User32" Version="3.4.11" />
|
<PackageVersion Include="Vanara.PInvoke.User32" Version="3.4.11" />
|
||||||
<PackageVersion Include="Vanara.PInvoke.Shell32" Version="3.4.11" />
|
<PackageVersion Include="Vanara.PInvoke.Shell32" Version="3.4.11" />
|
||||||
<PackageVersion Include="WinUIEx" Version="1.8.0" />
|
<PackageVersion Include="WinUIEx" Version="2.1.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup Condition="'$(IsExperimentationLive)'!=''">
|
<ItemGroup Condition="'$(IsExperimentationLive)'!=''">
|
||||||
<!-- Additional dependencies used by experimentation -->
|
<!-- Additional dependencies used by experimentation -->
|
||||||
|
|||||||
@@ -302,7 +302,7 @@ SOFTWARE.
|
|||||||
- Microsoft.Windows.CsWin32 0.2.46-beta
|
- Microsoft.Windows.CsWin32 0.2.46-beta
|
||||||
- Microsoft.Windows.CsWinRT 2.0.1
|
- Microsoft.Windows.CsWinRT 2.0.1
|
||||||
- Microsoft.Windows.SDK.BuildTools 10.0.22621.755
|
- Microsoft.Windows.SDK.BuildTools 10.0.22621.755
|
||||||
- Microsoft.WindowsAppSDK 1.2.230217.4
|
- Microsoft.WindowsAppSDK 1.2.230313.1
|
||||||
- Microsoft.Xaml.Behaviors.WinUI.Managed 2.0.9
|
- Microsoft.Xaml.Behaviors.WinUI.Managed 2.0.9
|
||||||
- Microsoft.Xaml.Behaviors.Wpf 1.1.39
|
- Microsoft.Xaml.Behaviors.Wpf 1.1.39
|
||||||
- ModernWpfUI 0.9.4
|
- ModernWpfUI 0.9.4
|
||||||
@@ -329,4 +329,4 @@ SOFTWARE.
|
|||||||
- UnitsNet 4.145.0
|
- UnitsNet 4.145.0
|
||||||
- Vanara.PInvoke.Shell32 3.4.11
|
- Vanara.PInvoke.Shell32 3.4.11
|
||||||
- Vanara.PInvoke.User32 3.4.11
|
- Vanara.PInvoke.User32 3.4.11
|
||||||
- WinUIEx 1.8.0
|
- WinUIEx 2.1.0
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<?include $(sys.CURRENTDIR)\Common.wxi?>
|
<?include $(sys.CURRENTDIR)\Common.wxi?>
|
||||||
|
|
||||||
<?define RegistryPreviewFiles=ColorCode.Core.dll;ColorCode.WinUI.dll;CommunityToolkit.Common.dll;CommunityToolkit.WinUI.UI.Controls.Core.dll;CommunityToolkit.WinUI.UI.Controls.DataGrid.dll;CommunityToolkit.WinUI.UI.Controls.Input.dll;CommunityToolkit.WinUI.UI.Controls.Layout.dll;CommunityToolkit.WinUI.UI.Controls.Markdown.dll;CommunityToolkit.WinUI.UI.Controls.Media.dll;CommunityToolkit.WinUI.UI.Controls.Primitives.dll;CommunityToolkit.WinUI.UI.dll;CommunityToolkit.WinUI.dll;ControlzEx.dll;Ijwhost.dll;Microsoft.Graphics.Canvas.Interop.dll;Microsoft.Graphics.Canvas.dll;Microsoft.Graphics.Display.dll;Microsoft.InteractiveExperiences.Projection.dll;Microsoft.WinUI.dll;Microsoft.Windows.AppLifecycle.Projection.dll;Microsoft.Windows.AppNotifications.Builder.Projection.dll;Microsoft.Windows.ApplicationModel.DynamicDependency.Projection.dll;Microsoft.Windows.ApplicationModel.Resources.Projection.dll;Microsoft.Windows.ApplicationModel.WindowsAppRuntime.Projection.dll;Microsoft.Windows.SDK.NET.dll;Microsoft.Windows.Security.AccessControl.Projection.dll;Microsoft.Windows.System.Power.Projection.dll;Microsoft.Windows.Widgets.Projection.dll;Microsoft.Windows.Widgets.dll;Microsoft.WindowsAppRuntime.Bootstrap.Net.dll;Microsoft.Xaml.Behaviors.dll;PowerToys.Common.UI.dll;PowerToys.ManagedCommon.dll;PowerToys.ManagedTelemetry.dll;PowerToys.RegistryPreview.deps.json;PowerToys.RegistryPreview.dll;PowerToys.RegistryPreview.exe;PowerToys.RegistryPreview.runtimeconfig.json;PowerToys.RegistryPreviewExt.dll;PowerToys.Settings.UI.Lib.dll;System.CodeDom.dll;System.IO.Abstractions.dll;System.Management.dll;WinRT.Runtime.dll;app.ico;resources.pri?>
|
<?define RegistryPreviewFiles=ColorCode.Core.dll;ColorCode.WinUI.dll;CommunityToolkit.Common.dll;CommunityToolkit.WinUI.UI.Controls.Core.dll;CommunityToolkit.WinUI.UI.Controls.DataGrid.dll;CommunityToolkit.WinUI.UI.Controls.Input.dll;CommunityToolkit.WinUI.UI.Controls.Layout.dll;CommunityToolkit.WinUI.UI.Controls.Markdown.dll;CommunityToolkit.WinUI.UI.Controls.Media.dll;CommunityToolkit.WinUI.UI.Controls.Primitives.dll;CommunityToolkit.WinUI.UI.dll;CommunityToolkit.WinUI.dll;ControlzEx.dll;Ijwhost.dll;Microsoft.Graphics.Canvas.Interop.dll;Microsoft.Graphics.Canvas.dll;Microsoft.Graphics.Display.dll;Microsoft.InteractiveExperiences.Projection.dll;Microsoft.WinUI.dll;Microsoft.Windows.AppLifecycle.Projection.dll;Microsoft.Windows.AppNotifications.Builder.Projection.dll;Microsoft.Windows.ApplicationModel.DynamicDependency.Projection.dll;Microsoft.Windows.ApplicationModel.Resources.Projection.dll;Microsoft.Windows.ApplicationModel.WindowsAppRuntime.Projection.dll;Microsoft.Windows.SDK.NET.dll;Microsoft.Windows.Security.AccessControl.Projection.dll;Microsoft.Windows.System.Power.Projection.dll;Microsoft.Windows.Widgets.Projection.dll;Microsoft.Windows.Widgets.dll;Microsoft.WindowsAppRuntime.Bootstrap.Net.dll;Microsoft.Xaml.Behaviors.dll;PowerToys.Common.UI.dll;PowerToys.ManagedCommon.dll;PowerToys.ManagedTelemetry.dll;PowerToys.RegistryPreview.deps.json;PowerToys.RegistryPreview.dll;PowerToys.RegistryPreview.exe;PowerToys.RegistryPreview.runtimeconfig.json;PowerToys.RegistryPreviewExt.dll;PowerToys.Settings.UI.Lib.dll;System.CodeDom.dll;System.IO.Abstractions.dll;System.Management.dll;WinRT.Runtime.dll;WinUIEx.dll;app.ico;resources.pri?>
|
||||||
<?if $(var.Platform) = x64?>
|
<?if $(var.Platform) = x64?>
|
||||||
<?define RegistryPreviewFiles=$(var.RegistryPreviewFiles);clrcompression.dll?>
|
<?define RegistryPreviewFiles=$(var.RegistryPreviewFiles);clrcompression.dll?>
|
||||||
<?endif?>
|
<?endif?>
|
||||||
|
|||||||
@@ -18,10 +18,11 @@ using Windows.Foundation.Metadata;
|
|||||||
using Windows.Storage;
|
using Windows.Storage;
|
||||||
using Windows.Storage.Pickers;
|
using Windows.Storage.Pickers;
|
||||||
using WinRT.Interop;
|
using WinRT.Interop;
|
||||||
|
using WinUIEx;
|
||||||
|
|
||||||
namespace RegistryPreview
|
namespace RegistryPreview
|
||||||
{
|
{
|
||||||
public sealed partial class MainWindow : Window
|
public sealed partial class MainWindow : WindowEx
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Event handler to grab the main window's size and position before it closes
|
/// Event handler to grab the main window's size and position before it closes
|
||||||
|
|||||||
@@ -14,10 +14,11 @@ using Microsoft.UI.Xaml;
|
|||||||
using Microsoft.UI.Xaml.Controls;
|
using Microsoft.UI.Xaml.Controls;
|
||||||
using Windows.Foundation.Metadata;
|
using Windows.Foundation.Metadata;
|
||||||
using Windows.Storage;
|
using Windows.Storage;
|
||||||
|
using WinUIEx;
|
||||||
|
|
||||||
namespace RegistryPreview
|
namespace RegistryPreview
|
||||||
{
|
{
|
||||||
public sealed partial class MainWindow : Window
|
public sealed partial class MainWindow : WindowEx
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Method that opens and processes the passed in file name; expected to be an absolute path and a first time open
|
/// Method that opens and processes the passed in file name; expected to be an absolute path and a first time open
|
||||||
|
|||||||
@@ -1,212 +1,311 @@
|
|||||||
<Window
|
<winuiex:WindowEx
|
||||||
x:Class="RegistryPreview.MainWindow"
|
x:Class="RegistryPreview.MainWindow"
|
||||||
xmlns:controls="using:CommunityToolkit.WinUI.UI.Controls"
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:local="using:RegistryPreview"
|
xmlns:controls="using:CommunityToolkit.WinUI.UI.Controls"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:local="using:RegistryPreview"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
mc:Ignorable="d"
|
xmlns:ui="using:CommunityToolkit.WinUI.UI"
|
||||||
|
xmlns:winuiex="using:WinUIEx"
|
||||||
Closed="Window_Closed"
|
Closed="Window_Closed"
|
||||||
>
|
mc:Ignorable="d">
|
||||||
<Grid
|
<winuiex:WindowEx.Backdrop>
|
||||||
x:Name="gridPreview"
|
<winuiex:MicaSystemBackdrop />
|
||||||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
|
</winuiex:WindowEx.Backdrop>
|
||||||
Width="Auto"
|
<Grid
|
||||||
|
x:Name="gridPreview"
|
||||||
|
Width="Auto"
|
||||||
Height="Auto"
|
Height="Auto"
|
||||||
TabFocusNavigation="Cycle"
|
|
||||||
x:FieldModifier="public"
|
x:FieldModifier="public"
|
||||||
Loaded="GridPreview_Loaded"
|
Loaded="GridPreview_Loaded"
|
||||||
>
|
TabFocusNavigation="Cycle">
|
||||||
|
<Grid.Resources>
|
||||||
|
<Style x:Key="GridCardStyle" TargetType="Grid">
|
||||||
|
<Style.Setters>
|
||||||
|
<Setter Property="Background" Value="{ThemeResource CardBackgroundFillColorDefaultBrush}" />
|
||||||
|
<Setter Property="BorderThickness" Value="1" />
|
||||||
|
<Setter Property="BorderBrush" Value="{ThemeResource CardStrokeColorDefaultBrush}" />
|
||||||
|
</Style.Setters>
|
||||||
|
</Style>
|
||||||
|
</Grid.Resources>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<!-- Left, Splitter, Right -->
|
<!-- Left, Splitter, Right -->
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="6" />
|
||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
<ColumnDefinition Width="6"/>
|
|
||||||
<ColumnDefinition Width="*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<!-- CommandBar, Tree, Splitter, List, StackPanel -->
|
<!-- CommandBar, Tree, Splitter, List, StackPanel -->
|
||||||
<RowDefinition Height="48"/>
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
<RowDefinition Height="6" />
|
<RowDefinition Height="6" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
<RowDefinition Height="32"/>
|
<RowDefinition Height="Auto" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<CommandBar
|
<Grid
|
||||||
Name="commandBar"
|
|
||||||
Background="Transparent"
|
|
||||||
IsOpen="True"
|
|
||||||
DefaultLabelPosition="Right"
|
|
||||||
HorizontalAlignment="Left"
|
|
||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Grid.ColumnSpan="3"
|
Grid.ColumnSpan="3"
|
||||||
IsTabStop="False"
|
Margin="8,8,8,8"
|
||||||
>
|
CornerRadius="{StaticResource OverlayCornerRadius}"
|
||||||
<AppBarButton x:Name="openButton" x:Uid="OpenButton" Icon="OpenFile" IsTabStop="False" Click="OpenButton_Click" HorizontalAlignment="Left">
|
Style="{StaticResource GridCardStyle}">
|
||||||
<AppBarButton.KeyboardAccelerators>
|
<CommandBar
|
||||||
<KeyboardAccelerator Modifiers="Control" Key="O" />
|
Name="commandBar"
|
||||||
</AppBarButton.KeyboardAccelerators>
|
HorizontalAlignment="Left"
|
||||||
</AppBarButton>
|
BorderBrush="Transparent"
|
||||||
<AppBarButton x:Name="saveButton" x:Uid="SaveButton" Icon="Save" IsTabStop="False" Click="SaveButton_Click" HorizontalAlignment="Left" IsEnabled="False">
|
BorderThickness="0"
|
||||||
<AppBarButton.KeyboardAccelerators>
|
DefaultLabelPosition="Right"
|
||||||
<KeyboardAccelerator Modifiers="None" Key="F2" />
|
IsOpen="True"
|
||||||
</AppBarButton.KeyboardAccelerators>
|
IsTabStop="False">
|
||||||
</AppBarButton>
|
|
||||||
<AppBarButton x:Name="saveAsButton" x:Uid="SaveAsButton" Icon="SaveLocal" IsTabStop="False" Click="SaveAsButton_Click" HorizontalAlignment="Left" IsEnabled="True">
|
|
||||||
<AppBarButton.KeyboardAccelerators>
|
|
||||||
<KeyboardAccelerator Modifiers="Shift" Key="F2" />
|
|
||||||
</AppBarButton.KeyboardAccelerators>
|
|
||||||
</AppBarButton>
|
|
||||||
<AppBarButton x:Name="editButton" x:Uid="EditButton" Icon="NewWindow" IsTabStop="False" Click="EditButton_Click" HorizontalAlignment="Left">
|
|
||||||
<AppBarButton.KeyboardAccelerators>
|
|
||||||
<KeyboardAccelerator Modifiers="Control" Key="E" />
|
|
||||||
</AppBarButton.KeyboardAccelerators>
|
|
||||||
</AppBarButton>
|
|
||||||
<AppBarButton x:Name="refreshButton" x:Uid="RefreshButton" Icon="Refresh" IsTabStop="False" Click="RefreshButton_Click" HorizontalAlignment="Left">
|
|
||||||
<AppBarButton.KeyboardAccelerators>
|
|
||||||
<KeyboardAccelerator Key="F5" />
|
|
||||||
</AppBarButton.KeyboardAccelerators>
|
|
||||||
</AppBarButton>
|
|
||||||
<AppBarButton x:Name="writeButton" x:Uid="WriteButton" Icon="Share" IsTabStop="False" Click="WriteButton_Click" HorizontalAlignment="Left">
|
|
||||||
<AppBarButton.KeyboardAccelerators>
|
|
||||||
<KeyboardAccelerator Modifiers="Control" Key="W" />
|
|
||||||
</AppBarButton.KeyboardAccelerators>
|
|
||||||
</AppBarButton>
|
|
||||||
<AppBarButton x:Name="registryButton" x:Uid="RegistryButton" Icon="Go" IsTabStop="False" Click="RegistryButton_Click" HorizontalAlignment="Left">
|
|
||||||
<AppBarButton.KeyboardAccelerators>
|
|
||||||
<KeyboardAccelerator Modifiers="Control" Key="R" />
|
|
||||||
</AppBarButton.KeyboardAccelerators>
|
|
||||||
</AppBarButton>
|
|
||||||
</CommandBar>
|
|
||||||
|
|
||||||
|
<AppBarButton
|
||||||
|
x:Name="openButton"
|
||||||
|
x:Uid="OpenButton"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
Click="OpenButton_Click"
|
||||||
|
Icon="OpenFile"
|
||||||
|
IsTabStop="False">
|
||||||
|
<AppBarButton.KeyboardAccelerators>
|
||||||
|
<KeyboardAccelerator Key="O" Modifiers="Control" />
|
||||||
|
</AppBarButton.KeyboardAccelerators>
|
||||||
|
</AppBarButton>
|
||||||
|
<AppBarButton
|
||||||
|
x:Name="saveButton"
|
||||||
|
x:Uid="SaveButton"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
Click="SaveButton_Click"
|
||||||
|
Icon="Save"
|
||||||
|
IsEnabled="False"
|
||||||
|
IsTabStop="False">
|
||||||
|
<AppBarButton.KeyboardAccelerators>
|
||||||
|
<KeyboardAccelerator Key="F2" Modifiers="None" />
|
||||||
|
</AppBarButton.KeyboardAccelerators>
|
||||||
|
</AppBarButton>
|
||||||
|
<AppBarButton
|
||||||
|
x:Name="saveAsButton"
|
||||||
|
x:Uid="SaveAsButton"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
Click="SaveAsButton_Click"
|
||||||
|
Icon="SaveLocal"
|
||||||
|
IsEnabled="True"
|
||||||
|
IsTabStop="False">
|
||||||
|
<AppBarButton.KeyboardAccelerators>
|
||||||
|
<KeyboardAccelerator Key="F2" Modifiers="Shift" />
|
||||||
|
</AppBarButton.KeyboardAccelerators>
|
||||||
|
</AppBarButton>
|
||||||
|
<AppBarButton
|
||||||
|
x:Name="editButton"
|
||||||
|
x:Uid="EditButton"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
Click="EditButton_Click"
|
||||||
|
Icon="NewWindow"
|
||||||
|
IsTabStop="False">
|
||||||
|
<AppBarButton.KeyboardAccelerators>
|
||||||
|
<KeyboardAccelerator Key="E" Modifiers="Control" />
|
||||||
|
</AppBarButton.KeyboardAccelerators>
|
||||||
|
</AppBarButton>
|
||||||
|
<AppBarButton
|
||||||
|
x:Name="refreshButton"
|
||||||
|
x:Uid="RefreshButton"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
Click="RefreshButton_Click"
|
||||||
|
Icon="Refresh"
|
||||||
|
IsTabStop="False">
|
||||||
|
<AppBarButton.KeyboardAccelerators>
|
||||||
|
<KeyboardAccelerator Key="F5" />
|
||||||
|
</AppBarButton.KeyboardAccelerators>
|
||||||
|
</AppBarButton>
|
||||||
|
<AppBarButton
|
||||||
|
x:Name="writeButton"
|
||||||
|
x:Uid="WriteButton"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
Click="WriteButton_Click"
|
||||||
|
Icon="Share"
|
||||||
|
IsTabStop="False">
|
||||||
|
<AppBarButton.KeyboardAccelerators>
|
||||||
|
<KeyboardAccelerator Key="W" Modifiers="Control" />
|
||||||
|
</AppBarButton.KeyboardAccelerators>
|
||||||
|
</AppBarButton>
|
||||||
|
<AppBarButton
|
||||||
|
x:Name="registryButton"
|
||||||
|
x:Uid="RegistryButton"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
Click="RegistryButton_Click"
|
||||||
|
Icon="Go"
|
||||||
|
IsTabStop="False">
|
||||||
|
<AppBarButton.KeyboardAccelerators>
|
||||||
|
<KeyboardAccelerator Key="R" Modifiers="Control" />
|
||||||
|
</AppBarButton.KeyboardAccelerators>
|
||||||
|
</AppBarButton>
|
||||||
|
</CommandBar>
|
||||||
|
</Grid>
|
||||||
<TextBox
|
<TextBox
|
||||||
x:Name="textBox"
|
x:Name="textBox"
|
||||||
x:Uid="textBox"
|
x:Uid="textBox"
|
||||||
Grid.Column="0"
|
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Grid.RowSpan="3"
|
Grid.RowSpan="3"
|
||||||
|
Grid.Column="0"
|
||||||
|
Margin="8,0,0,0"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
VerticalAlignment="Stretch"
|
VerticalAlignment="Stretch"
|
||||||
IsTabStop="True"
|
|
||||||
TabIndex="0"
|
|
||||||
IsTextPredictionEnabled="False"
|
|
||||||
IsSpellCheckEnabled="False"
|
|
||||||
AcceptsReturn="True"
|
AcceptsReturn="True"
|
||||||
PlaceholderText="{Binding PlaceholderText}"
|
|
||||||
TextWrapping="NoWrap"
|
|
||||||
CanBeScrollAnchor="False"
|
CanBeScrollAnchor="False"
|
||||||
ScrollViewer.IsVerticalRailEnabled ="True"
|
|
||||||
ScrollViewer.IsHorizontalRailEnabled="True"
|
|
||||||
ScrollViewer.VerticalScrollBarVisibility="Visible"
|
|
||||||
ScrollViewer.HorizontalScrollBarVisibility="Visible"
|
|
||||||
FontFamily="Cascadia Mono, Consolas, Courier New"
|
FontFamily="Cascadia Mono, Consolas, Courier New"
|
||||||
/>
|
IsSpellCheckEnabled="False"
|
||||||
|
IsTabStop="True"
|
||||||
|
IsTextPredictionEnabled="False"
|
||||||
|
PlaceholderText="{Binding PlaceholderText}"
|
||||||
|
ScrollViewer.HorizontalScrollBarVisibility="Visible"
|
||||||
|
ScrollViewer.IsHorizontalRailEnabled="True"
|
||||||
|
ScrollViewer.IsVerticalRailEnabled="True"
|
||||||
|
ScrollViewer.VerticalScrollBarVisibility="Visible"
|
||||||
|
TabIndex="0"
|
||||||
|
TextWrapping="NoWrap" />
|
||||||
|
|
||||||
<StackPanel
|
<StackPanel
|
||||||
x:Name="stackPanelTextBox"
|
x:Name="stackPanelTextBox"
|
||||||
Grid.Column="0"
|
|
||||||
Grid.Row="4"
|
Grid.Row="4"
|
||||||
|
Grid.Column="0"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
VerticalAlignment="Stretch"
|
VerticalAlignment="Stretch"
|
||||||
IsTabStop="False"
|
IsTabStop="False">
|
||||||
Background="Transparent"
|
<CheckBox
|
||||||
>
|
x:Name="checkBoxTextBox"
|
||||||
<CheckBox
|
|
||||||
x:Name="checkBoxTextBox"
|
|
||||||
x:Uid="checkBoxTextBox"
|
x:Uid="checkBoxTextBox"
|
||||||
Content="{Binding Content}"
|
HorizontalAlignment="Center"
|
||||||
IsChecked="True"
|
VerticalAlignment="Center"
|
||||||
HorizontalAlignment="Center"
|
Checked="CheckBoxTextBox_Checked"
|
||||||
VerticalAlignment="Center"
|
Content="{Binding Content}"
|
||||||
|
IsChecked="True"
|
||||||
IsTabStop="True"
|
IsTabStop="True"
|
||||||
TabIndex="1"
|
TabIndex="1"
|
||||||
Checked="CheckBoxTextBox_Checked"
|
Unchecked="CheckBoxTextBox_Unchecked" />
|
||||||
Unchecked="CheckBoxTextBox_Unchecked"
|
|
||||||
/>
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<TreeView
|
<Grid
|
||||||
x:Name="treeView"
|
Grid.Row="1"
|
||||||
Grid.Column="2"
|
|
||||||
Grid.Row="1"
|
|
||||||
Background="Transparent"
|
|
||||||
CanDragItems="False"
|
|
||||||
AllowDrop="False"
|
|
||||||
AllowFocusOnInteraction="True"
|
|
||||||
CanReorderItems="False"
|
|
||||||
IsEnabled="True"
|
|
||||||
ScrollViewer.BringIntoViewOnFocusChange="True"
|
|
||||||
ScrollViewer.VerticalScrollMode="Auto"
|
|
||||||
ScrollViewer.VerticalScrollBarVisibility="Visible"
|
|
||||||
ScrollViewer.HorizontalScrollBarVisibility="Visible"
|
|
||||||
ScrollViewer.HorizontalScrollMode="Enabled"
|
|
||||||
ItemInvoked="TreeView_ItemInvoked"
|
|
||||||
Padding="0,0,0,0"
|
|
||||||
IsTabStop="False"
|
|
||||||
TabIndex="2"
|
|
||||||
>
|
|
||||||
<TreeView.ItemTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Padding="0,0,0,0" IsTabStop="False">
|
|
||||||
<Image Source="{Binding Path=Content.Image}" MaxHeight="16" MaxWidth="16" ToolTipService.ToolTip="{Binding Path=Content.ToolTipText}"/>
|
|
||||||
<TextBlock Padding="5,0,0,0" Text="{Binding Path=Content.Name}" />
|
|
||||||
</StackPanel>
|
|
||||||
</DataTemplate>
|
|
||||||
</TreeView.ItemTemplate>
|
|
||||||
</TreeView>
|
|
||||||
|
|
||||||
<controls:DataGrid
|
|
||||||
x:Name="dataGrid"
|
|
||||||
Background="Transparent"
|
|
||||||
Grid.Column="2"
|
Grid.Column="2"
|
||||||
|
Margin="0,0,8,0"
|
||||||
|
CornerRadius="{StaticResource OverlayCornerRadius}"
|
||||||
|
Style="{StaticResource GridCardStyle}">
|
||||||
|
<TreeView
|
||||||
|
x:Name="treeView"
|
||||||
|
Padding="0,0,0,0"
|
||||||
|
AllowDrop="False"
|
||||||
|
AllowFocusOnInteraction="True"
|
||||||
|
Background="Transparent"
|
||||||
|
CanDragItems="False"
|
||||||
|
CanReorderItems="False"
|
||||||
|
IsEnabled="True"
|
||||||
|
IsTabStop="False"
|
||||||
|
ItemInvoked="TreeView_ItemInvoked"
|
||||||
|
ScrollViewer.BringIntoViewOnFocusChange="True"
|
||||||
|
ScrollViewer.HorizontalScrollBarVisibility="Visible"
|
||||||
|
ScrollViewer.HorizontalScrollMode="Enabled"
|
||||||
|
ScrollViewer.VerticalScrollBarVisibility="Visible"
|
||||||
|
ScrollViewer.VerticalScrollMode="Auto"
|
||||||
|
TabIndex="2">
|
||||||
|
<TreeView.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<StackPanel
|
||||||
|
Padding="0,0,0,0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
IsTabStop="False"
|
||||||
|
Orientation="Horizontal">
|
||||||
|
<Image
|
||||||
|
MaxWidth="16"
|
||||||
|
MaxHeight="16"
|
||||||
|
Source="{Binding Path=Content.Image}"
|
||||||
|
ToolTipService.ToolTip="{Binding Path=Content.ToolTipText}" />
|
||||||
|
<TextBlock Padding="5,0,0,0" Text="{Binding Path=Content.Name}" />
|
||||||
|
</StackPanel>
|
||||||
|
</DataTemplate>
|
||||||
|
</TreeView.ItemTemplate>
|
||||||
|
</TreeView>
|
||||||
|
</Grid>
|
||||||
|
<Grid
|
||||||
Grid.Row="3"
|
Grid.Row="3"
|
||||||
Grid.RowSpan="2"
|
Grid.RowSpan="2"
|
||||||
CanDrag="False"
|
Grid.Column="2"
|
||||||
SelectionMode="Single"
|
Margin="0,0,8,8"
|
||||||
AllowDrop="False"
|
Style="{StaticResource GridCardStyle}">
|
||||||
AreRowDetailsFrozen="True"
|
<controls:DataGrid
|
||||||
HeadersVisibility="Column"
|
x:Name="dataGrid"
|
||||||
RowDetailsVisibilityMode="Collapsed"
|
AllowDrop="False"
|
||||||
IsReadOnly="True"
|
AreRowDetailsFrozen="True"
|
||||||
AutoGenerateColumns="False"
|
AutoGenerateColumns="False"
|
||||||
ItemsSource="{x:Bind listRegistryValues}"
|
Background="Transparent"
|
||||||
IsTabStop="true"
|
CanDrag="False"
|
||||||
TabIndex="3"
|
CornerRadius="{StaticResource OverlayCornerRadius}"
|
||||||
>
|
HeadersVisibility="Column"
|
||||||
<controls:DataGrid.Columns>
|
IsReadOnly="True"
|
||||||
<controls:DataGridTemplateColumn
|
IsTabStop="true"
|
||||||
x:Uid="NameColumn"
|
ItemsSource="{x:Bind listRegistryValues}"
|
||||||
Width="Auto"
|
RowDetailsVisibilityMode="Collapsed"
|
||||||
IsReadOnly="True"
|
SelectionMode="Single"
|
||||||
>
|
TabIndex="3">
|
||||||
<controls:DataGridTemplateColumn.CellTemplate>
|
<controls:DataGrid.Columns>
|
||||||
<DataTemplate>
|
<controls:DataGridTemplateColumn
|
||||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
x:Uid="NameColumn"
|
||||||
<TextBlock Padding="10,0,0,0" Text=" " FontSize="14" IsTabStop="False"/>
|
Width="Auto"
|
||||||
<Image Source="{Binding ImageUri}" MaxHeight="16" MaxWidth="16" IsTabStop="False" ToolTipService.ToolTip="{Binding ToolTipText}" />
|
IsReadOnly="True">
|
||||||
<TextBlock Padding="5, 0, 10, 0" Text="{Binding Name}" FontSize="14" IsTabStop="False"/>
|
<controls:DataGridTemplateColumn.CellTemplate>
|
||||||
</StackPanel>
|
<DataTemplate>
|
||||||
</DataTemplate>
|
<StackPanel VerticalAlignment="Center" Orientation="Horizontal">
|
||||||
</controls:DataGridTemplateColumn.CellTemplate>
|
<TextBlock
|
||||||
</controls:DataGridTemplateColumn>
|
Padding="10,0,0,0"
|
||||||
<controls:DataGridTextColumn
|
FontSize="14"
|
||||||
x:Uid="TypeColumn"
|
IsTabStop="False"
|
||||||
Width="Auto"
|
Text=" " />
|
||||||
Binding="{Binding Type}"
|
<Image
|
||||||
FontSize="14"
|
MaxWidth="16"
|
||||||
/>
|
MaxHeight="16"
|
||||||
<controls:DataGridTextColumn
|
IsTabStop="False"
|
||||||
x:Uid="ValueColumn"
|
Source="{Binding ImageUri}"
|
||||||
Width="Auto"
|
ToolTipService.ToolTip="{Binding ToolTipText}" />
|
||||||
Binding="{Binding Value}"
|
<TextBlock
|
||||||
FontSize="14"
|
Padding="5,0,10,0"
|
||||||
/>
|
FontSize="14"
|
||||||
</controls:DataGrid.Columns>
|
IsTabStop="False"
|
||||||
</controls:DataGrid>
|
Text="{Binding Name}" />
|
||||||
|
</StackPanel>
|
||||||
<controls:GridSplitter x:Name="verticalSplitter" Grid.Column="1" Grid.Row="1" Grid.RowSpan="4" CursorBehavior="ChangeOnSplitterHover" Background="{ThemeResource TextControlBorderBrush}" VerticalAlignment="Stretch" GripperCursor="SizeWestEast" IsTabStop="False"/>
|
</DataTemplate>
|
||||||
<controls:GridSplitter x:Name="horizontalSplitter" Grid.Column="2" Grid.Row="2" CursorBehavior="ChangeOnSplitterHover" Background="{ThemeResource TextControlBorderBrush}" HorizontalAlignment="Stretch" GripperCursor="SizeNorthSouth" IsTabStop="False"/>
|
</controls:DataGridTemplateColumn.CellTemplate>
|
||||||
|
</controls:DataGridTemplateColumn>
|
||||||
|
<controls:DataGridTextColumn
|
||||||
|
x:Uid="TypeColumn"
|
||||||
|
Width="Auto"
|
||||||
|
Binding="{Binding Type}"
|
||||||
|
FontSize="14" />
|
||||||
|
<controls:DataGridTextColumn
|
||||||
|
x:Uid="ValueColumn"
|
||||||
|
Width="Auto"
|
||||||
|
Binding="{Binding Value}"
|
||||||
|
FontSize="14" />
|
||||||
|
</controls:DataGrid.Columns>
|
||||||
|
</controls:DataGrid>
|
||||||
|
</Grid>
|
||||||
|
<controls:GridSplitter
|
||||||
|
x:Name="verticalSplitter"
|
||||||
|
Grid.Row="1"
|
||||||
|
Grid.RowSpan="4"
|
||||||
|
Grid.Column="1"
|
||||||
|
VerticalAlignment="Stretch"
|
||||||
|
Background="Transparent"
|
||||||
|
CursorBehavior="ChangeOnSplitterHover"
|
||||||
|
GripperCursor="SizeWestEast"
|
||||||
|
IsTabStop="False" />
|
||||||
|
<controls:GridSplitter
|
||||||
|
x:Name="horizontalSplitter"
|
||||||
|
Grid.Row="2"
|
||||||
|
Grid.Column="2"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
Background="Transparent"
|
||||||
|
CornerRadius="4"
|
||||||
|
CursorBehavior="ChangeOnSplitterHover"
|
||||||
|
GripperCursor="SizeNorthSouth"
|
||||||
|
IsTabStop="False" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</winuiex:WindowEx>
|
||||||
|
|||||||
@@ -11,10 +11,11 @@ using Microsoft.UI.Xaml.Controls;
|
|||||||
using Windows.ApplicationModel.Resources;
|
using Windows.ApplicationModel.Resources;
|
||||||
using Windows.Data.Json;
|
using Windows.Data.Json;
|
||||||
using Windows.Graphics;
|
using Windows.Graphics;
|
||||||
|
using WinUIEx;
|
||||||
|
|
||||||
namespace RegistryPreview
|
namespace RegistryPreview
|
||||||
{
|
{
|
||||||
public sealed partial class MainWindow : Window
|
public sealed partial class MainWindow : WindowEx
|
||||||
{
|
{
|
||||||
// Const values
|
// Const values
|
||||||
private const string REGISTRYHEADER4 = "regedit4";
|
private const string REGISTRYHEADER4 = "regedit4";
|
||||||
|
|||||||
@@ -46,7 +46,8 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="CommunityToolkit.WinUI.UI.Controls" />
|
<PackageReference Include="CommunityToolkit.WinUI.UI.Controls" />
|
||||||
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" />
|
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" />
|
||||||
<PackageReference Include="Microsoft.WindowsAppSDK" />
|
<PackageReference Include="Microsoft.WindowsAppSDK" />
|
||||||
|
<PackageReference Include="WinUIEx" />
|
||||||
<Manifest Include="$(ApplicationManifest)" />
|
<Manifest Include="$(ApplicationManifest)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user