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

原始效果图如下:

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

答:

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>
复制代码

注意上面红色标注部分

 

posted @   星星c#  阅读(573)  评论(1编辑  收藏  举报
编辑推荐:
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· 三行代码完成国际化适配,妙~啊~
· .NET Core 中如何实现缓存的预热?
点击右上角即可分享
微信分享提示