【发布时间】:2011-01-27 12:27:26
【问题描述】:
我想知道如何创建这个绑定,因为 Line.X2 不是依赖属性! :(
<Line Y1="0" X1="0" Y2="0" Stroke="Blue" StrokeThickness="3" Margin="0 -2 0 -2" X2="{Binding Path=RenderSize.Width, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type StackPanel}}}"/>
【问题讨论】:
-
尝试在 C# 代码隐藏中设置它?
标签: wpf binding properties dependencies