Leadtools.Annotations Requires Document/Medical product license | Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.10.31
UserMode Property
See Also  Example
Leadtools.Annotations Namespace > AnnAutomationManager Class : UserMode Property




Gets or sets the current user mode.

Syntax

Visual Basic (Declaration) 
Public Property UserMode As AnnUserMode
Visual Basic (Usage)Copy Code
Dim instance As AnnAutomationManager
Dim value As AnnUserMode
 
instance.UserMode = value
 
value = instance.UserMode
C# 
public AnnUserMode UserMode {get; set;}
Managed Extensions for C++ 
public: __property AnnUserMode get_UserMode();
public: __property void set_UserMode( 
   AnnUserMode value
);
C++/CLI 
public:
property AnnUserMode UserMode {
   AnnUserMode get();
   void set (AnnUserMode value);
}

Return Value

An AnnUserMode value that specifies the current user mode.

Example

This example flips the user mode between run and design.

Visual BasicCopy Code
Public Sub AnnAutomationManager_UserMode(ByVal manager As AnnAutomationManager)
   If manager.UserMode = AnnUserMode.Design Then
      manager.UserMode = AnnUserMode.Run
   Else
      manager.UserMode = AnnUserMode.Design
   End If
End Sub
C#Copy Code
public void AnnAutomationManager_UserMode(AnnAutomationManager manager) 

   if(manager.UserMode == AnnUserMode.Design) 
      manager.UserMode = AnnUserMode.Run; 
   else 
      manager.UserMode = AnnUserMode.Design; 
}

Remarks

AnnUserMode.Design is for creating objects; AnnUserMode.Run mode is for viewing them.

Switching the user mode to AnnUserMode.Run automatically hides the automation ToolBar. Setting the user mode to AnnUserMode.Design displays the ToolBar.

The UserModeChanged event is fired when this property is changed.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Leadtools.Annotations requires a Document or Medical toolkit license and unlock key. For more information, refer to: Raster Pro/Document/Medical Features