This documentation is archived and is not being maintained.

IModalService Interface

Enables notification to a host application that a modal dialog is displayed.

Namespace:  System.Activities.Presentation
Assembly:  System.Activities.Presentation (in System.Activities.Presentation.dll)

public interface IModalService

The IModalService type exposes the following members.

  NameDescription
Public methodSetModalStateNotifies the host application that a modal dialog is being displayed.
Top

Some applications that host designers need to be notified when a modal dialog box has been invoked. Visual Studio is an example of such a host. The IModalService interface provides an interface to communicate the current modal status.

The Windows Workflow Designer calls the SetModalState(Boolean) method. When the isModal parameter is set to true, the host is notified that a modal dialog is displayed.

This is an optional service. If a host application does not care about the modal status, you need not use the service.

In the current implementation, if a Windows Presentation Foundation (WPF) message box (which is a modal dialog) is invoked, the SetModalState(Boolean)is not called. If the host application requires this information, another workaround must be created.

.NET Framework

Supported in: 4

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: