C#

2012-04-24 4 views
0

私は動的にC#で列を構築しようとしていますが、私は、私はそのBUT DisplayMemberBindingのすべてを変換する方法を知っているC#C#

<xcdg:Column FieldName="Name" 
      Title="Name" 
      DisplayMemberBinding="{Binding}" 
      CellContentTemplate="{StaticResource InputManagerNameCellTemplate}" 
      AllowAutoFilter="False"/> 

にこれを変換する方法を確認していないこのエクシードXAMLを変換する方法部。

ありがとうございました。

答えて

2

このお試しください:XAMLで

new Binding() 
{ 
    Path = new PropertyPath(FrameworkElement.DataContextProperty), 
    RelativeSource = new RelativeSource(RelativeSourceMode.Self) 
} 

空のバインディングは、同じ要素上のDataContextにバインドするためのショートカットです。