忙碌进度条
private TMCBusyIndicator()
{
InitializeComponent();
}
public static object o=new object();
private static TMCBusyIndicator instance;
public static TMCBusyIndicator Instance
{
get
{
lock (o)
{
if (instance == null)
{
instance = new TMCBusyIndicator();
instance.ShowInTaskbar = false;
}
return instance;
}
}
}
public void Start()
{
//this.busyIndicator.IsBusy = true;
this.Dispatcher.BeginInvoke(new Action(() => { ; }));
this.Visibility = Visibility.Visible;
this.Show();
}
public void Stop()
{
//this.busyIndicator.IsBusy = false;
this.Dispatcher.BeginInvoke(new Action(() => { ; }));
this.Visibility = Visibility.Hidden;
}
private void Button_Click(object sender, RoutedEventArgs e)
{
;
}