Text, Image,.. used as a "Button" (Clicked="...")


I want to use a Text, and an Image, as a Button. Is this possible?

In a Button I can use the attribute “Clicked” to start a method/function. How can I realise this with a Text/Image Object?

Button is a Panel so you can add children to it.

<Button Text="">
    <Image File="fancy.png"/>

Note that the Text="" part is a workaround to a minor style defect we have now. This will be fixed so you don’t need that attribute.

Clicked is a generic behaviour and can be added to any element:

<Star Width="50" Height="50">
    <SolidColor Color="1,1,0,1"/>
    <Clicked Handler="OnClicked"/>