Silverlight: Docking of controls

2019-05-30 12:41发布

Is it possible to dock Silverlight based controls like Windows Forms control ? For example I want to use a tab control, which I want to use as a control for page navigation ! Unfortunately I don't find a "Dock" property :-( !

3条回答
你好瞎i
2楼-- · 2019-05-30 13:19

I am not sure that i understand your question, but you can consider using one of the various WPF layout techniques.

Example:

<DockPanel LastChildFill="False">
    <Button DockPanel.Dock="Bottom">Bottom</Button>
    <Button DockPanel.Dock="Left">Left</Button>        
    <Button DockPanel.Dock="Right">Right</Button>
    <Button DockPanel.Dock="Top">Top</Button>
    <Button>Fill</Button>
</DockPanel>
查看更多
虎瘦雄心在
3楼-- · 2019-05-30 13:24

DockPanel might be helpful.

查看更多
爷、活的狠高调
4楼-- · 2019-05-30 13:36

The Silverlight Toolkit found on Codeplex contains a DockPanel control, you will want to use that.

查看更多
登录 后发表回答