tidy up the wallet info view layout.
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/WalletInfoView.xaml
WalletWasabi.Gui/Controls/WalletExplorer/WalletInfoView.xaml
<converters:LurkingWifeModeStringConverter x:Key="LurkingWifeModeStringConverter" />
<converters:BooleanStringConverter x:Key="BooleanStringConverter" />
</UserControl.Resources>
+ <UserControl.Styles>
+ <Style Selector="TextBox.keysTextBlock">
+ <Setter Property="TextWrapping" Value="Wrap" />
+ <Setter Property="AcceptsReturn" Value="True" />
+ <Setter Property="TextBlock.FontFamily" Value="{DynamicResource MonospacedFont}" />
+ </Style>
+ </UserControl.Styles>
<controls:GroupBox Title="{Binding Title}" BorderThickness="0" Classes="docTabContainer">
- <StackPanel>
- <controls:GroupBox Title="Keys" TextBlock.FontSize="16" Padding="30" Margin="0 10 0 0">
- <Grid Classes="content">
- <StackPanel Orientation="Vertical" Spacing="2">
- <StackPanel IsVisible="{Binding !IsWatchOnly}" Orientation="Horizontal">
+ <controls:GroupBox Title="Keys" TextBlock.FontSize="16" Margin="0 10 0 0">
+ <ScrollViewer x:Name="root" HorizontalScrollBarVisibility="Hidden">
+ <Grid Width="{Binding #root.Bounds.Width}" Classes="content">
+ <StackPanel Orientation="Vertical" Spacing="16" Margin="20">
+ <StackPanel IsVisible="{Binding !IsWatchOnly}" Margin="0 10 0 0" Spacing="10" Orientation="Horizontal">
+ <controls:TogglePasswordBox Text="{Binding Password}" MaxWidth="600" IsVisible="{Binding !ShowSensitiveKeys}">
+ <i:Interaction.Behaviors>
+ <behaviors:CommandOnEnterBehavior Command="{Binding ToggleSensitiveKeysCommand}" />
+ </i:Interaction.Behaviors>
+ </controls:TogglePasswordBox>
+
+ <Button VerticalAlignment="Top" Content="{Binding ShowSensitiveKeys, StringFormat=\{0\} Sensitive Keys, Converter={StaticResource BooleanStringConverter}, ConverterParameter=Hide:Show}" Command="{Binding ToggleSensitiveKeysCommand}" DockPanel.Dock="Right" />
+ </StackPanel>
+
+ <StackPanel IsVisible="{Binding !IsWatchOnly}" Spacing="4">
<TextBlock Text="Extended Master Private Key: " />
- <controls:ExtendedTextBox Text="{Binding ExtendedMasterPrivateKey}" Foreground="IndianRed" Classes="selectableTextBlock" />
+ <controls:ExtendedTextBox Text="{Binding ExtendedMasterPrivateKey}" Foreground="IndianRed" Classes="selectableTextBlock keysTextBlock" />
</StackPanel>
- <StackPanel IsVisible="{Binding !IsWatchOnly}" Orientation="Horizontal">
+
+ <StackPanel IsVisible="{Binding !IsWatchOnly}" Spacing="4">
<TextBlock Text="Extended Master zprv: " />
- <controls:ExtendedTextBox Text="{Binding ExtendedMasterZprv}" Foreground="IndianRed" Classes="selectableTextBlock" />
+ <controls:ExtendedTextBox Text="{Binding ExtendedMasterZprv}" Foreground="IndianRed" Classes="selectableTextBlock keysTextBlock" />
</StackPanel>
- <StackPanel Orientation="Horizontal">
+
+ <StackPanel Spacing="4">
<TextBlock Text="Extended Master Fingerprint: " />
- <controls:ExtendedTextBox Text="{Binding MasterKeyFingerprint}" Classes="selectableTextBlock" />
+ <controls:ExtendedTextBox Text="{Binding MasterKeyFingerprint}" Classes="selectableTextBlock keysTextBlock" />
</StackPanel>
- <StackPanel Orientation="Horizontal">
+
+ <StackPanel Spacing="4">
<TextBlock Text="Account Key Path: " />
- <controls:ExtendedTextBox Text="{Binding AccountKeyPath}" Classes="selectableTextBlock" />
+ <controls:ExtendedTextBox Text="{Binding AccountKeyPath}" Classes="selectableTextBlock keysTextBlock" />
</StackPanel>
- <StackPanel IsVisible="{Binding !IsWatchOnly}" Orientation="Horizontal">
+
+ <StackPanel Spacing="4" IsVisible="{Binding !IsWatchOnly}">
<TextBlock Text="Extended Account Private Key: " />
- <controls:ExtendedTextBox Text="{Binding ExtendedAccountPrivateKey}" Foreground="IndianRed" Classes="selectableTextBlock" />
+ <controls:ExtendedTextBox Text="{Binding ExtendedAccountPrivateKey}" Foreground="IndianRed" Classes="selectableTextBlock keysTextBlock" />
</StackPanel>
- <StackPanel IsVisible="{Binding !IsWatchOnly}" Orientation="Horizontal">
+
+ <StackPanel Spacing="4" IsVisible="{Binding !IsWatchOnly}">
<TextBlock Text="Extended Account zprv: " />
- <controls:ExtendedTextBox Text="{Binding ExtendedAccountZprv}" Foreground="IndianRed" Classes="selectableTextBlock" />
+ <controls:ExtendedTextBox Text="{Binding ExtendedAccountZprv}" Foreground="IndianRed" Classes="selectableTextBlock keysTextBlock" />
</StackPanel>
- <StackPanel Orientation="Horizontal">
+
+ <StackPanel Spacing="4">
<TextBlock Text="Extended Account Public Key: " />
- <controls:ExtendedTextBox Text="{Binding ExtendedAccountPublicKey, ConverterParameter=60, Converter={StaticResource LurkingWifeModeStringConverter}, Mode=OneWay}" Classes="selectableTextBlock">
+ <controls:ExtendedTextBox Text="{Binding ExtendedAccountPublicKey, ConverterParameter=60, Converter={StaticResource LurkingWifeModeStringConverter}, Mode=OneWay}" Classes="selectableTextBlock keysTextBlock">
<ToolTip.Tip>
<TextBlock TextWrapping="Wrap" Width="400" Text="Your extended public key can get all your addresses and find out how many coins you have, do not share this with anyone you do not trust." />
</ToolTip.Tip>
</controls:ExtendedTextBox>
</StackPanel>
- <StackPanel Orientation="Horizontal">
+
+ <StackPanel Spacing="4">
<TextBlock Text="Extended Account zpub: " />
- <controls:ExtendedTextBox Text="{Binding ExtendedAccountZpub, ConverterParameter=60, Converter={StaticResource LurkingWifeModeStringConverter}, Mode=OneWay}" Classes="selectableTextBlock">
+ <controls:ExtendedTextBox Text="{Binding ExtendedAccountZpub, ConverterParameter=60, Converter={StaticResource LurkingWifeModeStringConverter}, Mode=OneWay}" Classes="selectableTextBlock keysTextBlock">
<ToolTip.Tip>
<TextBlock TextWrapping="Wrap" Width="400" Text="Your zpub can get all your addresses and find out how many coins you have, do not share this with anyone you do not trust." />
</ToolTip.Tip>
</controls:ExtendedTextBox>
</StackPanel>
- <StackPanel IsVisible="{Binding !IsWatchOnly}" Margin="0 10 0 0" Spacing="10" Orientation="Horizontal">
- <controls:TogglePasswordBox Text="{Binding Password}" MaxWidth = "600">
- <i:Interaction.Behaviors>
- <behaviors:CommandOnEnterBehavior Command="{Binding ToggleSensitiveKeysCommand}" />
- </i:Interaction.Behaviors>
- </controls:TogglePasswordBox>
- <DockPanel VerticalAlignment="Top" LastChildFill="True">
- <Button Content="{Binding ShowSensitiveKeys, StringFormat=\{0\} Sensitive Keys, Converter={StaticResource BooleanStringConverter}, ConverterParameter=Hide:Show}" Command="{Binding ToggleSensitiveKeysCommand}" DockPanel.Dock="Right" />
- <Grid></Grid>
- </DockPanel>
- </StackPanel>
</StackPanel>
</Grid>
+ </ScrollViewer>
</controls:GroupBox>
- </StackPanel>
</controls:GroupBox>
</UserControl>

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/WalletInfoViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/WalletInfoViewModel.cs
@@ -26,6 +26,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
private string _extendedMasterZprv;
private string _extendedAccountPrivateKey;
private string _extendedAccountZprv;
+ private const string HiddenKeyString = "Sensitive Data - Not Shown";
public WalletInfoViewModel(Wallet wallet) : base(wallet.WalletName)
{
@@ -124,10 +125,10 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
private void ClearSensitiveData(bool passwordToo)
{
- ExtendedMasterPrivateKey = "";
- ExtendedMasterZprv = "";
- ExtendedAccountPrivateKey = "";
- ExtendedAccountZprv = "";
+ ExtendedMasterPrivateKey = HiddenKeyString;
+ ExtendedMasterZprv = HiddenKeyString;
+ ExtendedAccountPrivateKey = HiddenKeyString;
+ ExtendedAccountZprv = HiddenKeyString;
ShowSensitiveKeys = false;
if (passwordToo)

tidy up the wallet info view layout.