码迷,mamicode.com
首页 > 其他好文 > 详细

试用插入代码

时间:2014-10-30 18:56:33      阅读:197      评论:0      收藏:0      [点我收藏+]

标签:style   blog   io   color   ar   sp   div   on   log   

<Style x:Key="ButtonStyle34" TargetType="{x:Type Button}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <StackPanel Orientation="Horizontal" Background="Transparent" Margin="0,0,0,0" >
                        <Image Name="ImgBtnBg3" Margin="0,0,0,2" Source="/Resources/Res/Delete_I.png" Stretch="Fill" Width="54"/>
                    </StackPanel>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Source" Value="/Resources/Res/Geng_II.png" TargetName="ImgBtnBg3"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="Source" Value="/Resources/Res/Geng_III.png" TargetName="ImgBtnBg3"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Source" Value="/Resources/Res/Delete_I.png" TargetName="ImgBtnBg3"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
<Style x:Key="ButtonStyle34" TargetType="{x:Type Button}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <StackPanel Orientation="Horizontal" Background="Transparent" Margin="0,0,0,0" >
                        <Image Name="ImgBtnBg3" Margin="0,0,0,2" Source="/Resources/Res/Delete_I.png" Stretch="Fill" Width="54"/>
                    </StackPanel>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Source" Value="/Resources/Res/Geng_II.png" TargetName="ImgBtnBg3"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="Source" Value="/Resources/Res/Geng_III.png" TargetName="ImgBtnBg3"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Source" Value="/Resources/Res/Delete_I.png" TargetName="ImgBtnBg3"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>

  

试用插入代码

标签:style   blog   io   color   ar   sp   div   on   log   

原文地址:http://www.cnblogs.com/roadWillpower/p/4063302.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!