0
我在DataGrid中綁定了一個值(Item.Amount)的字段,現在在該字段編輯器的樣式中,我想將Format字段綁定到Item.QuantityDecimalPoints 。WPF DataGrid綁定編輯器設置爲另一個屬性
但我似乎無法上升到樹記錄綁定到相同的項目。
我曾嘗試以下:
Format="{Binding Path=QuantityDecimalPoints, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type DBO:Item}}}"
而且
Format="{Binding Path=QuantityDecimalPoints, RelativeSource={RelativeSource PreviousData}}"