Fix Borders of Right Click menu for Textbox (eg. Searchbar) (#9)

This commit is contained in:
Martin Wiethan 2024-09-19 08:23:58 +02:00 committed by GitHub
parent d8f817668b
commit 9e65047a0d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -603,9 +603,23 @@
<Setter Property="ContextMenu"> <Setter Property="ContextMenu">
<Setter.Value> <Setter.Value>
<ContextMenu> <ContextMenu>
<MenuItem Command="Cut" Header="Cut"/> <ContextMenu.Style>
<MenuItem Command="Copy" Header="Copy"/> <Style TargetType="ContextMenu">
<MenuItem Command="Paste" Header="Paste"/> <Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ContextMenu">
<Border Background="{MainBackgroundColor}" BorderBrush="{MainForegroundColor}" BorderThickness="1" CornerRadius="5" Padding="5">
<StackPanel>
<MenuItem Command="Cut" Header="Cut"/>
<MenuItem Command="Copy" Header="Copy"/>
<MenuItem Command="Paste" Header="Paste"/>
</StackPanel>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ContextMenu.Style>
</ContextMenu> </ContextMenu>
</Setter.Value> </Setter.Value>
</Setter> </Setter>