silverlight   发布时间:2022-05-04  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了Silverlight4入门之样式与模板(十)大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

概述

  <UserControl x:Class="SbSCh3_4.MainPage" xmlns="http://scheR_215_11845@as.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://scheR_215_11845@as.microsoft.com/winfx/2006/xaml" xmlns:d="http://scheR_215_11845@
 
<UserControl x:Class="SbSCh3_4.MainPage"
    xmlns="http://scheR_215_11845@as.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://scheR_215_11845@as.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://scheR_215_11845@as.microsoft.com/expression/blend/2008"
    xmlns:mc="http://scheR_215_11845@as.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="338" d:DesignWidth="400">
    <UserControl.resources>
        <Style x:Key="PictureButton" TargetType="Button">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Button Height="150" Width="257">
                            <Button.Content>
                                <StackPanel Height="141" HorizontalAlignment="Left" Name="stackPanel1" VerticalAlignment="Top" Width="204">
                                    <Image Height="103" Name="image1" Stretch="Fill" Width="200" source="/SbSCh3_4;component/quan_zhi_xian.jpg" />
                                    <TextBlock Height="23" Name="textBlock1" Text="Fancy Books" TextAlignment="Center" FontFamily="Georgia" FontSize="12" />
                                </StackPanel>
                            </Button.Content>
                        </Button>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </UserControl.resources>

    <Grid x:Name="LayoutRoot" BACkground="White" Height="341">

        <Button Style="{Staticresource PictureButton}" Margin="-10,-91,10,91" />
        <Button Style="{Staticresource PictureButton}" Margin="-13,70,13,-70" />
    </Grid>
</UserControl>

大佬总结

以上是大佬教程为你收集整理的Silverlight4入门之样式与模板(十)全部内容,希望文章能够帮你解决Silverlight4入门之样式与模板(十)所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。