Shape
can be used only in the DataTemplate
for an Adornment used by Northwoods.GoXam.Tool.DiagramTools to allow the adorned part to be manipulated.
Visual Basic (Declaration) | |
---|---|
<DesignTimeVisibleAttribute()> Public Class ToolHandle Inherits System.Windows.Shapes.Shape Implements ISupportInitialize, IFrameworkInputElement, IInputElement, IQueryAmbient, IAnimatable |
C# | |
---|---|
[DesignTimeVisibleAttribute()] public class ToolHandle : System.Windows.Shapes.Shape, ISupportInitialize, IFrameworkInputElement, IInputElement, IQueryAmbient, IAnimatable |
You should set its Stroke
, StrokeThickness
, Fill
, et al. as you would for any Shape
, as well as its Width
and Height
.
A ToolHandle
is rectangular by default, but you can set or bind its NodeFigure attached property to get different figures. You can specify a limited number of figure shapes for these handles: NodeFigure.Rectangle (the default figure), NodeFigure.Ellipse, NodeFigure.Diamond, NodeFigure.TriangleRight, NodeFigure.TriangleDown, NodeFigure.TriangleLeft, NodeFigure.TriangleUp, NodeFigure.PlusLine, NodeFigure.XLine, NodeFigure.AsteriskLine,
A simple example definition:
<DataTemplate> <go:SpotPanel> <go:ToolHandle go:SpotPanel.Spot="Center" go:NodePanel.Figure="Ellipse" Width="6" Height="6" Fill="Yellow" Stroke="Black" StrokeThickness="1" /> </go:SpotPanel> </DataTemplate>
You can have many tool handles in a single Adornment.
System.Object
System.Windows.Threading.DispatcherObject
System.Windows.DependencyObject
System.Windows.Media.Visual
System.Windows.UIElement
System.Windows.FrameworkElement
System.Windows.Shapes.Shape
Northwoods.GoXam.ToolHandle