make legal textbox readonly
MODIFY
WalletWasabi.Gui/Controls/MultiTextBox.cs
WalletWasabi.Gui/Controls/MultiTextBox.cs
@@ -98,8 +98,6 @@ namespace WalletWasabi.Gui.Controls
public ReactiveCommand<Unit, Unit> CopyToClipboardCommand { get; }
- protected override bool IsCopyEnabled => IsSelectable;
-
protected override void OnTemplateApplied(TemplateAppliedEventArgs e)
{
base.OnTemplateApplied(e);

MODIFY
WalletWasabi.Gui/Controls/MultiTextBox.xaml
WalletWasabi.Gui/Controls/MultiTextBox.xaml
</ControlTemplate>
</Setter>
</Style>
+ <Style Selector="controls|MultiTextBox[IsSelectable=False]">
+ <Setter Property="Background" Value="{DynamicResource ThemeBackgroundBrush}" />
+ <Setter Property="BorderBrush" Value="{DynamicResource ThemeBorderMidBrush}" />
+ <Setter Property="BorderThickness" Value="{DynamicResource ThemeBorderThickness}" />
+ <Setter Property="Padding" Value="4" />
+ <Setter Property="Template">
+ <ControlTemplate>
+ <Border Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
+ <DockPanel Margin="{TemplateBinding Padding}">
+ <Grid>
+ <Grid IsVisible="{TemplateBinding ClipboardNotificationVisible}">
+ <Grid Opacity="{TemplateBinding ClipboardNotificationOpacity}">
+ <Grid.Transitions>
+ <DoubleTransition Property="Opacity" Easing="CircularEaseIn" Duration="0:0:0.5" />
+ </Grid.Transitions>
+ <TextBlock Text="Copied" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" FontWeight="Bold" />
+ </Grid>
+ </Grid>
+ <TextBlock Name="floatingWatermark" Foreground="{DynamicResource ThemeAccentBrush}" FontSize="{DynamicResource FontSizeSmall}" Text="{TemplateBinding Watermark}" DockPanel.Dock="Top">
+ <TextBlock.IsVisible>
+ <MultiBinding Converter="{x:Static BoolConverters.And}">
+ <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="UseFloatingWatermark" />
+ <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="Text" Converter="{x:Static StringConverters.IsNotNullOrEmpty}" />
+ <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ClipboardNotificationVisible" />
+ </MultiBinding>
+ </TextBlock.IsVisible>
+ </TextBlock>
+ <DataValidationErrors>
+ <ScrollViewer
+ HorizontalScrollBarVisibility="{TemplateBinding (ScrollViewer.HorizontalScrollBarVisibility)}"
+ VerticalScrollBarVisibility="{TemplateBinding (ScrollViewer.VerticalScrollBarVisibility)}"
+ IsVisible="{TemplateBinding TextVisible}">
+ <Panel>
+ <TextBlock Name="watermark" Opacity="0.5" Text="{TemplateBinding Watermark}" IsVisible="{TemplateBinding Text, Converter={x:Static StringConverters.IsNullOrEmpty}}" />
+ <TextPresenter
+ Name="PART_TextPresenter"
+ Text="{TemplateBinding Text, Mode=TwoWay}"
+ TextAlignment="{TemplateBinding TextAlignment}"
+ TextWrapping="{TemplateBinding TextWrapping}"
+ PasswordChar="{TemplateBinding PasswordChar}"
+ CaretBrush="Transparent" />
+ </Panel>
+ </ScrollViewer>
+ </DataValidationErrors>
+ </Grid>
+ </DockPanel>
+ </Border>
+ </ControlTemplate>
+ </Setter>
+ </Style>
<Style Selector="controls|MultiTextBox:pointerover /template/ Border#border">
<Setter Property="BorderBrush" Value="{DynamicResource ThemeBorderHighBrush}" />
</Style>

make legal textbox readonly