Table of Contents

Interface IUserInterfaceService

Namespace
Acuit.Pinpoint.Windows
Assembly
Acuit.Pinpoint.Windows.dll

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

Window

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

bool

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

bool

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

Window

Methods

SetMessageBoxFontSize(double)

Sets the message box font size.

void SetMessageBoxFontSize(double fontSize)

Parameters

fontSize double

The 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 string

Additional 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 Window

The 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 Window

The window to use as the dialog box.

viewModel object

The 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 MessageBoxImage

The message box icon.

format string

The 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 MessageBoxImage

The message box icon.

button MessageBoxButton

The message box button(s) to show.

format string

The 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.