Reputation: 149
I've placed an Ellipse on a Canvas. Only Canvas.Top and Canvas.Left properties are shown in Properties Window. There is no Canvas.Right or Canvas.Bottom. I'm trying to understand why some properties appear (like Top and Left) but others don't (like Bottom and Right). PS: I know i can set Right and Bottom properties in XAML, but I'm not asking how to set those but why can't I set them in properties Window.
Thank you for reading!
Upvotes: 0
Views: 124
Reputation: 1086
The Top/Left under the layout is to adjust the position of the control in the Canvas. If you use Grid or StackPanel to contain the controls, Top/Left will disappear. In fact, BottomProperty,LeftProperty,RightProperty,TopProperty are all fields of Canvas. The Layout doesn't show all the fields, you can add it in XAML code.
Upvotes: 1
Reputation: 12276
You don't see them because they're not properties.
You just decided you wanted bottom and right.
That doesn't make them exist as properties.
Top and left are used as the x and y co-ordinates to position something on a canvas. Thus they're fairly important aspects and obviously necessary.
The people building the framework added those attached properties.
The bottom and right points can be calculated using height and width.
If they thought about it at all, whoever was writing the framework must have decided they weren't necessary.
Upvotes: 0