Interface IUserInterfaceService
User interface service interface.
public interface IUserInterfaceService
- Extension Methods
Properties
ActiveWindow
Gets the active window, which will either be the main application window or a nested modal dialog box window.
Window ActiveWindow { get; }
Property Value
Remarks
This returns the active window from the perspective of the application, irrespective of whether the application is activated (i.e., has focus). Any active message box has no effect on this property (though message boxes will by default use the window specified by this property as their parent window). A dialog box is currently being displayed if ActiveWindow does not equal MainWindow.
This will only be accurate if all dialogs and message boxes are invoked via the members of this interface.
IsDialogOrMessageBoxShown
Gets whether a modal dialog or message box is currently open.
bool IsDialogOrMessageBoxShown { get; }
Property Value
Remarks
This will only be accurate if all dialogs and message boxes are invoked via the members of this interface.
IsMessageBoxShown
Gets whether a message box is currently open.
bool IsMessageBoxShown { get; }
Property Value
Remarks
This will only be accurate if all dialogs and message boxes are invoked via the members of this interface.
MainWindow
Gets the main application window.
Window MainWindow { get; }
Property Value
Methods
SetMessageBoxFontSize(double)
Sets the message box font size.
void SetMessageBoxFontSize(double fontSize)
Parameters
fontSize
doubleThe new font size.
ShowAboutBox()
Displays the standard Acuit Pinpoint application about box.
[Obsolete("This is deprecated and will be removed in a future version.")]
void ShowAboutBox()
ShowAboutBox(string)
Displays the standard Acuit Pinpoint application about box.
[Obsolete("This is deprecated and will be removed in a future version.")]
void ShowAboutBox(string additionalDescription)
Parameters
additionalDescription
stringAdditional description text, that will appear in the dialog box below the assembly description.
ShowDialog(Window)
Displays a dialog box.
bool ShowDialog(Window view)
Parameters
view
WindowThe window to use as the dialog box.
Returns
- bool
If the view implements IWithDialogResult, then its DialogResult value will be returned; otherwise, if the DataContext of
view
implements IWithDialogResult, then its DialogResult value will be returned; otherwise, the result of ShowDialog() will be returned (returning false if it returns null).
ShowDialog(Window, object)
Displays a dialog box, using the supplied view model.
bool ShowDialog(Window view, object viewModel)
Parameters
view
WindowThe window to use as the dialog box.
viewModel
objectThe object to use as the view model.
Returns
- bool
If the view implements IWithDialogResult, then its DialogResult value will be returned; otherwise, if the view model implements IWithDialogResult, then its DialogResult value will be returned; otherwise, the result of ShowDialog() will be returned (returning false if it returns null).
Remarks
The DataContext property of view
will be set to viewModel
.
ShowMessageBox(MessageBoxImage, string, params object[])
Displays a message box.
MessageBoxResult ShowMessageBox(MessageBoxImage icon, string format, params object[] args)
Parameters
icon
MessageBoxImageThe message box icon.
format
stringThe message text format string.
args
object[]The message text arguments.
Returns
- MessageBoxResult
The message box result.
ShowMessageBox(MessageBoxImage, MessageBoxButton, string, params object[])
Displays a message box.
MessageBoxResult ShowMessageBox(MessageBoxImage icon, MessageBoxButton button, string format, params object[] args)
Parameters
icon
MessageBoxImageThe message box icon.
button
MessageBoxButtonThe message box button(s) to show.
format
stringThe message text format string.
args
object[]The message text arguments.
Returns
- MessageBoxResult
The message box result.
WaitCursor()
Gets a disposable object that shows a wait cursor and removes it when the object is disposed.
IDisposable WaitCursor()
Returns
- IDisposable
A disposable object that shows and hides a wait cursor.