XAML Button oluşturma style css ten çağırma



Button oluşturma style css ten çağırma



<Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="130*"/>
            <ColumnDefinition Width="387*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="20*"></RowDefinition>

            <RowDefinition Height="40*"></RowDefinition>
            <RowDefinition Height="40*"></RowDefinition>



        </Grid.RowDefinitions>



        <Border Grid.Column="0" Grid.Row="1">
            <Image MouseDown="Image_MouseDown">
                <Image.Style>
                    <Style TargetType="Image">
                        <Setter Property="Source" Value="res/siren.png"></Setter>
                        <Style.Triggers>
                            <Trigger Property="IsMouseOver" Value="true">
                                <Setter Property="Source" Value="res/siren2.png"></Setter>
                            </Trigger>
                        </Style.Triggers>
                    </Style>
                </Image.Style>           
                        </Image>
        </Border>
    </Grid>

Yorumlar