How can I vertically align a Label
and TextBlock
at Top
so that their first lines of text line up?
The extra space around the label comes from the Padding property. To remove the space, you can explicitly set the Padding property to "0" directly on the Label, or, of course, set it via a Style.
Here is a workaround: Align bottoms of text in controls.
I posted a connection: https://connect.microsoft.com/WPF/feedback/ViewFeedback.aspx?FeedbackID=523432, please vote.
<TextBlock>
<InlineUIContainer BaselineAlignment="Top"><Label Content="Label"/></InlineUIContainer>
<InlineUIContainer BaselineAlignment="Top"><TextBlock>TextBlock Content</TextBlock> </InlineUIContainer>
</TextBlock>
HTH.