aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.SharedUI
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/Tango.SharedUI')
-rw-r--r--Software/Visual_Studio/Tango.SharedUI/ExtendedObject.cs18
1 files changed, 18 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.SharedUI/ExtendedObject.cs b/Software/Visual_Studio/Tango.SharedUI/ExtendedObject.cs
index 8e00f2e61..9068fc883 100644
--- a/Software/Visual_Studio/Tango.SharedUI/ExtendedObject.cs
+++ b/Software/Visual_Studio/Tango.SharedUI/ExtendedObject.cs
@@ -49,5 +49,23 @@ namespace Tango.SharedUI
}
}));
}
+
+ /// <summary>
+ /// Invokes the specified action on the UI Thread.
+ /// </summary>
+ /// <param name="action">The action.</param>
+ protected virtual void InvokeUI(Action action)
+ {
+ Application.Current.Dispatcher.BeginInvoke(action);
+ }
+
+ /// <summary>
+ /// Invokes the specified action on the UI Thread.
+ /// </summary>
+ /// <param name="action">The action.</param>
+ protected virtual void InvokeUINow(Action action)
+ {
+ Application.Current.Dispatcher.Invoke(action);
+ }
}
}