Multiple dataContext for one control - MVVM

前端 未结 3 1238
广开言路
广开言路 2020-12-10 15:32

I am not sure if my question header represent exactly my problem, I will do the best to explain:

I have a grid cell DataTemplate: (the grid belong to third party com

3条回答
  •  我在风中等你
    2020-12-10 16:10

    You will have to have an instance of the desired data context (usually in the resources of a control or window). Once you have that, you should be able to explicitly set the data context of the textblock instead of inheriting the parent data context automatically.

    For example:

    
    

提交回复
热议问题