devexpress LayoutControl控件里面的内边距的消除

匿名 (未验证) 提交于 2019-12-02 23:34:01

原始效果图如下:

如何去掉红线部分的边距?

答:

padding margin 都不起作用

需要使用如下方式:

    <Window.Resources>         <Style x:Key="CustomGroupBoxStyle" TargetType="{x:Type dxlc:GroupBox}">             <Setter Property="Padding" Value="0"/>         </Style>     </Window.Resources>
<dxlc:LayoutControl Padding="0" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="1" Orientation="Vertical" HorizontalAlignment="Stretch"  x:Name="LayoutRoot">             <dxlc:LayoutGroup VerticalAlignment="Stretch">                 <dxlc:LayoutGroup Header="目录" GroupBoxStyle="{StaticResource CustomGroupBoxStyle}"  View="GroupBox" Width="220" VerticalAlignment="Stretch" dxlc:LayoutControl.AllowHorizontalSizing="True">                     <UserControls:UC_FileManageLeftTree />                 </dxlc:LayoutGroup>                 <dxlc:LayoutGroup Header="列表" View="GroupBox" VerticalAlignment="Stretch" dxlc:LayoutControl.AllowHorizontalSizing="True">                     <dxlc:LayoutItem Label="姓名">                     </dxlc:LayoutItem>                 </dxlc:LayoutGroup>             </dxlc:LayoutGroup>         </dxlc:LayoutControl>

注意上面红色标注部分

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!