日期:2014-05-17 浏览次数:20762 次
<Window.Resources>
<local:Person Age="12" x:Key="person1"/>
</Window.Resources>
<StackPanel Name="stackpanel1">
<TextBox Text="{Binding Source={StaticResource person1}, Path=Age}" />
</StackPanel>
class Person
{
public int Age { get; set; }
}