C# Class GestSpace.Controls.HexCanvas

Follow steps 1a or 1b and then 2 to use this custom control in a XAML file. Step 1a) Using this custom control in a XAML file that exists in the current project. Add this XmlNamespace attribute to the root element of the markup file where it is to be used: xmlns:MyNamespace="clr-namespace:GestSpace.Controls" Step 1b) Using this custom control in a XAML file that exists in a different project. Add this XmlNamespace attribute to the root element of the markup file where it is to be used: xmlns:MyNamespace="clr-namespace:GestSpace.Controls;assembly=GestSpace.Controls" You will also need to add a project reference from the project where the XAML file lives to this project and Rebuild to avoid compilation errors: Right click on the target project in the Solution Explorer and "Add Reference"->"Projects"->[Browse to and select this project] Step 2) Go ahead and use your control in the XAML file.
Inheritance: System.Windows.Controls.Panel
Mostrar archivo Open project: NicolasDorier/GestSpace

Public Properties

Property Type Description
GutterSizeProperty System.Windows.DependencyProperty
LeftHexProperty System.Windows.DependencyProperty
TopHexProperty System.Windows.DependencyProperty

Public Methods

Method Description
GetLeftHex ( DependencyObject obj ) : int
GetTopHex ( DependencyObject obj ) : int
SetLeftHex ( DependencyObject obj, int value ) : void
SetTopHex ( DependencyObject obj, int value ) : void

Protected Methods

Method Description
ArrangeOverride ( Size arrangeSize ) : Size
MeasureOverride ( Size constraint ) : Size
OnVisualChildrenChanged ( DependencyObject visualAdded, DependencyObject visualRemoved ) : void

Private Methods

Method Description
HexCanvas ( ) : System
OnGuttenSizeChanged ( DependencyObject source, System.Windows.DependencyPropertyChangedEventArgs args ) : void

Method Details

ArrangeOverride() protected method

protected ArrangeOverride ( Size arrangeSize ) : Size
arrangeSize System.Windows.Size
return System.Windows.Size

GetLeftHex() public static method

public static GetLeftHex ( DependencyObject obj ) : int
obj System.Windows.DependencyObject
return int

GetTopHex() public static method

public static GetTopHex ( DependencyObject obj ) : int
obj System.Windows.DependencyObject
return int

MeasureOverride() protected method

protected MeasureOverride ( Size constraint ) : Size
constraint System.Windows.Size
return System.Windows.Size

OnVisualChildrenChanged() protected method

protected OnVisualChildrenChanged ( DependencyObject visualAdded, DependencyObject visualRemoved ) : void
visualAdded System.Windows.DependencyObject
visualRemoved System.Windows.DependencyObject
return void

SetLeftHex() public static method

public static SetLeftHex ( DependencyObject obj, int value ) : void
obj System.Windows.DependencyObject
value int
return void

SetTopHex() public static method

public static SetTopHex ( DependencyObject obj, int value ) : void
obj System.Windows.DependencyObject
value int
return void

Property Details

GutterSizeProperty public_oe static_oe property

public static DependencyProperty,System.Windows GutterSizeProperty
return System.Windows.DependencyProperty

LeftHexProperty public_oe static_oe property

public static DependencyProperty,System.Windows LeftHexProperty
return System.Windows.DependencyProperty

TopHexProperty public_oe static_oe property

public static DependencyProperty,System.Windows TopHexProperty
return System.Windows.DependencyProperty