I started programming for windows a few days ago and having trouble displaying my RichTextBox Paragraph element content at the top left corner. It displays in the middle of the content page for my grid.
Here is my code:
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<RichTextBox>
<Paragraph TextAlignment="Left">
<Bold FontSize="32">Todays Instructions</Bold>
</Paragraph>
<Paragraph>
I want some text to display here.
</Paragraph>
</RichTextBox>
</Grid>
If you look at the content box of this message you see where I said “Hi Everyone” starts at the top left most corner. I want my paragraph to do the same but instead it displays in the middle of the grid. Any ideas? Thanks in advance.
Add
VerticalAlignment="Top"to your RichTextBox.