WPF设置Window的数据上下文(DataContext)为自身

WPF设置Window的数据上下文(DataContext)为自身的XAML:

DataContext="{Binding RelativeSource={RelativeSource Self}}"

 

posted @ 2017-03-06 12:24  秋刀鱼No1  阅读(3306)  评论(1编辑  收藏  举报