使 RichTextBox 的默认右键菜单符合主题

This commit is contained in:
ZCShou 2020-07-15 11:04:27 +08:00
parent 3c8fc094ac
commit b06fe3d477
2 changed files with 21 additions and 0 deletions

View file

@ -150,6 +150,13 @@
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
FontFamily="Consolas">
<RichTextBox.ContextMenu>
<ContextMenu>
<MenuItem Command="ApplicationCommands.Copy"/>
<MenuItem Command="ApplicationCommands.Cut"/>
<MenuItem Command="ApplicationCommands.Paste"/>
</ContextMenu>
</RichTextBox.ContextMenu>
<FlowDocument PageWidth="0"/>
</RichTextBox>

View file

@ -77,6 +77,13 @@
<RichTextBox.Document>
<FlowDocument PageWidth="0"/>
</RichTextBox.Document>
<RichTextBox.ContextMenu>
<ContextMenu>
<MenuItem Command="ApplicationCommands.Copy"/>
<MenuItem Command="ApplicationCommands.Cut"/>
<MenuItem Command="ApplicationCommands.Paste"/>
</ContextMenu>
</RichTextBox.ContextMenu>
</RichTextBox>
</Grid>
@ -126,6 +133,13 @@
<RichTextBox.Document>
<FlowDocument PageWidth="0"/>
</RichTextBox.Document>
<RichTextBox.ContextMenu>
<ContextMenu>
<MenuItem Command="ApplicationCommands.Copy"/>
<MenuItem Command="ApplicationCommands.Cut"/>
<MenuItem Command="ApplicationCommands.Paste"/>
</ContextMenu>
</RichTextBox.ContextMenu>
</RichTextBox>
</Grid>
</Grid>