WPF資源文件相關使用說明
作者:佚名
WPF資源文件的使用方法是一個比較基礎的知識。我們在學習的過程中,需要通過不斷的實踐積累去慢慢體會這些內容中的實際概念。
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資源文件適用方法的介紹就為大家介紹到這里。
責任編輯:曹凱
來源:
博客園