WPF資源文件相關(guān)使用說明
作者:佚名
WPF資源文件的使用方法是一個(gè)比較基礎(chǔ)的知識(shí)。我們在學(xué)習(xí)的過程中,需要通過不斷的實(shí)踐積累去慢慢體會(huì)這些內(nèi)容中的實(shí)際概念。
WPF是一個(gè)比較新的開發(fā)工具。既然是一個(gè)新技術(shù)工具,其具體包含內(nèi)容值得我們?nèi)ド钊氲难芯俊1热邕@里將會(huì)為大家介紹的WPF資源文件的使用方法,就是一個(gè)值得學(xué)習(xí)的基礎(chǔ)技能。#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資源文件適用方法的介紹就為大家介紹到這里。
責(zé)任編輯:曹凱
來源:
博客園