Set a border around a StackPanel.

后端 未结 3 1971
生来不讨喜
生来不讨喜 2021-01-01 08:29

Here\'s my XAML code:



        
3条回答
  •  长发绾君心
    2021-01-01 08:55

    You set DockPanel.Dock="Top" to the StackPanel, but the StackPanel is not a child of the DockPanel... the Border is. Your docking property is being ignored.

    If you move DockPanel.Dock="Top" to the Border instead, both of your problems will be fixed :)

提交回复
热议问题