<html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8" /><META NAME="save" CONTENT="history" /><title xmlns:mshelp="http://msdn.microsoft.com/mshelp" xmlns:msxsl="urn:schemas-microsoft-com:xslt">使用 ControlTemplates 设置样式的示例</title><META NAME="Description" CONTENT="此示例演示了用于最常见的 WPF 控件的 T:System.Windows.Controls.ControlTemplate 示例。如果您要替换控件的 T:System.Windows.Controls.ControlTemplate,那么最好从这些示例开始。"></META><META NAME="MS.LOCALE" CONTENT="en-us" /><style>
body
{font-family:Verdana;font-size:medium;}
div#mainSection, div#header
{font-size:70%;width: 100%;}
div#mainBody
{font-size:90%;}
div#mainSection div table
{font-size: 100%;text-align: left;}
span#nsrTitle
{color:#003399;font-size:90%;font-weight:600;}
div#header
{background-color:#D4DFFF;}
.heading
{font-size:120%;color:#003399;}
.subHeading
{font-size:100%;margin-bottom:4;}
li
{margin-top:-2;margin-bottom:3;}
p
{margin-top:10;margin-bottom:5;}
div.tableSection p
{margin-top:1;margin-bottom:4;}
div#mainSection table th
{background-color:#EFEFF7;color:#000066;text-align:left;}
div#mainSection table td
{background-color:#F7F7FF;}
div#mainSection table
{margin-top:5px;margin-bottom: px;}
</style></head><body><div id="header"><table width="100%" id="topTable"><tr id="headerTableRow2" xmlns:mshelp="http://msdn.microsoft.com/mshelp" xmlns:msxsl="urn:schemas-microsoft-com:xslt"><td align="left"><span id="nsrTitle">使用 ControlTemplates 设置样式的示例</span></td></tr></table></div><div id="mainSection"><div id="mainBody"><br /><font color="DarkGray">[This readme is a partial copy of the sample's topic in the SDK documentation.]</font><br /><div class="introduction"><p xmlns:mshelp="http://msdn.microsoft.com/mshelp" xmlns:msxsl="urn:schemas-microsoft-com:xslt">此示例演示了用于最常见的 WPF 控件的 ControlTemplate 示例。如果您要替换控件的 ControlTemplate,那么最好从这些示例开始。</p><p xmlns:mshelp="http://msdn.microsoft.com/mshelp" xmlns:msxsl="urn:schemas-microsoft-com:xslt">此示例演示 Windows Presentation Foundation 的特定功能,因此未遵循应用程序开发的最佳做法。有关 Windows Presentation Foundation (WPF) 和 Microsoft .NET Framework 应用程序开发的最佳做法的全面介绍,请相应地参考以下主题:</p><p xmlns:mshelp="http://msdn.microsoft.com/mshelp" xmlns:msxsl="urn:schemas-microsoft-com:xslt">辅助功能 - 辅助功能最佳方案</p><p xmlns:mshelp="http://msdn.microsoft.com/mshelp" xmlns:msxsl="urn:schemas-microsoft-com:xslt">安全 - Windows Presentation Foundation 安全性</p><p xmlns:mshelp="http://msdn.microsoft.com/mshelp" xmlns:msxsl="urn:schemas-microsoft-com:xslt">本地化 - WPF 全球化和本地化概述</p></div><h1 class="heading" xmlns:mshelp="http://msdn.microsoft.com/mshelp" xmlns:msxsl="urn:schemas-microsoft-com:xslt"><span onclick="ExpandCollapse(sectionToggle0)" style="cursor:default;" onkeypress="ExpandCollapse_CheckKey(sectionToggle0, event)" tabindex="0">生成示例</span></h1><div id="sectionSection0" class="section"><ul xmlns:mshelp="http://msdn.microsoft.com/mshelp" xmlns:msxsl="urn:schemas-microsoft-com:xslt"><li><p>
安装 Windows 软件开发工具包 (SDK) 并打开其生成环境命令窗口。在“开始”菜单上,指向“所有程序”、“Microsoft Windows SDK”,然后单击“CMD Shell”。
</p></li><li><p>
将示例(通常位于软件开发工具包 (SDK) 文档中)下载到您的硬盘。
</p></li><li><p>
若要从生成环境命令窗口生成示例,请转到示例的源目录。在命令提示符处,键入 MSBUILD。
</p></li><li><p>
若要在 Microsoft Visual Studio 中生成示例,请加载示例解决方案或项目文件,然后按 Ctrl+Shift+B。
</p></li></ul></div><h1 class="heading" xmlns:mshelp="http://msdn.microsoft.com/mshelp" xmlns:msxsl="urn:schemas-microsoft-com:xslt"><span onclick="ExpandCollapse(sectionToggle1)" style="cursor:default;" onkeypress="ExpandCollapse_CheckKey(sectionToggle1, event)" tabindex="0">运行示例</span></h1><div id="sectionSection1" class="section"><ul xmlns:mshelp="http://msdn.microsoft.com/mshelp" xmlns:msxsl="urn:schemas-microsoft-com:xslt"><li><p>
若要从生成环境命令窗口运行已编译的示例,请执行示例源代码文件夹下包含的 Bin\Debug 或 Bin\Release 文件夹中的 .exe 文件。
</p></li><li><p>
若要在 Visual Studio 中调试运行已编译的示例,请按 F5。
</p></li></ul></div></div></div></body></html>
没有合适的资源?快使用搜索试试~ 我知道了~
wpf control template 示例
共41个文件
xaml:33个
cs:5个
scc:1个
4星 · 超过85%的资源 需积分: 16 19 下载量 124 浏览量
2010-09-24
22:35:18
上传
评论
收藏 42KB ZIP 举报
温馨提示
重写所有常用控件的controltemplate的例子,对wpf初学者很有帮助
资源推荐
资源详情
资源评论
收起资源包目录
ControlTemplateExamples.zip (41个子文件)
readme.htm 5KB
csharp
mssccprj.scc 202B
page1.xaml 367B
resources
statusbar.xaml 2KB
tooltip.xaml 1KB
resizegrip.xaml 2KB
radiobutton.xaml 3KB
menu.xaml 18KB
checkbox.xaml 4KB
label.xaml 1KB
button.xaml 3KB
shared.xaml 8KB
scrollbar.xaml 7KB
combobox.xaml 8KB
frame.xaml 13KB
progressbar.xaml 1KB
navigationwindow.xaml 14KB
documentviewer.xaml 4KB
window.xaml 1KB
toolbar.xaml 10KB
tabcontrol.xaml 4KB
separator.xaml 696B
slider.xaml 7KB
textbox.xaml 4KB
expander.xaml 5KB
groupbox.xaml 2KB
listbox.xaml 3KB
scrollviewer.xaml 2KB
treeview.xaml 8KB
listview.xaml 10KB
testwindow.xaml 503B
testwindow.xaml.cs 591B
testnavigationwindow.xaml 370B
app.xaml 2KB
page1.xaml.cs 619B
testnavigationwindow.xaml.cs 646B
window1.xaml.cs 1KB
window1.xaml 15KB
simplestyles.csproj 8KB
page2.xaml 367B
page2.xaml.cs 619B
Metadata
共 41 条
- 1
资源评论
- turens2012-06-20微软的msdn里就有,
- new_coming2013-01-06东西是微软的,但免费共享值得鼓励呀
- boyadon2014-03-16恩啊,看了一下确实是msdn就有了,不过挺好的,感谢分享
devilgdut
- 粉丝: 3
- 资源: 16
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功