We are opening another form,when user double click on xamDataGrid.How to Avoid DoubleClick event on xamDataGrid scrollbar.Plz give solution.Thanx.
Now I can access e.OriginalSource property.For Double click on scrollbar e.OriginalSource ,is--Microsoft.Windows.Themes.ScrollCrome.But I am unable to comapare e.OriginalSource with Microsoft.Windows.Themes.ScrollCrome by using TypeOf operator.Ok,Thank you.
Sorry,but i have getting error for MouseButtonEventArgs.error-Type MouseButtonEventArgs not defined.
This is because you are using EventArgs which do not expose the OriginalSource properfy. By default, the Mouse Double Clicked event would be created with MouseButtonEventArgs.
void xamDataGrid1_PreviewMouseDoubleClick(object sender, MouseButtonEventArgs e)
{
}
I am hostimg xamDataGrod on form.
1)AddHandler xamGridBuybackEqpRqn.MouseDoubleClick, AddressOf xamGridBuybackEqpRqn_MouseDoubleClickEvent
and I am unable to access the e.OriginalSource property.In following function:
Hello,
In the DoubleClick event handler you can check the e.OriginalSource property of the event args and see if this element is ScrollBar, ScrollViewer or Thumb and not open the new window.
Hope this helps.