Align button content

Jose picture Jose · Jun 2, 2009 · Viewed 34.6k times · Source

I want the content of a wpf button to be left aligned I tried the following but the text is still centered inside the button.

    <Button >
        <StackPanel HorizontalAlignment="Stretch">
            <TextBlock HorizontalAlignment="Left" Text="Save"/>
        </StackPanel>
    </Button>

What do i do?

Answer

Jose picture Jose · Jun 2, 2009

Found it, it's HorizontalContentAlignment.

:)