Increase hitbox size of textbox to show context menu

Viewed 34

I have a multiline textbox in which the right click context menu only appears if you right click on a line which contains text. I would like to expand the hitbox so that right clicking anywhere within the textbox will show the default context menu.

In the image below, I have highlighted the region in which the right click context menu works.

wpf multiline textbox

Here is the XAML for the textbox:

<TextBox Margin="3" VerticalContentAlignment="Top"
     Cursor="IBeam"
     VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled"
     TextWrapping="Wrap" AcceptsReturn="True"
     AcceptsTab="True" SpellCheck.IsEnabled="True"
     IsReadOnly="{Binding IsReadOnly}"
     Text="{Binding CONFIDENTIAL}"
     adonisExtensions:WatermarkExtension.Watermark="CONFIDENTIAL"
     />

Please let me know if there is additional information I can provide.

0 Answers
Related