I am searching for a way to extend the contextmenu of a textbox. I know there are dozens of solutions out there that recreate the contextmenu as a whole, but how on earth can I simply add one custom entry to a existing context menu?
Thanks Klaus
 <TextBox>
        <TextBox.ContextMenu>
            <ContextMenu>
                <MenuItem Command="ApplicationCommands.Cut" />
                <MenuItem Command="ApplicationCommands.Copy" />
                <MenuItem Command="ApplicationCommands.Paste" />
                <MenuItem Command="ApplicationCommands.SelectAll" />
           //Your own item here
            </ContextMenu>
        </TextBox.ContextMenu>
    </TextBox>
Please not that all command are automatically operation and will work as expected
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With