Home Forums WPF controls Xceed DataGrid for WPF Aligning the contents of a grid

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #24655 |

    Hi,
    how to align the contents of the grid, ie the text inside the cells ?

    Regards
    S.V.Britto

    Imported from legacy forums. Posted by Britto (had 442 views)

    User (Old forums)
    Member
    Post count: 23064

    You can do it by creating cell content style:
    <Style TargetType=”{x:Type xcdg:DataCell}”>
    <Setter Property =”VerticalContentAlignment” Value=”Center”/>
    <Setter Property =”HorizontalContentAlignment” Value=”Center”/>
    </Style>
    And place it in Resources for your Grid.

    Imported from legacy forums. Posted by Lena (had 315 views)

    User (Old forums)
    Member
    Post count: 23064

    hi,
    ok ,Thankyou

    Imported from legacy forums. Posted by Britto (had 3192 views)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.