bind to a property in the parent control

前端 未结 3 1574
一向
一向 2020-12-31 05:08

i have the following case:

Window
  |_Grid
      |_ListView (MainProductGrid)
           |_View
               |_GridView
                    |_GridViewColum         


        
3条回答
  •  暖寄归人
    2020-12-31 05:57

    You can use

    RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}} 
    

    to find a specific control above you

提交回复
热议问题