AxisCanvas
The AxisCanvas provides an auto-sizing canvas for the axis labels
Inherits: Panel
Implements: ISuspendable
Properties
public bool ClipToBounds { get; set; }
value = axisCanvas.ClipToBounds
axisCanvas.ClipToBounds = value
Gets or sets the value which indicates whether to clip the content of this element.
public bool IsSuspended { get; }
value = axisCanvas.IsSuspended
Gets a value indicating whether updates for the target are currently suspended
public bool SizeHeightToContent { get; set; }
value = axisCanvas.SizeHeightToContent
axisCanvas.SizeHeightToContent = value
Gets or sets a value indicating whether the canvas should size its height to its content.
public bool SizeWidthToContent { get; set; }
value = axisCanvas.SizeWidthToContent
axisCanvas.SizeWidthToContent = value
Gets or sets a value indicating whether the dynamic canvas should size its width to its content.
Methods
protected virtual Rect AdjustArrangedRectPosition(Rect arrangedRect, Size arrangeSize)
result = axisCanvas.AdjustArrangedRectPosition(arrangedRect, arrangeSize)
Adjust position of element before arranging
- arrangedRect
- Rect of current element
- arrangeSize
- The size to arrange element within
protected override Size ArrangeOverride(Size arrangeSize)
result = axisCanvas.ArrangeOverride(arrangeSize)
Arranges all children in the correct position.
- arrangeSize
- The size to arrange element's within.
Returns: The size that element's were arranged in.
public void DecrementSuspend()
axisCanvas.DecrementSuspend()
Called by IUpdateSuspender each time a target suspender is disposed. When the final target suspender has been disposed, ResumeUpdates is called
protected virtual Rect GetArrangedRect(Size arrangeSize, UIElement element)
result = axisCanvas.GetArrangedRect(arrangeSize, element)
Get arranged rectangle of element
- arrangeSize
- The size to arrange element within
- element
- The element which need to be arranged
Returns: Arranged Rect of element
public static double GetBottom(UIElement element)
result = AxisCanvas.GetBottom(element)
Gets the value of the Bottom attached property for a specified UIElement.
- element
- The UIElement from which the property value is read.
Returns: The Bottom property value for the UIElement.
public static double GetCenterBottom(UIElement element)
result = AxisCanvas.GetCenterBottom(element)
Gets the value of the CenterBottom attached property for a specified UIElement.
- element
- The UIElement from which the property value is read.
Returns: The CenterBottom property value for the UIElement.
public static double GetCenterLeft(UIElement element)
result = AxisCanvas.GetCenterLeft(element)
Gets the value of the CenterLeft attached property for a specified UIElement.
- element
- The UIElement from which the property value is read.
Returns: The CenterLeft property value for the UIElement.
public static double GetCenterRight(UIElement element)
result = AxisCanvas.GetCenterRight(element)
Gets the value of the CenterRight attached property for a specified UIElement.
- element
- The UIElement from which the property value is read.
Returns: The CenterRight property value for the UIElement.
public static double GetCenterTop(UIElement element)
result = AxisCanvas.GetCenterTop(element)
Gets the value of the CenterTop attached property for a specified UIElement.
- element
- The UIElement from which the property value is read.
Returns: The CenterTop property value for the UIElement.
protected override Geometry GetLayoutClip(Size layoutSlotSize)
result = axisCanvas.GetLayoutClip(layoutSlotSize)
Returns a geometry for a clipping mask. The mask applies if the layout system attempts to arrange an element that is larger than the available display space.
- layoutSlotSize
- The size of the part of the element that does visual presentation.
Returns: The clipping geometry.
public static double GetLeft(UIElement element)
result = AxisCanvas.GetLeft(element)
Gets the value of the Left attached property for a specified UIElement.
- element
- The UIElement from which the property value is read.
Returns: The Left property value for the UIElement.
public static double GetRight(UIElement element)
result = AxisCanvas.GetRight(element)
Gets the value of the Right attached property for a specified UIElement.
- element
- The UIElement from which the property value is read.
Returns: The Right property value for the UIElement.
public static double GetTop(UIElement element)
result = AxisCanvas.GetTop(element)
Gets the value of the Top attached property for a specified UIElement.
- element
- The UIElement from which the property value is read.
Returns: The Top property value for the UIElement.
private void Invalidate()
axisCanvas.Invalidate()
Invalidates the position of child elements.
protected override Size MeasureOverride(Size constraint)
result = axisCanvas.MeasureOverride(constraint)
Measures all the children and returns their size.
- constraint
- The available size.
Returns: The desired size.
public void ResumeUpdates(IUpdateSuspender suspender)
axisCanvas.ResumeUpdates(suspender)
Resumes updates on the target, intended to be called by IUpdateSuspender
- suspender
public static void SetBottom(UIElement element, double value)
AxisCanvas.SetBottom(element, value)
Sets the value of the Bottom attached property to a specified UIElement.
- element
- The UIElement to which the attached property is written.
- value
- The needed Bottom value.
public static void SetCenterBottom(UIElement element, double value)
AxisCanvas.SetCenterBottom(element, value)
Sets the value of the CenterBottom attached property to a specified UIElement.
- element
- The UIElement to which the attached property is written.
- value
- The needed CenterBottom value.
public static void SetCenterLeft(UIElement element, double value)
AxisCanvas.SetCenterLeft(element, value)
Sets the value of the CenterLeft attached property to a specified UIElement.
- element
- The UIElement to which the attached property is written.
- value
- The needed CenterLeft value.
public static void SetCenterRight(UIElement element, double value)
AxisCanvas.SetCenterRight(element, value)
Sets the value of the CenterRight attached property to a specified UIElement.
- element
- The UIElement to which the attached property is written.
- value
- The needed CenterRight value.
public static void SetCenterTop(UIElement element, double value)
AxisCanvas.SetCenterTop(element, value)
Sets the value of the CenterTop attached property to a specified UIElement.
- element
- The UIElement to which the attached property is written.
- value
- The needed CenterTop value.
public static void SetLeft(UIElement element, double value)
AxisCanvas.SetLeft(element, value)
Sets the value of the Left attached property to a specified UIElement.
- element
- The UIElement to which the attached property is written.
- value
- The needed Left value.
public static void SetRight(UIElement element, double value)
AxisCanvas.SetRight(element, value)
Sets the value of the Right attached property to a specified UIElement.
- element
- The UIElement to which the attached property is written.
- value
- The needed Right value.
public static void SetTop(UIElement element, double value)
AxisCanvas.SetTop(element, value)
Sets the value of the Top attached property to a specified UIElement.
- element
- The UIElement to which the attached property is written.
- value
- The needed Top value.
public IUpdateSuspender SuspendUpdates()
result = axisCanvas.SuspendUpdates()
Suspends drawing updates on the target until the returned object is disposed, when a final draw call will be issued
Returns: The disposable Update Suspender
Fields
public static readonly DependencyProperty BottomProperty
value = AxisCanvas.BottomProperty
Identifies the Bottom dependency property.
public static readonly DependencyProperty CenterBottomProperty
value = AxisCanvas.CenterBottomProperty
Identifies the CenterBottom dependency property.
public static readonly DependencyProperty CenterLeftProperty
value = AxisCanvas.CenterLeftProperty
Identifies the CenterLeft dependency property.
public static readonly DependencyProperty CenterRightProperty
value = AxisCanvas.CenterRightProperty
Identifies the CenterRight dependency property.
public static readonly DependencyProperty CenterTopProperty
value = AxisCanvas.CenterTopProperty
Identifies the CenterTop dependency property.
public static readonly DependencyProperty ClipToBoundsProperty
value = AxisCanvas.ClipToBoundsProperty
Identifies the SizeWidthToContent dependency property.
public static readonly DependencyProperty LeftProperty
value = AxisCanvas.LeftProperty
Identifies the Left dependency property.
public static readonly DependencyProperty RightProperty
value = AxisCanvas.RightProperty
Identifies the Right dependency property.
public static readonly DependencyProperty SizeHeightToContentProperty
value = AxisCanvas.SizeHeightToContentProperty
Identifies the SizeHeightToContent dependency property.
public static readonly DependencyProperty SizeWidthToContentProperty
value = AxisCanvas.SizeWidthToContentProperty
Identifies the SizeWidthToContent dependency property.
public static readonly DependencyProperty TopProperty
value = AxisCanvas.TopProperty
Identifies the Top dependency property.