How to leave my Button disabled but the image appearing?

2

Does anyone know if there is any way I can leave my Button disabled but the Button image appear?

What if I disable Button.

ButtonXAMLcode.

<Buttonx:Name="BtnCalc" Content="" HorizontalAlignment="Left" Margin="773,206,-172,0"
        VerticalAlignment="Top" Width="200" Click="BtnCalc_Click" Height="85"
        BorderBrush="{x:Null}">
    <Button.Background>
        <ImageBrush ImageSource="images/calculador.png"/>
    </Button.Background>
</Button>
    
asked by anonymous 17.04.2014 / 22:28

1 answer

1

So:

Put a <Button.Content> inside a <StackPanel> and finally a <Image> , will solve this problem

<Button Name="BtnCalc"
        HorizontalAlignment="Left"  
        Margin="53,62,0,0"
        VerticalAlignment="Top" Width="266" Height="136" Click="BtnCalc_Click_1">
    <Button.Content>
        <StackPanel>
            <Image Source="images/1.jpg"></Image>
        </StackPanel>
    </Button.Content>
</Button>

This is a good example of your size.

    
17.04.2014 / 23:17