Binding objects defined in code-behind

前端 未结 11 1304
难免孤独
难免孤独 2020-11-28 04:29

I have some object that is instantiated in code behind, for instance, the XAML is called window.xaml and within the window.xaml.cs

protected Dictionary

        
11条回答
  •  没有蜡笔的小新
    2020-11-28 04:55

    I was having this exact same problem but mine wasn't because I was setting a local variable... I was in a child window, and I needed to set a relative DataContext which I just added to the Window XAML.

    
    

提交回复
热议问题