标签:style blog http color io os ar 使用 strong
一、文章概述
本演示介绍如何在单独的文件中定义WPF资源,并在需要的地方调用相关资源文件。<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib">
<sys:String x:Key="text">路漫漫其修远兮,吾将上下而求索!</sys:String>
</ResourceDictionary><Window x:Class="Demo009.MainWindow"
xmlns="http://sche1mas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Resource Files" FontSize="30">
<Window.Resources>
<ResourceDictionary Source="ShinyRed.xaml" />
</Window.Resources>
<StackPanel>
<TextBlock Text="{StaticResource text}" />
</StackPanel>
</Window>标签:style blog http color io os ar 使用 strong
原文地址:http://blog.csdn.net/gjysk/article/details/40478129