View Issue Details

IDProjectCategoryView StatusLast Update
0001399NoesisGUIC# SDKpublic2019-01-24 11:06
ReporterDjekke Assigned Tosfernandez  
PrioritynormalSeverityminor 
Status assignedResolutionopen 
Product Version2.2.0b5 
Summary0001399: Cannot generate my own MouseWheel event.
Description

I was trying to make ListBox pass scroll event to parent, by I found, that I cannot generate my own MouseWheelEvent.

Error: Property or indexer 'RoutedEventArgs.RoutedEvent' cannot be assigned to -- it is read only
Error: Property or indexer 'RoutedEventArgs.Source' cannot be assigned to -- it is read only
Error: 'MouseWheelEventArgs' does not contain a definition for 'MouseDevice' and no accessible extension method 'MouseDevice' accepting a first argument of type 'MouseWheelEventArgs' could be found (are you missing a using directive or an assembly reference?)
Error: 'MouseWheelEventArgs' does not contain a definition for 'Timestamp' and no accessible extension method 'Timestamp' accepting a first argument of type 'MouseWheelEventArgs' could be found (are you missing a using directive or an assembly reference?)

Steps To Reproduce

private static void ListBoxOnPreviewMouseWheel(object sender, MouseWheelEventArgs e)
{
if(!e.Handled)
{
e.Handled = true;
var eventArg = new MouseWheelEventArgs(e.MouseDevice, e.Timestamp, e.Delta)
{
RoutedEvent = UIElement.MouseWheelEvent,
Source = sender
};
var parent = ((Control) sender).Parent as UIElement;
parent.RaiseEvent(eventArg);
}
}

PlatformWindows

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2019-01-23 13:07 Djekke New Issue
2019-01-24 11:06 sfernandez Assigned To => sfernandez
2019-01-24 11:06 sfernandez Status new => assigned