如何正确设置控件的位置?

时间:2011-08-09 12:21:08

标签: c# wpf devexpress

我的目标是使用Dev Express XtraReport创建报告。我正在使用XRRichText和XRPictureBox控件。

我的问题是我无法正确设置XRPictureBox控件的位置。

enter image description here

我希望在XRRichText控件之后添加XRPictureBox控件,如图所示。有没有办法做到这一点?

感谢。

1 个答案:

答案 0 :(得分:0)

<Canvas> - 允许您通过指定距离显式定位子控件 它们的左边,顶边,右边和底边与<Canvas>之间的边缘。我认为这正是你所需要的。这里有如何使用它的例子:

<Canvas>
    <Button Content=”TopLeft” Width=”85” Height=”30”
            Canvas.Top=”20” Canvas.Left=”20”/>
    <Button Content=”TopRight” Width=”85” Height=”30”
            Canvas.Top=”20” Canvas.Right=”20”/>
    <Button Content=”BottomLeft” Width=”85” Height=”30”
            Canvas.Bottom=”20” Canvas.Left=”20”/>
    <Button Content=”BottomRight” Width=”85” Height=”30”
            Canvas.Bottom=”20” Canvas.Right=”20”/>
 </Canvas>
相关问题