Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
665
Label and cell padding in XamDataGrid
posted

I am trying to use a vertical grid, the cell padding  and the label padding is stretching the list greatly. Deoes anyone know a way to adjust the padding?

 

Thanks, 

  • 2677
    posted

    Hello,

     Getting the cells to shrink in size is an easy task.  A lot of the margin and padding that goes on is from the editors which are used within the Cells.  Once simple style that you can try is the following:

    <Style TargetType="{x:Type igEditors:XamTextEditor}">

    <Setter Property="Padding" Value="0"/>

    <Setter Property="Margin" Value="0"/>

    </Style>

    This will make a big difference.  Give that a shot and see what you think.  If you want to do this to the Labels, you will have to Re-Template the LabelPresenter object via style and get rid of a margin on the LabelContent ContentPresenter.  That gives you the margin.  You may want to be careful with that because you have to make sure there is enough room for the sort indicators.