In XML, I want the button to go to the red rectangular dot.
I say clearly:
"horizontal alignment =" true "
vertical alignment =" bottom "
This is correct but stays at the top Why is it?
UserControl xmlns = "http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns: X = "http://schemas.microsoft.com/find/xaml "x: class =" Multiple Pages Stack panel horizontal alignment = "statch" vertical element = "statch" width = "300" height = "150" Orientation = "vertical"> StackPackel width = "page" width = "300" height = "150" 300 "height =" 100 "background =" blue "& gt; textlok x: name =" youxtext "" text = "This page is one This page is one This page is one This page is one This page is one This page is one This page is one This page is one This page is one This page is a "TextWrapping =" wrap "height =" 100 "wide O = "300" horizontal alignment = "left" /> gt; & Gt; Stackpackel width = "300" height = "50" background = "red" & gt; & Lt; Button name = "switch" content = "switch page" width = "100" height = "20" horizontal align = "true" vertical element = "bottom" /> gt; & Gt; StackPainel & gt; & Lt; / Stackpanel & gt; & Lt; / UserControl & gt; The stackpayel means that it has to take shape with its elements and this container (depending, however, it is on your orientation, Although what you have done looks right, it is not that "mean" is to use the stackpayel. Though it seems that this height is fixed, it is a real height (it uses for laying hair control ) Its size of content (button). It's used for the PCPANEL, but if you're doing anything other than the ordinary pile of control, then you should generally use something else. You can either put it in a grid of any size Stick:
gt; grid height = "50"> & gt; ; Button name = "switch" content = "switch page" width = "100" height = "20" horizontal align = "true" workspaceAllin Ict = "bottom" />
Or, for that particular layout, you might want to see the dockpanel That is what you expect.
Comments
Post a Comment