WorkRunView.xaml.cs 724 B

1234567891011121314151617181920212223242526272829
  1. using System;
  2. using System.Threading;
  3. using System.Windows.Controls;
  4. namespace LampInspectionMachine.Views
  5. {
  6. /// <summary>
  7. /// WorkRunView.xaml 的交互逻辑
  8. /// </summary>
  9. public partial class WorkRunView : UserControl
  10. {
  11. public WorkRunView()
  12. {
  13. InitializeComponent();
  14. Loaded += WorkRunView_Loaded;
  15. }
  16. private void WorkRunView_Loaded(object sender, System.Windows.RoutedEventArgs e)
  17. {
  18. System.Windows.Application.Current.Dispatcher.BeginInvoke(new Action(() =>
  19. {
  20. Thread.Sleep(500);
  21. this.InvalidateVisual();
  22. this.UpdateLayout();
  23. }));
  24. }
  25. }
  26. }