diff --git a/src/modules/registrypreview/RegistryPreviewUI/MainWindow.xaml b/src/modules/registrypreview/RegistryPreviewUI/MainWindow.xaml
index eed17610f9..cfafc62993 100644
--- a/src/modules/registrypreview/RegistryPreviewUI/MainWindow.xaml
+++ b/src/modules/registrypreview/RegistryPreviewUI/MainWindow.xaml
@@ -7,173 +7,154 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:winuiex="using:WinUIEx"
Closed="Window_Closed"
+ MinWidth="480"
+ MinHeight="320"
mc:Ignorable="d">
+
-
+
-
-
-
-
+
+
+
+
+
+
+
+
+ TabFocusNavigation="Cycle"
+ Margin="12">
-
-
+
-
+
-
+
-
+ Margin="0,0,0,12">
+
+ DefaultLabelPosition="Right">
+ x:Name="openButton"
+ x:Uid="OpenButton"
+ Click="OpenButton_Click">
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ x:Name="refreshButton"
+ x:Uid="RefreshButton"
+ Icon="Refresh"
+ Click="RefreshButton_Click">
+ x:Name="saveButton"
+ x:Uid="SaveButton"
+ Icon="Save"
+ Click="SaveButton_Click"
+ IsEnabled="False">
+
+
+
+
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+ Click="RegistryButton_Click">
@@ -181,26 +162,21 @@
-
-
-
-
+
+
-
+ Grid.Row="1">
+ Orientation="Horizontal"
+ Spacing="8">
-
+
-
-
+
+
+ Grid.Column="2">
-
-
+
+ Text="{Binding Name}"
+ Style="{StaticResource CaptionTextBlockStyle}"/>
@@ -314,20 +275,22 @@
x:Uid="TypeColumn"
Width="Auto"
Binding="{Binding Type}"
- FontSize="14" />
+ FontSize="{StaticResource CaptionTextBlockFontSize}" />
+ FontSize="{StaticResource CaptionTextBlockFontSize}" />
-
+
+
diff --git a/src/modules/registrypreview/RegistryPreviewUI/MainWindow.xaml.cs b/src/modules/registrypreview/RegistryPreviewUI/MainWindow.xaml.cs
index b20903b81d..42b2367a55 100644
--- a/src/modules/registrypreview/RegistryPreviewUI/MainWindow.xaml.cs
+++ b/src/modules/registrypreview/RegistryPreviewUI/MainWindow.xaml.cs
@@ -6,7 +6,9 @@ using System;
using System.Collections.Generic;
using System.IO;
using Microsoft.UI;
+using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
+using Microsoft.UI.Xaml.Media;
using Windows.ApplicationModel.Resources;
using Windows.Data.Json;
using Windows.Graphics;
@@ -51,6 +53,7 @@ namespace RegistryPreview
appWindow = Microsoft.UI.Windowing.AppWindow.GetFromWindowId(windowId);
appWindow.SetIcon("app.ico");
appWindow.Closing += AppWindow_Closing;
+ Activated += MainWindow_Activated;
// Extend the canvas to include the title bar so the app can support theming
ExtendsContentIntoTitleBar = true;
@@ -95,5 +98,19 @@ namespace RegistryPreview
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"];
+ }
+ }
}
}
diff --git a/src/modules/registrypreview/RegistryPreviewUI/Strings/en-US/Resources.resw b/src/modules/registrypreview/RegistryPreviewUI/Strings/en-US/Resources.resw
index 03fc8da221..ec92378548 100644
--- a/src/modules/registrypreview/RegistryPreviewUI/Strings/en-US/Resources.resw
+++ b/src/modules/registrypreview/RegistryPreviewUI/Strings/en-US/Resources.resw
@@ -118,7 +118,7 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- Edit file...
+ Edit
Error
@@ -127,7 +127,7 @@
The REG file editor could not be opened.
- File was not found!
+ File was not found
The REG file cannot be written to.
@@ -142,16 +142,16 @@
(Invalid QWORD (64-bit) value)
- doesn't appear to be a valid registry file!
+ appears to be an invalid registry file.
- File was not a Registry file!
+ File was not a Registry file
is larger than 10MB which is too large for this application.
- File is too large!
+ File is too large
Name
@@ -161,36 +161,34 @@
OK
+ as on the OK button
- Open file...
+ Open…
- Open Registry file...
+ Open Registry file
- Reload from file
+ Reload
- Open Registry Editor...
+ Open Registry Editor
- Open Key...
+ Open Key
- Save file as...
+ Save as…
- Save file
-
-
Save
- New Registry File
+ New Registry file
- Registry file text will appear here...
+ Registry file text will appear here
Registry Preview
@@ -218,9 +216,10 @@
Type
+ noun, as in "a type of..."
- You must click Yes on the previous popup if you want to run the Registry application.
+ Click Yes on the User Account Control dialog to run the application.
User Account Control
@@ -229,13 +228,13 @@
Value
- Write to Registry...
+ Write to Registry
Cancel
- Changes were made to the text file. Do you want to save your changes?
+ Save changes?
Save