mirror of
https://github.com/microsoft/PowerToys
synced 2025-09-01 15:05:12 +00:00
Registry Preview UI (#27266)
* Registry Preview * CommandBar * titlebar and font size * titlebar text foreground * apply feedback * apply feedback * fix spacing
This commit is contained in:
@@ -7,173 +7,154 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:winuiex="using:WinUIEx"
|
xmlns:winuiex="using:WinUIEx"
|
||||||
Closed="Window_Closed"
|
Closed="Window_Closed"
|
||||||
|
MinWidth="480"
|
||||||
|
MinHeight="320"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<Window.SystemBackdrop>
|
<Window.SystemBackdrop>
|
||||||
<MicaBackdrop />
|
<MicaBackdrop />
|
||||||
</Window.SystemBackdrop>
|
</Window.SystemBackdrop>
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="32" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid
|
<Grid
|
||||||
x:Name="titleBar"
|
x:Name="titleBar"
|
||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
|
Height="32"
|
||||||
|
ColumnSpacing="16"
|
||||||
|
Margin="16,0"
|
||||||
IsHitTestVisible="True">
|
IsHitTestVisible="True">
|
||||||
<StackPanel
|
<Grid.ColumnDefinitions>
|
||||||
Margin="8,8,8,8"
|
<!--<ColumnDefinition x:Name="LeftPaddingColumn" Width="0"/>-->
|
||||||
VerticalAlignment="Bottom"
|
<ColumnDefinition x:Name="IconColumn" Width="Auto"/>
|
||||||
Orientation="Horizontal">
|
<ColumnDefinition x:Name="TitleColumn" Width="Auto"/>
|
||||||
<Image Source="app.ico"/>
|
<!--<ColumnDefinition x:Name="RightPaddingColumn" Width="0"/>-->
|
||||||
<TextBlock
|
</Grid.ColumnDefinitions>
|
||||||
x:Name="titleBarText"
|
<Image
|
||||||
Margin="8,0,0,0"
|
Source="app.ico"
|
||||||
FontSize="12"
|
Grid.Column="0"
|
||||||
Style="{StaticResource CaptionTextBlockStyle}"
|
VerticalAlignment="Center"
|
||||||
Text="{Binding ApplicationTitle}" />
|
Width="16"
|
||||||
</StackPanel>
|
Height="16"/>
|
||||||
|
<TextBlock
|
||||||
|
x:Name="titleBarText"
|
||||||
|
Grid.Column="1"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Style="{StaticResource CaptionTextBlockStyle}"
|
||||||
|
Text="{Binding ApplicationTitle}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Grid
|
<Grid
|
||||||
Grid.Row="1"
|
|
||||||
x:Name="gridPreview"
|
x:Name="gridPreview"
|
||||||
|
Grid.Row="1"
|
||||||
Width="Auto"
|
Width="Auto"
|
||||||
Height="Auto"
|
Height="Auto"
|
||||||
x:FieldModifier="public"
|
x:FieldModifier="public"
|
||||||
Loaded="GridPreview_Loaded"
|
Loaded="GridPreview_Loaded"
|
||||||
TabFocusNavigation="Cycle">
|
TabFocusNavigation="Cycle"
|
||||||
|
Margin="12">
|
||||||
<Grid.Resources>
|
<Grid.Resources>
|
||||||
<Style x:Key="GridCardStyle" TargetType="Grid">
|
<Style x:Key="GridCardStyle" TargetType="Border">
|
||||||
<Style.Setters>
|
<Style.Setters>
|
||||||
<Setter Property="Background" Value="{ThemeResource CardBackgroundFillColorDefaultBrush}" />
|
<Setter Property="Background" Value="{ThemeResource CardBackgroundFillColorDefaultBrush}" />
|
||||||
<Setter Property="BorderThickness" Value="1" />
|
<Setter Property="BorderThickness" Value="1" />
|
||||||
<Setter Property="BorderBrush" Value="{ThemeResource CardStrokeColorDefaultBrush}" />
|
<Setter Property="BorderBrush" Value="{ThemeResource CardStrokeColorDefaultBrush}" />
|
||||||
|
<Setter Property="CornerRadius" Value="{StaticResource OverlayCornerRadius}"/>
|
||||||
</Style.Setters>
|
</Style.Setters>
|
||||||
</Style>
|
</Style>
|
||||||
</Grid.Resources>
|
</Grid.Resources>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<!-- Left, Splitter, Right -->
|
<!-- Left, Splitter, Right -->
|
||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
<ColumnDefinition Width="6" />
|
<ColumnDefinition Width="8" />
|
||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<!-- CommandBar, Tree, Splitter, List, StackPanel -->
|
<!-- CommandBar, Tree, Splitter, List -->
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
<RowDefinition Height="6" />
|
<RowDefinition Height="8" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<Grid
|
<Border Style="{StaticResource GridCardStyle}"
|
||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Grid.ColumnSpan="3"
|
Grid.ColumnSpan="3"
|
||||||
Margin="8,0,8,8"
|
Margin="0,0,0,12">
|
||||||
CornerRadius="{StaticResource OverlayCornerRadius}"
|
|
||||||
Style="{StaticResource GridCardStyle}">
|
|
||||||
<CommandBar
|
<CommandBar
|
||||||
Name="commandBar"
|
Name="commandBar"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
|
DefaultLabelPosition="Right">
|
||||||
BorderBrush="Transparent"
|
|
||||||
BorderThickness="0"
|
|
||||||
DefaultLabelPosition="Right"
|
|
||||||
IsOpen="True"
|
|
||||||
IsTabStop="False">
|
|
||||||
|
|
||||||
<AppBarButton
|
<AppBarButton
|
||||||
x:Name="openButton"
|
x:Name="openButton"
|
||||||
x:Uid="OpenButton"
|
x:Uid="OpenButton"
|
||||||
HorizontalAlignment="Left"
|
Click="OpenButton_Click">
|
||||||
Click="OpenButton_Click"
|
|
||||||
IsTabStop="False">
|
|
||||||
<AppBarButton.Icon>
|
<AppBarButton.Icon>
|
||||||
<FontIcon FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph=""/>
|
<FontIcon Glyph=""/>
|
||||||
</AppBarButton.Icon>
|
</AppBarButton.Icon>
|
||||||
<AppBarButton.KeyboardAccelerators>
|
<AppBarButton.KeyboardAccelerators>
|
||||||
<KeyboardAccelerator Key="O" Modifiers="Control" />
|
<KeyboardAccelerator Key="O" Modifiers="Control" />
|
||||||
</AppBarButton.KeyboardAccelerators>
|
</AppBarButton.KeyboardAccelerators>
|
||||||
</AppBarButton>
|
</AppBarButton>
|
||||||
<AppBarSeparator />
|
|
||||||
<AppBarButton
|
<AppBarButton
|
||||||
x:Name="saveButton"
|
x:Name="refreshButton"
|
||||||
x:Uid="SaveButton"
|
x:Uid="RefreshButton"
|
||||||
HorizontalAlignment="Left"
|
Icon="Refresh"
|
||||||
Click="SaveButton_Click"
|
Click="RefreshButton_Click">
|
||||||
IsEnabled="False"
|
|
||||||
IsTabStop="False">
|
|
||||||
<AppBarButton.Icon>
|
|
||||||
<FontIcon FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph=""/>
|
|
||||||
</AppBarButton.Icon>
|
|
||||||
<AppBarButton.KeyboardAccelerators>
|
|
||||||
<KeyboardAccelerator Key="S" Modifiers="Control" />
|
|
||||||
</AppBarButton.KeyboardAccelerators>
|
|
||||||
</AppBarButton>
|
|
||||||
<AppBarButton
|
|
||||||
x:Name="saveAsButton"
|
|
||||||
x:Uid="SaveAsButton"
|
|
||||||
HorizontalAlignment="Left"
|
|
||||||
Click="SaveAsButton_Click"
|
|
||||||
IsEnabled="True"
|
|
||||||
IsTabStop="False">
|
|
||||||
<AppBarButton.Icon>
|
|
||||||
<FontIcon FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph=""/>
|
|
||||||
</AppBarButton.Icon>
|
|
||||||
<AppBarButton.KeyboardAccelerators>
|
|
||||||
<KeyboardAccelerator Key="S" Modifiers="Control,Shift" />
|
|
||||||
</AppBarButton.KeyboardAccelerators>
|
|
||||||
</AppBarButton>
|
|
||||||
<AppBarButton
|
|
||||||
x:Name="editButton"
|
|
||||||
x:Uid="EditButton"
|
|
||||||
HorizontalAlignment="Left"
|
|
||||||
Click="EditButton_Click"
|
|
||||||
IsTabStop="False">
|
|
||||||
<AppBarButton.Icon>
|
|
||||||
<FontIcon FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph=""/>
|
|
||||||
</AppBarButton.Icon>
|
|
||||||
<AppBarButton.KeyboardAccelerators>
|
|
||||||
<KeyboardAccelerator Key="E" Modifiers="Control" />
|
|
||||||
</AppBarButton.KeyboardAccelerators>
|
|
||||||
</AppBarButton>
|
|
||||||
<AppBarButton
|
|
||||||
x:Name="refreshButton"
|
|
||||||
x:Uid="RefreshButton"
|
|
||||||
HorizontalAlignment="Left"
|
|
||||||
Click="RefreshButton_Click"
|
|
||||||
IsTabStop="False">
|
|
||||||
<AppBarButton.Icon>
|
|
||||||
<FontIcon FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph=""/>
|
|
||||||
</AppBarButton.Icon>
|
|
||||||
<AppBarButton.KeyboardAccelerators>
|
<AppBarButton.KeyboardAccelerators>
|
||||||
<KeyboardAccelerator Key="F5" />
|
<KeyboardAccelerator Key="F5" />
|
||||||
</AppBarButton.KeyboardAccelerators>
|
</AppBarButton.KeyboardAccelerators>
|
||||||
</AppBarButton>
|
</AppBarButton>
|
||||||
<AppBarSeparator />
|
<AppBarSeparator />
|
||||||
<AppBarButton
|
<AppBarButton
|
||||||
x:Name="writeButton"
|
x:Name="saveButton"
|
||||||
x:Uid="WriteButton"
|
x:Uid="SaveButton"
|
||||||
HorizontalAlignment="Left"
|
Icon="Save"
|
||||||
Click="WriteButton_Click"
|
Click="SaveButton_Click"
|
||||||
IsTabStop="False">
|
IsEnabled="False">
|
||||||
|
<AppBarButton.KeyboardAccelerators>
|
||||||
|
<KeyboardAccelerator Key="S" Modifiers="Control" />
|
||||||
|
</AppBarButton.KeyboardAccelerators>
|
||||||
|
</AppBarButton>
|
||||||
|
<AppBarButton
|
||||||
|
x:Name="saveAsButton"
|
||||||
|
x:Uid="SaveAsButton"
|
||||||
|
Click="SaveAsButton_Click"
|
||||||
|
IsEnabled="True">
|
||||||
<AppBarButton.Icon>
|
<AppBarButton.Icon>
|
||||||
<FontIcon FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph=""/>
|
<FontIcon Glyph=""/>
|
||||||
</AppBarButton.Icon>
|
</AppBarButton.Icon>
|
||||||
<AppBarButton.KeyboardAccelerators>
|
<AppBarButton.KeyboardAccelerators>
|
||||||
<KeyboardAccelerator Key="W" Modifiers="Control" />
|
<KeyboardAccelerator Key="S" Modifiers="Control,Shift" />
|
||||||
</AppBarButton.KeyboardAccelerators>
|
</AppBarButton.KeyboardAccelerators>
|
||||||
</AppBarButton>
|
</AppBarButton>
|
||||||
<AppBarSeparator />
|
<AppBarSeparator />
|
||||||
|
<AppBarButton
|
||||||
|
x:Name="editButton"
|
||||||
|
x:Uid="EditButton"
|
||||||
|
Icon="Edit"
|
||||||
|
Click="EditButton_Click">
|
||||||
|
<AppBarButton.KeyboardAccelerators>
|
||||||
|
<KeyboardAccelerator Key="E" Modifiers="Control" />
|
||||||
|
</AppBarButton.KeyboardAccelerators>
|
||||||
|
</AppBarButton>
|
||||||
|
<AppBarButton
|
||||||
|
x:Name="writeButton"
|
||||||
|
x:Uid="WriteButton"
|
||||||
|
Click="WriteButton_Click">
|
||||||
|
<AppBarButton.KeyboardAccelerators>
|
||||||
|
<KeyboardAccelerator Key="W" Modifiers="Control" />
|
||||||
|
</AppBarButton.KeyboardAccelerators>
|
||||||
|
</AppBarButton>
|
||||||
<AppBarButton
|
<AppBarButton
|
||||||
x:Name="registryButton"
|
x:Name="registryButton"
|
||||||
x:Uid="RegistryButton"
|
x:Uid="RegistryButton"
|
||||||
HorizontalAlignment="Left"
|
Click="RegistryButton_Click">
|
||||||
Click="RegistryButton_Click"
|
|
||||||
IsTabStop="False">
|
|
||||||
<AppBarButton.Icon>
|
|
||||||
<FontIcon FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph=""/>
|
|
||||||
</AppBarButton.Icon>
|
|
||||||
<AppBarButton.KeyboardAccelerators>
|
<AppBarButton.KeyboardAccelerators>
|
||||||
<KeyboardAccelerator Key="R" Modifiers="Control" />
|
<KeyboardAccelerator Key="R" Modifiers="Control" />
|
||||||
</AppBarButton.KeyboardAccelerators>
|
</AppBarButton.KeyboardAccelerators>
|
||||||
@@ -181,26 +162,21 @@
|
|||||||
<AppBarButton
|
<AppBarButton
|
||||||
x:Name="registryJumpToKeyButton"
|
x:Name="registryJumpToKeyButton"
|
||||||
x:Uid="RegistryJumpToKeyButton"
|
x:Uid="RegistryJumpToKeyButton"
|
||||||
HorizontalAlignment="Left"
|
|
||||||
Click="RegistryJumpToKeyButton_Click"
|
Click="RegistryJumpToKeyButton_Click"
|
||||||
IsTabStop="False"
|
|
||||||
IsEnabled="True">
|
IsEnabled="True">
|
||||||
<AppBarButton.Icon>
|
|
||||||
<FontIcon FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph=""/>
|
|
||||||
</AppBarButton.Icon>
|
|
||||||
<AppBarButton.KeyboardAccelerators>
|
<AppBarButton.KeyboardAccelerators>
|
||||||
<KeyboardAccelerator Key="R" Modifiers="Control,Shift" />
|
<KeyboardAccelerator Key="R" Modifiers="Control,Shift" />
|
||||||
</AppBarButton.KeyboardAccelerators>
|
</AppBarButton.KeyboardAccelerators>
|
||||||
</AppBarButton>
|
</AppBarButton>
|
||||||
</CommandBar>
|
</CommandBar>
|
||||||
</Grid>
|
</Border>
|
||||||
|
|
||||||
<TextBox
|
<TextBox
|
||||||
x:Name="textBox"
|
x:Name="textBox"
|
||||||
x:Uid="textBox"
|
x:Uid="textBox"
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Grid.RowSpan="3"
|
Grid.RowSpan="3"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Margin="8,0,0,8"
|
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
VerticalAlignment="Stretch"
|
VerticalAlignment="Stretch"
|
||||||
AcceptsReturn="True"
|
AcceptsReturn="True"
|
||||||
@@ -219,18 +195,13 @@
|
|||||||
CornerRadius="{StaticResource OverlayCornerRadius}"
|
CornerRadius="{StaticResource OverlayCornerRadius}"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Grid
|
<Border Style="{StaticResource GridCardStyle}"
|
||||||
Grid.Row="1"
|
|
||||||
Grid.Column="2"
|
Grid.Column="2"
|
||||||
Margin="0,0,8,0"
|
Grid.Row="1">
|
||||||
CornerRadius="{StaticResource OverlayCornerRadius}"
|
|
||||||
Style="{StaticResource GridCardStyle}">
|
|
||||||
<TreeView
|
<TreeView
|
||||||
x:Name="treeView"
|
x:Name="treeView"
|
||||||
Padding="0,0,0,0"
|
|
||||||
AllowDrop="False"
|
AllowDrop="False"
|
||||||
AllowFocusOnInteraction="True"
|
AllowFocusOnInteraction="True"
|
||||||
Background="Transparent"
|
|
||||||
CanDragItems="False"
|
CanDragItems="False"
|
||||||
CanReorderItems="False"
|
CanReorderItems="False"
|
||||||
IsEnabled="True"
|
IsEnabled="True"
|
||||||
@@ -245,36 +216,31 @@
|
|||||||
<TreeView.ItemTemplate>
|
<TreeView.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<StackPanel
|
<StackPanel
|
||||||
Padding="0,0,0,0"
|
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
IsTabStop="False"
|
IsTabStop="False"
|
||||||
Orientation="Horizontal">
|
Orientation="Horizontal"
|
||||||
|
Spacing="8">
|
||||||
<Image
|
<Image
|
||||||
MaxWidth="16"
|
MaxWidth="16"
|
||||||
MaxHeight="16"
|
MaxHeight="16"
|
||||||
Source="{Binding Path=Content.Image}"
|
Source="{Binding Path=Content.Image}"
|
||||||
ToolTipService.ToolTip="{Binding Path=Content.ToolTipText}" />
|
ToolTipService.ToolTip="{Binding Path=Content.ToolTipText}" />
|
||||||
<TextBlock Padding="5,0,0,0" Text="{Binding Path=Content.Name}" />
|
<TextBlock Text="{Binding Path=Content.Name}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</TreeView.ItemTemplate>
|
</TreeView.ItemTemplate>
|
||||||
</TreeView>
|
</TreeView>
|
||||||
</Grid>
|
</Border>
|
||||||
<Grid
|
|
||||||
|
<Border Style="{StaticResource GridCardStyle}"
|
||||||
Grid.Row="3"
|
Grid.Row="3"
|
||||||
Grid.RowSpan="2"
|
Grid.Column="2">
|
||||||
Grid.Column="2"
|
|
||||||
Margin="0,0,8,8"
|
|
||||||
CornerRadius="{StaticResource OverlayCornerRadius}"
|
|
||||||
Style="{StaticResource GridCardStyle}">
|
|
||||||
<controls:DataGrid
|
<controls:DataGrid
|
||||||
x:Name="dataGrid"
|
x:Name="dataGrid"
|
||||||
AllowDrop="False"
|
AllowDrop="False"
|
||||||
AreRowDetailsFrozen="True"
|
AreRowDetailsFrozen="True"
|
||||||
AutoGenerateColumns="False"
|
AutoGenerateColumns="False"
|
||||||
Background="Transparent"
|
|
||||||
CanDrag="False"
|
CanDrag="False"
|
||||||
CornerRadius="{StaticResource OverlayCornerRadius}"
|
|
||||||
HeadersVisibility="Column"
|
HeadersVisibility="Column"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
IsTabStop="true"
|
IsTabStop="true"
|
||||||
@@ -289,12 +255,8 @@
|
|||||||
IsReadOnly="True">
|
IsReadOnly="True">
|
||||||
<controls:DataGridTemplateColumn.CellTemplate>
|
<controls:DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<StackPanel VerticalAlignment="Center" Orientation="Horizontal">
|
<StackPanel VerticalAlignment="Center" Orientation="Horizontal"
|
||||||
<TextBlock
|
Margin="4" Spacing="8">
|
||||||
Padding="10,0,0,0"
|
|
||||||
FontSize="14"
|
|
||||||
IsTabStop="False"
|
|
||||||
Text=" " />
|
|
||||||
<Image
|
<Image
|
||||||
MaxWidth="16"
|
MaxWidth="16"
|
||||||
MaxHeight="16"
|
MaxHeight="16"
|
||||||
@@ -302,10 +264,9 @@
|
|||||||
Source="{Binding ImageUri}"
|
Source="{Binding ImageUri}"
|
||||||
ToolTipService.ToolTip="{Binding ToolTipText}" />
|
ToolTipService.ToolTip="{Binding ToolTipText}" />
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Padding="5,0,10,0"
|
|
||||||
FontSize="14"
|
|
||||||
IsTabStop="False"
|
IsTabStop="False"
|
||||||
Text="{Binding Name}" />
|
Text="{Binding Name}"
|
||||||
|
Style="{StaticResource CaptionTextBlockStyle}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</controls:DataGridTemplateColumn.CellTemplate>
|
</controls:DataGridTemplateColumn.CellTemplate>
|
||||||
@@ -314,20 +275,22 @@
|
|||||||
x:Uid="TypeColumn"
|
x:Uid="TypeColumn"
|
||||||
Width="Auto"
|
Width="Auto"
|
||||||
Binding="{Binding Type}"
|
Binding="{Binding Type}"
|
||||||
FontSize="14" />
|
FontSize="{StaticResource CaptionTextBlockFontSize}" />
|
||||||
<controls:DataGridTextColumn
|
<controls:DataGridTextColumn
|
||||||
x:Uid="ValueColumn"
|
x:Uid="ValueColumn"
|
||||||
Width="Auto"
|
Width="Auto"
|
||||||
Binding="{Binding Value}"
|
Binding="{Binding Value}"
|
||||||
FontSize="14" />
|
FontSize="{StaticResource CaptionTextBlockFontSize}" />
|
||||||
</controls:DataGrid.Columns>
|
</controls:DataGrid.Columns>
|
||||||
</controls:DataGrid>
|
</controls:DataGrid>
|
||||||
</Grid>
|
</Border>
|
||||||
|
|
||||||
<controls:GridSplitter
|
<controls:GridSplitter
|
||||||
x:Name="verticalSplitter"
|
x:Name="verticalSplitter"
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Grid.RowSpan="4"
|
Grid.RowSpan="3"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Stretch"
|
VerticalAlignment="Stretch"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
CursorBehavior="ChangeOnSplitterHover"
|
CursorBehavior="ChangeOnSplitterHover"
|
||||||
@@ -338,8 +301,8 @@
|
|||||||
Grid.Row="2"
|
Grid.Row="2"
|
||||||
Grid.Column="2"
|
Grid.Column="2"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
|
VerticalAlignment="Center"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
CornerRadius="4"
|
|
||||||
CursorBehavior="ChangeOnSplitterHover"
|
CursorBehavior="ChangeOnSplitterHover"
|
||||||
GripperCursor="SizeNorthSouth"
|
GripperCursor="SizeNorthSouth"
|
||||||
IsTabStop="False" />
|
IsTabStop="False" />
|
||||||
|
@@ -6,7 +6,9 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using Microsoft.UI;
|
using Microsoft.UI;
|
||||||
|
using Microsoft.UI.Xaml;
|
||||||
using Microsoft.UI.Xaml.Controls;
|
using Microsoft.UI.Xaml.Controls;
|
||||||
|
using Microsoft.UI.Xaml.Media;
|
||||||
using Windows.ApplicationModel.Resources;
|
using Windows.ApplicationModel.Resources;
|
||||||
using Windows.Data.Json;
|
using Windows.Data.Json;
|
||||||
using Windows.Graphics;
|
using Windows.Graphics;
|
||||||
@@ -51,6 +53,7 @@ namespace RegistryPreview
|
|||||||
appWindow = Microsoft.UI.Windowing.AppWindow.GetFromWindowId(windowId);
|
appWindow = Microsoft.UI.Windowing.AppWindow.GetFromWindowId(windowId);
|
||||||
appWindow.SetIcon("app.ico");
|
appWindow.SetIcon("app.ico");
|
||||||
appWindow.Closing += AppWindow_Closing;
|
appWindow.Closing += AppWindow_Closing;
|
||||||
|
Activated += MainWindow_Activated;
|
||||||
|
|
||||||
// Extend the canvas to include the title bar so the app can support theming
|
// Extend the canvas to include the title bar so the app can support theming
|
||||||
ExtendsContentIntoTitleBar = true;
|
ExtendsContentIntoTitleBar = true;
|
||||||
@@ -95,5 +98,19 @@ namespace RegistryPreview
|
|||||||
UpdateWindowTitle(resourceLoader.GetString("FileNotFound"));
|
UpdateWindowTitle(resourceLoader.GetString("FileNotFound"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void MainWindow_Activated(object sender, WindowActivatedEventArgs args)
|
||||||
|
{
|
||||||
|
if (args.WindowActivationState == WindowActivationState.Deactivated)
|
||||||
|
{
|
||||||
|
titleBarText.Foreground =
|
||||||
|
(SolidColorBrush)App.Current.Resources["WindowCaptionForegroundDisabled"];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
titleBarText.Foreground =
|
||||||
|
(SolidColorBrush)App.Current.Resources["WindowCaptionForeground"];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -118,7 +118,7 @@
|
|||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<data name="EditButton.Label" xml:space="preserve">
|
<data name="EditButton.Label" xml:space="preserve">
|
||||||
<value>Edit file...</value>
|
<value>Edit</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ErrorDialogTitle" xml:space="preserve">
|
<data name="ErrorDialogTitle" xml:space="preserve">
|
||||||
<value>Error</value>
|
<value>Error</value>
|
||||||
@@ -127,7 +127,7 @@
|
|||||||
<value>The REG file editor could not be opened.</value>
|
<value>The REG file editor could not be opened.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="FileNotFound" xml:space="preserve">
|
<data name="FileNotFound" xml:space="preserve">
|
||||||
<value>File was not found!</value>
|
<value>File was not found</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="FileSaveError" xml:space="preserve">
|
<data name="FileSaveError" xml:space="preserve">
|
||||||
<value>The REG file cannot be written to.</value>
|
<value>The REG file cannot be written to.</value>
|
||||||
@@ -142,16 +142,16 @@
|
|||||||
<value>(Invalid QWORD (64-bit) value)</value>
|
<value>(Invalid QWORD (64-bit) value)</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="InvalidRegistryFile" xml:space="preserve">
|
<data name="InvalidRegistryFile" xml:space="preserve">
|
||||||
<value> doesn't appear to be a valid registry file!</value>
|
<value> appears to be an invalid registry file.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="InvalidRegistryFileTitle" xml:space="preserve">
|
<data name="InvalidRegistryFileTitle" xml:space="preserve">
|
||||||
<value>File was not a Registry file!</value>
|
<value>File was not a Registry file</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LargeRegistryFile" xml:space="preserve">
|
<data name="LargeRegistryFile" xml:space="preserve">
|
||||||
<value> is larger than 10MB which is too large for this application.</value>
|
<value> is larger than 10MB which is too large for this application.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LargeRegistryFileTitle" xml:space="preserve">
|
<data name="LargeRegistryFileTitle" xml:space="preserve">
|
||||||
<value>File is too large!</value>
|
<value>File is too large</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="NameColumn.Header" xml:space="preserve">
|
<data name="NameColumn.Header" xml:space="preserve">
|
||||||
<value>Name</value>
|
<value>Name</value>
|
||||||
@@ -161,36 +161,34 @@
|
|||||||
</data>
|
</data>
|
||||||
<data name="OkButtonText" xml:space="preserve">
|
<data name="OkButtonText" xml:space="preserve">
|
||||||
<value>OK</value>
|
<value>OK</value>
|
||||||
|
<comment>as on the OK button</comment>
|
||||||
</data>
|
</data>
|
||||||
<data name="OpenButton.Label" xml:space="preserve">
|
<data name="OpenButton.Label" xml:space="preserve">
|
||||||
<value>Open file...</value>
|
<value>Open…</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="OpenDialogTitle" xml:space="preserve">
|
<data name="OpenDialogTitle" xml:space="preserve">
|
||||||
<value>Open Registry file...</value>
|
<value>Open Registry file</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="RefreshButton.Label" xml:space="preserve">
|
<data name="RefreshButton.Label" xml:space="preserve">
|
||||||
<value>Reload from file</value>
|
<value>Reload</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="RegistryButton.Label" xml:space="preserve">
|
<data name="RegistryButton.Label" xml:space="preserve">
|
||||||
<value>Open Registry Editor...</value>
|
<value>Open Registry Editor</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="RegistryJumpToKeyButton.Label" xml:space="preserve">
|
<data name="RegistryJumpToKeyButton.Label" xml:space="preserve">
|
||||||
<value>Open Key...</value>
|
<value>Open Key</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SaveAsButton.Label" xml:space="preserve">
|
<data name="SaveAsButton.Label" xml:space="preserve">
|
||||||
<value>Save file as...</value>
|
<value>Save as…</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SaveButton.Label" xml:space="preserve">
|
<data name="SaveButton.Label" xml:space="preserve">
|
||||||
<value>Save file</value>
|
|
||||||
</data>
|
|
||||||
<data name="SaveButtonText" xml:space="preserve">
|
|
||||||
<value>Save</value>
|
<value>Save</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SuggestFileName" xml:space="preserve">
|
<data name="SuggestFileName" xml:space="preserve">
|
||||||
<value>New Registry File</value>
|
<value>New Registry file</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="textBox.PlaceholderText" xml:space="preserve">
|
<data name="textBox.PlaceholderText" xml:space="preserve">
|
||||||
<value>Registry file text will appear here...</value>
|
<value>Registry file text will appear here</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="titleBarText.ApplicationTitle" xml:space="preserve">
|
<data name="titleBarText.ApplicationTitle" xml:space="preserve">
|
||||||
<value>Registry Preview</value>
|
<value>Registry Preview</value>
|
||||||
@@ -218,9 +216,10 @@
|
|||||||
</data>
|
</data>
|
||||||
<data name="TypeColumn.Header" xml:space="preserve">
|
<data name="TypeColumn.Header" xml:space="preserve">
|
||||||
<value>Type</value>
|
<value>Type</value>
|
||||||
|
<comment>noun, as in "a type of..."</comment>
|
||||||
</data>
|
</data>
|
||||||
<data name="UACDialogError" xml:space="preserve">
|
<data name="UACDialogError" xml:space="preserve">
|
||||||
<value>You must click Yes on the previous popup if you want to run the Registry application.</value>
|
<value>Click Yes on the User Account Control dialog to run the application.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="UACDialogTitle" xml:space="preserve">
|
<data name="UACDialogTitle" xml:space="preserve">
|
||||||
<value>User Account Control</value>
|
<value>User Account Control</value>
|
||||||
@@ -229,13 +228,13 @@
|
|||||||
<value>Value</value>
|
<value>Value</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="WriteButton.Label" xml:space="preserve">
|
<data name="WriteButton.Label" xml:space="preserve">
|
||||||
<value>Write to Registry...</value>
|
<value>Write to Registry</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="YesNoCancelDialogCloseButtonText" xml:space="preserve">
|
<data name="YesNoCancelDialogCloseButtonText" xml:space="preserve">
|
||||||
<value>Cancel</value>
|
<value>Cancel</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="YesNoCancelDialogContent" xml:space="preserve">
|
<data name="YesNoCancelDialogContent" xml:space="preserve">
|
||||||
<value>Changes were made to the text file. Do you want to save your changes?</value>
|
<value>Save changes?</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="YesNoCancelDialogPrimaryButtonText" xml:space="preserve">
|
<data name="YesNoCancelDialogPrimaryButtonText" xml:space="preserve">
|
||||||
<value>Save</value>
|
<value>Save</value>
|
||||||
|
Reference in New Issue
Block a user