WPF Cross Thread Object Access

后端 未结 3 1055
南旧
南旧 2021-01-24 04:34

I have an issue regarding cross thread calls in WPF.

            foreach (RadioButton r in StatusButtonList)
        {
            StatusType status = null;
             


        
3条回答
  •  萌比男神i
    2021-01-24 04:54

        r.Dispatcher.Invoke(
          System.Windows.Threading.DispatcherPriority.Normal,
          new Action(
            delegate()
            {
                    // DO YOUR If... ELSE STATEMNT HERE
            }
        ));
    

提交回复
热议问题