Assembly: yWorks.yFilesSilverlight.Viewer (in yWorks.yFilesSilverlight.Viewer.dll) Version: 2.1.0.2
Syntax
| C# |
|---|
[TemplatePartAttribute(Name = "PART_ContentHost", Type = typeof(CanvasContentHost))] public class CanvasControl : Control, ILookup |
| Visual Basic |
|---|
<TemplatePartAttribute(Name := "PART_ContentHost", Type := GetType(CanvasContentHost))> _ Public Class CanvasControl _ Inherits Control _ Implements ILookup |
Remarks
The scene graph tree is made up of ICanvasObject elements. Multiple elements are grouped in ICanvasObjectGroup elements. An ICanvasObject consists of a user-object and an ICanvasObjectDescriptor that is used by the rendering engine to query interfaces that perform the actual creation of the FrameworkElements, hit testing, and bounds calculation.
This control offers convenience methods to Print()()()() the contents.
This control supports the WPF templating mechanism. Template authors need to include a named template part of type CanvasContentHost named PART_ContentHost that will be used to host the actual contents.
This control comes with a number of default command bindings that work on the view port:
- NavigationCommands.IncreaseZoom
- NavigationCommands.DecreaseZoom
- NavigationCommands.Zoom
- ComponentCommands.ScrollPageDown
- ComponentCommands.ScrollPageUp
- ComponentCommands.ScrollPageLeft
- ComponentCommands.ScrollPageRight
In addition to the bindings for existing commands this class declares a new RoutedUICommand, FitContentCommand, that will invoke the FitContent()()()() method.
All commands can be removed from the CommandBindings if desired.
Related Reading in the Developer's Guide
Related Demo Applications
Inheritance Hierarchy
System.Windows..::..DependencyObject
System.Windows..::..UIElement
System.Windows..::..FrameworkElement
System.Windows.Controls..::..Control
yWorks.Canvas..::..CanvasControl
yWorks.yFiles.UI..::..GraphControl
yWorks.yFiles.UI..::..GraphOverviewControl