Aligning GanttChartDataGrid cell content, even when exporting or printing

With the recently released Gantt Chart Light Library build (revision 4.3.36.1) you can now align grid cells and have the exported image or printed document follow your setting. To have output text right aligned, for example, just ensure you use DataGridTemplateColumn with ContentControl element inside its CellTemplate, having HorizontalAlignment property set to Right:

<DataGridTemplateColumn Header="Description">
    <DataGridTemplateColumn.CellTemplate>
        <DataTemplate>
            <ContentControl Content="{Binding Tag.Description}" Padding="4"
                            HorizontalAlignment="Right"/>
        </DataTemplate>
    </DataGridTemplateColumn.CellTemplate>
    ...
</DataGridTemplateColumn>
Advertisements

About DlhSoft Team

DlhSoft is a software development company focused on building high quality and innovative solutions using Microsoft® .NET and related technologies for customers worldwide. Our activity includes designing and developing general purpose software applications, components and tools, and customized software solutions upon request. DlhSoft team is highly experienced and fully dedicated to software development. The complete set of knowledge, skills, and abilities of its members is guaranteed by the individually assessed Microsoft® certifications. Additionally, one of the most important things we rely on is the continuous communication with the customer; all the feedback we receive is very valuable to us.
This entry was posted in Development Components and tagged , , , , , . Bookmark the permalink.

Add a reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s