WPF是一个比较新的开发工具。既然是一个新技术工具,其具体包含内容值得我们去深入的研究。比如这里将会为大家介绍的WPF资源文件的使用方法,就是一个值得学习的基础技能。#t#
WPF资源文件代码示例:
- < Window x:Class="WPFFR.Window1"
- xmlns="http://schemas.
microsoft.com/winfx/2006
/xaml/presentation"
- xmlns:x="http://schemas.
microsoft.com/winfx/2006/xaml"
- Title="Window1" Height=
"300" Width="300">
- < Window.Resources>
- < Style x:Key="backcolor"
TargetType="Grid">
- < Setter Property="Background"
Value="Red"/>
- < /Style>
- < /Window.Resources>
- < Grid Style="{StaticResource
backcolor}">
- < Button Height="23" Margin=
"92,0,112,79" Name="button1"
VerticalAlignment="Bottom">Button
< /Button>
- < /Grid>
- < /Window>
WPF资源文件适用方法的介绍就为大家介绍到这里。