GoXam for WPF v3
NodePanel Class
Members 
Northwoods.GoXam Namespace : NodePanel Class
This panel is useful for having a background shape as the primary object and positioning one or more child elements within that shape.
Syntax
[Localizability(LocalizationCategory.Ignore)]
[ContentProperty("Children")]
[StyleTypedProperty(Property="FocusVisualStyle", StyleTargetType=System.Windows.Controls.Control)]
[XmlLangProperty("Language")]
[UsableDuringInitialization(true)]
[RuntimeNameProperty("Name")]
[UidProperty("Uid")]
[TypeDescriptionProvider(MS.Internal.ComponentModel.DependencyObjectProvider)]
[NameScopeProperty("NameScope", System.Windows.NameScope)]
public class NodePanel : System.Windows.Controls.Panel 
Remarks

A NodePanel is typically used as the implementation of a Node's DataTemplate when you want the node to basically be some shape (a "figure", but it can be any kind of UIElement) and you want to position and align additional elements within that primary shape. If you want elements such as text outside of that shape, we suggest you use a Panel such as StackPanel or Grid to arrange the node the way you want.

The first child element of the panel is treated as the main object. It can have two attached property values, NodePanel.Spot1 and NodePanel.Spot2, that denote the top-left and bottom-right corners of an area where the other child elements are placed. The default spot values will just cover the whole element. However, a NodeShape, with a NodeFigure attached property is frequently used as the first element of a NodePanel. Such shapes have predefined Spot1 and Spot2 values in addition to having particular geometries.

The layout will observe the FrameworkElement.HorizontalAlignment and VerticalAlignment properties of each child element after the first one.

As an example, here is the definition of a simple template that displays a resizable rounded rectangle surrounding some text: <DataTemplate x:Key="ExampleNodeTemplate"> <go:NodePanel go:Node.Location="{Binding Path=Data.XY, Mode=TwoWay}" go:Node.SelectionElementName="Shape" go:Node.Resizable="True"> <go:NodeShape x:Name="Shape" go:NodePanel.Figure="RoundedRectangle" Width="50" Height="20" Stroke="Gray" StrokeThickness="1" Fill="LightYellow" /> <TextBlock Text="{Binding Path=Data.Name}" TextWrapping="Wrap" /> </go:NodePanel> </DataTemplate> You must use the <go:NodeShape> element instead of a <Path> element.

Inheritance Hierarchy

System.Object
   System.Windows.Threading.DispatcherObject
      System.Windows.DependencyObject
         System.Windows.Media.Visual
            System.Windows.UIElement
               System.Windows.FrameworkElement
                  System.Windows.Controls.Panel
                     Northwoods.GoXam.NodePanel

See Also

Reference

NodePanel Members
Northwoods.GoXam Namespace