Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RegistryPreview] Enhanced preview for value data #37689

Draft
wants to merge 30 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
8d45aba
button and dummy dialog
htcfreek Feb 28, 2025
a8a75db
fill dialog with real data from datagrid
htcfreek Feb 28, 2025
56ab216
last changes
htcfreek Feb 28, 2025
9c48b9e
implement different layouts and improve dialoge
htcfreek Feb 28, 2025
e602563
code changes
htcfreek Feb 28, 2025
c8d1d5e
fix typos
htcfreek Feb 28, 2025
a9a9585
binary preview
htcfreek Feb 28, 2025
691b9ee
changes
htcfreek Feb 28, 2025
6bd2d55
changes
htcfreek Feb 28, 2025
b7ec010
fixes and code improvements
htcfreek Mar 1, 2025
15a89c5
add HexBox control
htcfreek Mar 1, 2025
dddb4c4
finally implement hex box
htcfreek Mar 1, 2025
7bb40dc
spell check + Notice.md
htcfreek Mar 1, 2025
8d14497
spell check
htcfreek Mar 1, 2025
6c95eae
translation and cleanup usings
htcfreek Mar 1, 2025
d60b83c
refactor code
htcfreek Mar 2, 2025
08f935f
changes for different view in binary preview
htcfreek Mar 2, 2025
f0fe236
finish implementation of extendet binary preview
htcfreek Mar 2, 2025
52e4d44
fix typos
htcfreek Mar 2, 2025
7db3c89
last changes
htcfreek Mar 2, 2025
a533c9d
cleanup
htcfreek Mar 3, 2025
12e4645
Color adjustments
htcfreek Mar 5, 2025
f4918f7
code styling
htcfreek Mar 5, 2025
ea9a239
use converter
htcfreek Mar 5, 2025
c06d4bc
Bump versions of HexBox.WinUI and Microsoft.Windows.CsWinRT
htcfreek Mar 6, 2025
62ca584
code fixes
htcfreek Mar 6, 2025
1fc2a88
last changes
htcfreek Mar 6, 2025
7393a33
High contrast fixes
htcfreek Mar 6, 2025
420e1eb
code improvements
htcfreek Mar 6, 2025
a918707
update Notice.md
htcfreek Mar 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
button and dummy dialog
  • Loading branch information
htcfreek committed Feb 28, 2025
commit 8d45aba807d75b5421a3c3a9f33b2a350a76e81e
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using Microsoft.UI.Xaml.Controls;
using Windows.Foundation.Metadata;

namespace RegistryPreviewUILib
{
public sealed partial class RegistryPreviewMainPage : Page
{
internal void ShowEnhancedDataPreview(string name, string type, string value)
{
ContentDialog contentDialog = new ContentDialog()
{
Title = "Value preview",
Content = $"{name} - {type} - {value}",
CloseButtonText = "Close",
DefaultButton = ContentDialogButton.None,
};

// Use this code to associate the dialog to the appropriate AppWindow by setting
// the dialog's XamlRoot to the same XamlRoot as an element that is already present in the AppWindow.
if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 8))
{
contentDialog.XamlRoot = this.Content.XamlRoot;
}

_ = contentDialog.ShowAsync();
}
}
}
Original file line number Diff line number Diff line change
@@ -357,5 +357,11 @@ private void MonacoEditor_TextChanged(object sender, EventArgs e)
saveButton.IsEnabled = true;
});
}

// Comand to show data preview
public void ButtonEnhancePreview_Click(object sender, RoutedEventArgs e)
{
ShowEnhancedDataPreview("test", "REG_SZ", "eee");
}
}
}
Original file line number Diff line number Diff line change
@@ -265,7 +265,8 @@
<StackPanel
Margin="4"
VerticalAlignment="Center"
Orientation="Horizontal">
Orientation="Horizontal"
Spacing="6">
<StackPanel.ContextFlyout>
<MenuFlyout>
<MenuFlyoutItem x:Uid="ContextMenu_CopyData" Command="{Binding CopyToClipboardData_Click}" />
@@ -274,11 +275,18 @@
<MenuFlyoutItem x:Uid="ContextMenu_CopyValueWithPath" Command="{Binding CopyToClipboardWithPath_Click}" />
</MenuFlyout>
</StackPanel.ContextFlyout>
<Button
Padding="2"
Click="ButtonEnhancePreview_Click"
Content="&#xe71e;"
FontFamily="{StaticResource SymbolThemeFontFamily}">
<ToolTipService.ToolTip>Show enhanced preview</ToolTipService.ToolTip>
</Button>
<TextBlock
VerticalAlignment="Center"
IsTabStop="False"
Style="{StaticResource CaptionTextBlockStyle}"
Text="{Binding ValueOneLine}"
ToolTipService.ToolTip="{Binding Value}" />
Text="{Binding ValueOneLine}" />
</StackPanel>
</DataTemplate>
</tk7controls:DataGridTemplateColumn.CellTemplate>
Original file line number Diff line number Diff line change
@@ -5,8 +5,6 @@
using System;
using System.Windows.Input;
using CommunityToolkit.Mvvm.Input;
using Microsoft.UI.Xaml;
using Windows.ApplicationModel.DataTransfer;

namespace RegistryPreviewUILib
{