开发者

Silverlight Button not clickable when styling it

I'm trying to style a button with this :

    <Button Canvas.Top="200" Canvas.Left="170" Width="150" Height="150" 
            Click="Button_Click"
            Style="{StaticResource ButtonTestStyle}" />

and this :

<Style x:Key开发者_运维知识库="ButtonTestStyle" TargetType="Button">
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="Button">
                <TextBlock Text="Test" />
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>

but, when I click on the button, the click event isn't fired.

What am I doing wrong ?

Thanks for your help, Best regard


I think the problem comes from the transparent background.

Thanks for your help

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜