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

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


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">


I don't think we understand what you want here coz when you provide an image as background it will become background.

if you want Image , text and background to a button try this

 <Button Name="btn" Background="Red">            <Button.Content>                <Grid>                    <Image Source="D:\Pictures\rectangles.jpg"></Image>                    <TextBlock Text="Load Profile Image" ></TextBlock>                </Grid>            </Button.Content>        </Button>


In case you want to change the background and foreground of a button then do this

<Button Name="btn" Content="Load Profile Image">   <Button.Background>      <ImageBrush ImageSource="D:\Pictures\rectangles.jpg"></ImageBrush>   </Button.Background>   <Button.Foreground>   <LinearGradientBrush StartPoint="0,0" EndPoint="1,1" >       <GradientStop Color="YellowGreen" Offset="0.25" />       <GradientStop Color="WhiteSmoke" Offset="1.5" />   </LinearGradientBrush>   </Button.Foreground></Button>