Completed
Last Updated: 28 Jul 2021 05:48 by ADMIN
Release LIB 2021.2.802 (2 Aug 2021)
Martin Ivanov
Created on: 14 Jun 2021 10:28
Category: Diagram
Type: Feature Request
1
Diagram: Enable HorizontalContentAlignment and VerticalContentAlignment for RadDiagramTextShape

Currently, the content of RadDiagramShape element alignment can be changed via its HorizontalContentAlignment and VerticalContentAlignment. However, in RadDiagramTextShape, those properties don't take effect. Instead the text content is always centered.

At this point, you can achieve this requirement, by extracting the ControlTemplate of RadDiagramTextShape and bind the corresponding properties of the ContentPresenter to the parent shape. For example:

<ContentPresenter x:Name="NormalContent"
				  Margin="{TemplateBinding Padding}"
				  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
				  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>

0 comments