Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I change the content "color" of a button in wpf

Tags:

button

colors

wpf

<StackPanel Margin="2">
  <Button Name="btn" Click="btn_Click" Content="Load Profile Image">
    <Button.Background>
      <ImageBrush ImageSource="D:\Pictures\rectangles.jpg"></ImageBrush>
    </Button.Background>
  </Button>
</StackPanel>

Image that i am pasting here is of is almost black, so I want to change the content color to white so that it should appear properly.

My apology, I hadn't added color in title which is quoted in commas, sorry for my mistake. Now it is OK, I think now it is clear to the reader ;)

like image 628
WasiF Avatar asked Feb 17 '15 05:02

WasiF


1 Answers

Assuming you are talking about the color of the Text you are displaying you want the Foreground property.

<Button Name="btn" Click="btn_Click" Content="Load Profile Image" Foreground="White">
like image 156
Steve Mitcham Avatar answered Nov 11 '22 06:11

Steve Mitcham