WPF Getting Control null reference during InitializeComponent

前端 未结 6 2108
-上瘾入骨i
-上瘾入骨i 2021-02-05 10:13

So my InitializeComponent method call in the Window\'s constructor is running through the XML and adding the controls and plugging them into their events.

6条回答
  •  遥遥无期
    2021-02-05 10:30

    It was the Checked event on a radiobutton. When i removed Checked="true" from the xaml the issue went away. (though it is checked when the Window starts). Not sure what's going on here, but at least I didn't have to change anything major to fix it... yet.

提交回复
热议问题