Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有停靠面板,两个停靠在左右角的按钮和一个带有控件的堆栈面板。我需要将堆栈面板左侧和右侧的一部分放在这两个停靠按钮下,并将堆栈面板的第一个子项设置为从边框偏移一些。这可能吗????
最简单的方法是将所有控件放在 aCanvas而不是 aDockPanel中,并使用Canvas.Top、Canvas.Left和 `Canvas.ZIndex 来定位控件。
Canvas
DockPanel
Canvas.Top
Canvas.Left
另一种方法是使用RenderTransforms在运行时调整元素定位。
RenderTransforms