Northwoods.GoWPF 2.2.4 Assembly
Palette Class
Members 

The Palette control is a Diagram that holds parts that can be dragged to a Diagram.
Syntax
Remarks

You will need to initialize the palette's Model with the node data with which you wish to populate the palette. For example, for the (simple) palette: <go:Palette x:Name="myPalette" NodeTemplate="..." /> you would need to perform something like the following at initialization: myPalette.Model.NodesSource = new String[] { "Alpha", "Beta", "Gamma" }; You also need to set AllowDrop="True" on the Diagram(s) into which users may drop the items from the palette.

It is commonplace to have a different and probably simpler node DataTemplate for Palettes than for the destination Diagrams.

By default a palette uses a Northwoods.GoXam.Layout.GridLayout as its Layout. That GridLayout defaults to sorting all of the nodes by the Part.Text (attached) property. It also re-layouts automatically whenever the viewport size changes, because the size of the DiagramPanel changes or because the scale changes.

The default style for a palette also makes it IsReadOnly, and sets AllowDragOut to be true, to permit drag-and-drop operations to start from this palette and to end on other diagrams.

Inheritance Hierarchy

System.Object
   System.Windows.Threading.DispatcherObject
      System.Windows.DependencyObject
         System.Windows.Media.Visual
            System.Windows.UIElement
               System.Windows.FrameworkElement
                  System.Windows.Controls.Control
                     Northwoods.GoXam.Diagram
                        Northwoods.GoXam.Palette

Requirements
See Also

Reference

Palette Members
Northwoods.GoXam Namespace

 

 


© Northwoods Software 2017. All Rights Reserved.

Send Feedback