LEADTOOLS Annotations for WPF and Silverlight (Leadtools.Windows.Annotations assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.31
UserMode Property
See Also 
Leadtools.Windows.Annotations Namespace > AnnAutomationManager Class : UserMode Property



The UserMode Property supports WPF/Silverlight.

The UserMode Property is available in LEADTOOLS Document and Medical Imaging toolkits.

Gets or sets the current user mode. Supported in Silverlight, Windows Phone 7

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;}
C++/CLI 
public:
property AnnUserMode UserMode {
   AnnUserMode get();
   void set (    AnnUserMode value);
}

Property Value

An AnnUserMode value that specifies the current user mode.

Example

This example flips the user mode between run and design.

Visual BasicCopy Code
Private 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
private void AnnAutomationManager_UserMode(AnnAutomationManager manager)
{
   if(manager.UserMode == AnnUserMode.Design)
      manager.UserMode = AnnUserMode.Run;
   else
      manager.UserMode = AnnUserMode.Design;
}
SilverlightCSharpCopy Code
private void AnnAutomationManager_UserMode(AnnAutomationManager manager)
{
   if(manager.UserMode == AnnUserMode.Design)
      manager.UserMode = AnnUserMode.Run;
   else
      manager.UserMode = AnnUserMode.Design;
}
SilverlightVBCopy Code
Private 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

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: Silverlight 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7, MAC OS/X (Intel Only)

See Also

UserMode requires a Document/Medical product license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features and Unlocking Special LEAD Features.