C# – Programatically setting Horizontal alignment of Dock Panel

c++silverlight

So far I have:

myDockPanel.SetValue(HorizontalAlignmentProperty, TextAlignment.Center);

I know TextAlignment.Center is not right. Does anyone know what this should be?

Best Solution

myDockPanel.HorizontalAlignment = HorizontalAlignment.Center;