【WPF】获取父控件数据

MaxHeight="{Binding Path=ActualHeight, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=UserControl}}"

参考文献

https://www.cnblogs.com/-Timosthetic/p/16021865.html

你可能感兴趣的:(C#,wpf)