Hi - We are using the DateTimeEditBox and whenever we do ctrl + A, it selects the date, great! but I want to insert the contextmenu of the (select all, copy, cut, paste) for our user.
so, I did the below code:this works in some way..
but there are several challenges that I encounter and I wonder if you know the answer to my problems.
- select all command is disable and yet you can do, ctrl+A and will do the same thing
- when I select the whole date (by ctrl+A) and do right click its losing the selection
any suggestions?
Thanks!
so, I did the below code:
<ContextMenu x:Key="TextBoxContextMenu" Background="White">
<MenuItem Command="ApplicationCommands.Copy" />
<MenuItem Command="ApplicationCommands.Cut" />
<MenuItem Command="ApplicationCommands.Paste" />
<MenuItem Command="ApplicationCommands.SelectAll" />
</ContextMenu>
<ControlTemplate x:Key="ShowContextMenu" TargetType="{x:Type Editors:DateTimeEditBox}">
<Grid>
<Editors:SlottedItemsPresenter x:Name="PART_ItemsPresenter" ContextMenu="{StaticResource TextBoxContextMenu}" d:IsLocked="True"/>
<Popup x:Name="PART_Popup"/>
</Grid>
</ControlTemplate>
but there are several challenges that I encounter and I wonder if you know the answer to my problems.
- select all command is disable and yet you can do, ctrl+A and will do the same thing
- when I select the whole date (by ctrl+A) and do right click its losing the selection
any suggestions?
Thanks!