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
255
Eliminate margin on cells when background color is applied
posted

Hi

I have a xamdatagrid and the following style which I apply to certain field.Settings.EditorStyle in code:

<Style x:Key="readOnlyStyle" TargetType="{x:Type igEditors:XamTextEditor}">
 <Setter Property="Background" Value="LightGray"/>
 <Setter Property="Margin" Value="0"/>
 <Setter Property="BorderThickness" Value="0"/>
</Style> 

I am trying to eliminate the border highlighted on the attached sreenshot but cannot seem to find a way of doing so. I do not explicitly set border thickness anywhere else on the grid either.

  • 138253
    Verified Answer
    Offline posted

    Hello,

     

    Thank you for your post. I have been looking into your requirement and I created a sample project for you with the functionality you want. Basically I cretad a Style for the CellValuePresenter and set its Background, Margin and BorderThickness Properties the same way as in your Editor and applied it to the same Field in order to hide the lines you have. Please let me know if this helps you or you need further clarifications on this matter.

     

    Looking forward for your reply.

    XamDataGridMargin.zip