add textbox styles for selectable textbox
MODIFY
WalletWasabi.Fluent/Styles/TextBox.xaml
WalletWasabi.Fluent/Styles/TextBox.xaml
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
MinWidth="{TemplateBinding MinWidth}"
- MinHeight="{TemplateBinding MinHeight}">
- </Border>
+ MinHeight="{TemplateBinding MinHeight}" />
<Border
Margin="{TemplateBinding BorderThickness}">
<Grid ColumnDefinitions="Auto,*,Auto">
<ContentPresenter Grid.Column="0" Grid.ColumnSpan="1" Content="{TemplateBinding InnerLeftContent}" />
- <DockPanel x:Name="PART_InnerDockPanel" Grid.Column="1" Grid.ColumnSpan="1" Margin="{TemplateBinding Padding}">
+ <DockPanel x:Name="PART_InnerDockPanel" Grid.Column="1" Grid.ColumnSpan="1"
+ Margin="{TemplateBinding Padding}">
<TextBlock Name="PART_FloatingWatermark"
Foreground="{DynamicResource SystemAccentColor}"
FontSize="{TemplateBinding FontSize}"
Text="{TemplateBinding Watermark}"
DockPanel.Dock="Top" />
- <ScrollViewer HorizontalScrollBarVisibility="{TemplateBinding (ScrollViewer.HorizontalScrollBarVisibility)}"
+ <ScrollViewer
+ HorizontalScrollBarVisibility="{TemplateBinding (ScrollViewer.HorizontalScrollBarVisibility)}"
VerticalScrollBarVisibility="{TemplateBinding (ScrollViewer.VerticalScrollBarVisibility)}">
<Panel>
<TextBlock Name="PART_Watermark"
<Setter Property="MinHeight" Value="20" />
</Style>
+ <Style Selector="TextBox.selectable_text_block">
+ <Setter Property="IsReadOnly" Value="True" />
+ <Setter Property="ContextMenu">
+ <ContextMenu>
+ <MenuItem Header="Copy" Command="{Binding $parent[TextBox].Copy}" IsEnabled="{Binding $parent[TextBox].CanCopy}" InputGesture="{x:Static TextBox.CopyGesture}"/>
+ </ContextMenu>
+ </Setter>
+ <Setter Property="Template">
+ <ControlTemplate>
+ <ScrollViewer HorizontalScrollBarVisibility="{TemplateBinding (ScrollViewer.HorizontalScrollBarVisibility)}"
+ VerticalScrollBarVisibility="{TemplateBinding (ScrollViewer.VerticalScrollBarVisibility)}">
+ <Panel>
+ <TextPresenter Name="PART_TextPresenter"
+ Text="{TemplateBinding Text, Mode=TwoWay}"
+ CaretIndex="{TemplateBinding CaretIndex}"
+ SelectionStart="{TemplateBinding SelectionStart}"
+ SelectionEnd="{TemplateBinding SelectionEnd}"
+ TextAlignment="{TemplateBinding TextAlignment}"
+ TextWrapping="{TemplateBinding TextWrapping}"
+ PasswordChar="{TemplateBinding PasswordChar}"
+ RevealPassword="{TemplateBinding RevealPassword}"
+ SelectionBrush="{TemplateBinding SelectionBrush}"
+ SelectionForegroundBrush="{TemplateBinding SelectionForegroundBrush}"
+ CaretBrush="{TemplateBinding CaretBrush}"
+ HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
+ VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
+ </Panel>
+ </ScrollViewer>
+ </ControlTemplate>
+ </Setter>
+ </Style>
+
+
</Styles>
\ No newline at end of file

add textbox styles for selectable textbox