I have a silverlight textbox which aligns all text to the center.
The VerticalContentAlignment does not work!
How can I align this text so that text starts on top and not in the center.
<StackPanel>
<TextBox Text="{Binding OverView,Mode=TwoWay}" AcceptsReturn="True"
Loaded="Update_EditableState"
Height="135" HorizontalAlignment="Left"
TextWrapping="Wrap" Width="200">
</TextBox>
</StackPanel>
As per Microsoft documentation VerticalContentAlignment does not work on the default template of text box.
To solve this we need our own style.
Adding binding verticalalignment to verticalcontentalignment of the template fixed the issue.
Here’s the element i changed from the standard textbox style
Here’s the complete style I used to achieve this
Much help was obtained from another question