Accessing a resource via codebehind in WPF

后端 未结 6 808
刺人心
刺人心 2020-12-01 07:06

I have a custom collection defined in my window resources as follows (in a Sketchflow app so the window is actually a UserControl):



        
6条回答
  •  一生所求
    2020-12-01 07:36

    You may also use this.Resources["mykey"]. I guess that is not much better than your own suggestion.

提交回复
热议问题