silverlight中的模板绑定

silverlight中的模板绑定,第1张

概述前台页面: <navigation:Page x:Class="story.temple"            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"           

前台页面:

<navigation:Page x:Class="story.temple"
           xmlns="
http://schemas.microsoft.com/winfx/2006/xaml/presentation"
           xmlns:x="
http://schemas.microsoft.com/winfx/2006/xaml"
           xmlns:d="
http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="
http://schemas.openxmlformats.org/markup-compatibility/2006"
           mc:Ignorable="d"
           xmlns:navigation="clr-namespace:System.windows.Controls;assembly=System.windows.Controls.Navigation"
           d:DesignWIDth="400" d:DesignHeight="300"
           title="temple Page">
    <GrID x:name="LayoutRoot">
        <button x:name="btn" Height="50" Content="模板绑定" FontSize="18" HorizontalAlignment="Center"  >

            <button.Template  >
                <ControlTemplate >
                    <GrID WIDth="100">
                    <Ellipse WIDth="100" Height="50" >
                        <Ellipse.Fill >
                          Yellow
                        </Ellipse.Fill>
                        </Ellipse>
                        <ContentPresenter Content="{TemplateBinding button.Content}"></ContentPresenter>
                    </GrID>
                  
                </ControlTemplate>
            </button.Template>
        </button>
    </GrID>
</navigation:Page>

总结

以上是内存溢出为你收集整理的silverlight中的模板绑定全部内容,希望文章能够帮你解决silverlight中的模板绑定所遇到的程序开发问题。

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

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1064837.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-26
下一篇 2022-05-26

发表评论

登录后才能评论

评论列表(0条)

保存