如题,在出现的界面中按F5键会调用xaml的后台文件(.cs)中的如下函数:private void Skip_Execute(object sender, ExecutedRoutedEventArgs e)
        {
            show_all_word_picture();
            success_wnd_is_create = true;
        }
private void Skip_Enable(object sender, CanExecuteRoutedEventArgs e)
        {
            e.CanExecute = true;
        }
private void show_all_word_picture()
        {
            /* 加亮所有文字 */
            for (int i = BeginNum; i <= EndNum; i++)
            { 
                try
                {
                    string control_name = "pictureBox" + i.ToString();
                    var picturebox = this.FindName(control_name) as Image;
                    if (picturebox != null)
                    {
                        string pic_path = "image/" + i.ToString() + ".png";
                        picturebox.Source = LoadBitmapFromResource(pic_path);
                    }
                }
                catch (System.Exception ex)
                {
                }
                System.Threading.Thread.Sleep(100);            }
        }
 public static BitmapImage LoadBitmapFromResource(string pathInApplication, Assembly assembly = null)
        {
            if (assembly == null)
            {
                assembly = Assembly.GetCallingAssembly();
            }            if (pathInApplication[0] == '/')
            {
                pathInApplication = pathInApplication.Substring(1);
            }
            return new BitmapImage(new Uri(@"pack://application:,,,/" + assembly.GetName().Name + ";component/" + pathInApplication, UriKind.Absolute));
        }
根据断点跟踪,必须等Skip_Execute(object sender, ExecutedRoutedEventArgs e)函数执行完成后,show_all_word_picture()函数中修改的图片才会在屏幕上显示。请问各位大神这是什么原因。xaml图片c#