📜  获取父 wpf 的数据上下文 - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:19.109000             🧑  作者: Mango

代码示例1
Binding="{Binding RelativeSource={RelativeSource FindAncestor, 
AncestorType={x:Type Window}}, Path=DataContext.AllowItemCommand}"