C# Class WaveWPF.WaveCanvas

Class that represents a canvas that contains the wave application.
Inheritance: System.Windows.FrameworkElement
Mostra file Open project: WaveEngine/Samples Class Usage Examples

Public Properties

Property Type Description
AutoRenderProperty System.Windows.DependencyProperty
IsInDesignMode bool
LowPriorityRenderingProperty System.Windows.DependencyProperty
SendResizeDelayProperty System.Windows.DependencyProperty

Public Methods

Method Description
WaveCanvas ( ) : System

Initializes a new instance of the WaveCanvas class.

Protected Methods

Method Description
OnMouseDown ( System.Windows.Input.MouseButtonEventArgs e ) : void

Invoked when an unhandled E:System.Windows.Input.Mouse.MouseDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

OnMouseLeave ( System.Windows.Input.MouseEventArgs e ) : void

Invoked when an unhandled E:System.Windows.Input.Mouse.MouseLeave attached event is raised on this element. Implement this method to add class handling for this event.

OnMouseMove ( System.Windows.Input.MouseEventArgs e ) : void

Invoked when an unhandled E:System.Windows.Input.Mouse.MouseMove attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

OnMouseUp ( System.Windows.Input.MouseButtonEventArgs e ) : void

Invoked when an unhandled E:System.Windows.Input.Mouse.MouseUp routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

OnMouseWheel ( System.Windows.Input.MouseWheelEventArgs e ) : void

Invoked when an unhandled E:System.Windows.Input.Mouse.MouseWheel attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

OnRender ( System.Windows.Media.DrawingContext drawingContext ) : void

When overridden in a derived class, participates in rendering operations that are directed by the layout system. The rendering instructions for this element are not used directly when this method is invoked, and are instead preserved for later asynchronous use by layout and drawing.

Private Methods

Method Description
CheckInit ( object sender, EventArgs e ) : void

Checks the initialize.

HandleResizeDelayChanged ( DependencyObject dependencyObject, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Handles the resize delay changed.

OnKeyDown ( object sender, System.Windows.Input.KeyEventArgs e ) : void

Called when [key down].

OnKeyUp ( object sender, System.Windows.Input.KeyEventArgs e ) : void

Called when [key up].

OnLoaded ( object sender, System e ) : void

Called when [loaded].

OnRendering ( object sender, EventArgs e ) : void

Called when [rendering].

OnSizeChanged ( object sender, System.Windows.SizeChangedEventArgs e ) : void

Called when [size changed].

Render ( ) : void

Renders the action.

ResizeGame ( object sender, EventArgs e ) : void

Resizes the game.

Unload ( ) : void

Unloads this instance.

Method Details

OnMouseDown() protected method

Invoked when an unhandled E:System.Windows.Input.Mouse.MouseDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
protected OnMouseDown ( System.Windows.Input.MouseButtonEventArgs e ) : void
e System.Windows.Input.MouseButtonEventArgs The that contains the event data. This event data reports details about the mouse button that was pressed and the handled state.
return void

OnMouseLeave() protected method

Invoked when an unhandled E:System.Windows.Input.Mouse.MouseLeave attached event is raised on this element. Implement this method to add class handling for this event.
protected OnMouseLeave ( System.Windows.Input.MouseEventArgs e ) : void
e System.Windows.Input.MouseEventArgs The that contains the event data.
return void

OnMouseMove() protected method

Invoked when an unhandled E:System.Windows.Input.Mouse.MouseMove attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
protected OnMouseMove ( System.Windows.Input.MouseEventArgs e ) : void
e System.Windows.Input.MouseEventArgs The that contains the event data.
return void

OnMouseUp() protected method

Invoked when an unhandled E:System.Windows.Input.Mouse.MouseUp routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
protected OnMouseUp ( System.Windows.Input.MouseButtonEventArgs e ) : void
e System.Windows.Input.MouseButtonEventArgs The that contains the event data. The event data reports that the mouse button was released.
return void

OnMouseWheel() protected method

Invoked when an unhandled E:System.Windows.Input.Mouse.MouseWheel attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
protected OnMouseWheel ( System.Windows.Input.MouseWheelEventArgs e ) : void
e System.Windows.Input.MouseWheelEventArgs The that contains the event data.
return void

OnRender() protected method

When overridden in a derived class, participates in rendering operations that are directed by the layout system. The rendering instructions for this element are not used directly when this method is invoked, and are instead preserved for later asynchronous use by layout and drawing.
protected OnRender ( System.Windows.Media.DrawingContext drawingContext ) : void
drawingContext System.Windows.Media.DrawingContext The drawing instructions for a specific element. This context is provided to the layout system.
return void

WaveCanvas() public method

Initializes a new instance of the WaveCanvas class.
public WaveCanvas ( ) : System
return System

Property Details

AutoRenderProperty public_oe static_oe property

Indicates whether the wave canvas will render automatically.
public static DependencyProperty,System.Windows AutoRenderProperty
return System.Windows.DependencyProperty

IsInDesignMode public_oe static_oe property

Gets a value indicating whether the control is in design mode (running in Blend or Visual Studio).
public static bool IsInDesignMode
return bool

LowPriorityRenderingProperty public_oe static_oe property

Indicates whether the rendering should be done in the System.Windows.Threading.DispatcherPriority.Input priority. This may cause loss of FPS, but will not interfere with the input processing. Default is false.
public static DependencyProperty,System.Windows LowPriorityRenderingProperty
return System.Windows.DependencyProperty

SendResizeDelayProperty public_oe static_oe property

Indicates the time delay before the resize event will be propagated to the bound Game class which will cause its backbuffer resize. Default is 1 second.
public static DependencyProperty,System.Windows SendResizeDelayProperty
return System.Windows.DependencyProperty