what''s this Event'' name?
hello,everyone:
now, I add some components into a InkCanvas,when I select a component and delete it, I want to get this event.
what's this event's name?
please~!
thanks!
hello,everyone:
now, I add some components into a InkCanvas,when I select a component and delete it, I want to get this event.
what's this event's name?
please~!
thanks!
can nobody know this problem?
maybe I didn't express it clearly.
I want to delete a component that is included in the inkcanvas, for example:
when I select the button control, and then press the key "Delete" on the keyboard, the button will be deleted directly.
but Before I delete the control, I want to give some warning information,
so how can I get a event before the control is deleted.
It had better cancel the delete operation when I need, although I pressed the key "Delete".
thanks!
I have a work-around which u could try
In XAML In code-behind
<Window x:Class="WindowsApplication4.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="WindowsApplication4" Height="500" Width="500" Loaded="onLoad"
>
<Grid>
<InkCanvas EditingMode ="Select" Name ="myInkCanvas" Background ="LightGreen">
<Button InkCanvas.Top ="50" InkCanvas.Left ="50" Width ="80" Height ="30">Click me</Button>
</InkCanvas>
</Grid>
</Window>
{
InitializeComponent();
this.PreviewKeyDown += new KeyEventHandler(Window_PreviewKeyDown);
}
void Window_PreviewKeyDown(object sender, KeyEventArgs e)
{
if (e.Key == Key.Delete)
{