'System.Reflection.TargetInvocationException' occurred in PresentationFramework.dll

后端 未结 5 655
时光取名叫无心
时光取名叫无心 2021-02-03 21:03

Okay, I have a bit of a weird bug...

This works fine:

private void radioButtonNormalPoint_Checked(object sender, RoutedEventArgs e)
{
   //comboBoxNormal         


        
5条回答
  •  北恋
    北恋 (楼主)
    2021-02-03 21:42

    The event is probably raised before the elements are fully loaded or the references are still unset, hence the exceptions. Try only setting properties if the reference is not null and IsLoaded is true.

提交回复
热议问题