Updated RelativeCanvas (markdown)

master
DianeXceed 8 years ago
parent
commit
85547a2446
  1. 24
      RelativeCanvas.md

24
RelativeCanvas.md

@ -7,6 +7,30 @@ A Panel which is similar to Canvas but it lays out its children relative to the
[[RelativeCanvas_relativecanvas.jpg]]
### Remarks
Items in a RelativeCanvas are placed relative to the RelativeCanvas itself. The following attached properties each have their use:
* RelativeCanvas.Left (value >= 0): used to indicate where to place the item from left to right.
* 0 = Extreme left
* 1 = Extreme right
* RelativeCanvas.Top (value >= 0): used to indicate where to place the item from top to bottom.
* 0 = Complete top
* 1 = Complete bottom
* RelativeCanvas.RelativeWidth (value >= 0): used to indicate the width of the element relative to the width of the RelativeCanvas
* ex: a value of 0.5 will indicate that the element's width must be half the width of the RelativeCanvas
* RelativeCanvas.RelativeHeight (value >= 0): used to indicate the height of the element relative to the height of the RelativeCanvas
* ex: a value of 0.5 will indicate that the element's height must be half the height of the RelativeCanvas
* RelativeCanvas.PinPoint: reference point from which the other properties/characteristics will be calculated.
* (0,0) = Top left corner
* (1,0) = Top right corner
* (0,1) = Bottom left corner
* (1,1) = Bottom right corner
This means that the attached properties RelativeCanvas.RelativeWidth and RelativeCanvas.RelativeHeight must be set on the elements that should have a size relative to the size of the RelativeCanvas.
For elements that should have a fixed size, assign a value to FrameworkElement.Width and/or FrameworkElement.Height. For elements that should have a size in function of their content, do not specify anything.
### Properties
| Property | Description |
| --- | --- |

Loading…
Cancel
Save