combit List & Label 25 - .NET Online Web Help
IsDesignMode Property (DrawDesignerObjectEventArgs)
Example 


combit.ListLabel25 Namespace > DrawDesignerObjectEventArgs Class : IsDesignMode Property
Returns 'true' if the view in the Designer is 'Layout' or 'Layout Preview'. You can control if only the first page of the Designer object has to be drawn in design mode. If 'false' is returned, it means that you are in print mode and drawing has to be made for the complete Designer object.
Syntax
'Declaration
 
Public ReadOnly Property IsDesignMode As Boolean
public bool IsDesignMode {get;}
public:
property bool IsDesignMode {
   bool get();
}
Example
class MyDesignerObject : DesignerObject
{
	// ...
	protected override void OnDrawDesignerObject(DrawDesignerObjectEventArgs e)
	{
		// Design mode or print mode?
		if (e.IsDesignMode)
			e.PrintFinished = true;
		else
			e.PrintFinished = _lastPage; // Last page?
		
		// ...
	}
	// ...
}
Class MyDesignerObject
	Inherits DesignerObject
	' ...
	Protected Overrides Sub OnDrawDesignerObject(e As DrawDesignerObjectEventArgs)
		' Design mode or print mode?
		If e.IsDesignMode Then
			e.PrintFinished = True
		Else
			e.PrintFinished = _lastPage ' Last page?
		End If
		' ...
	End Sub
	' ...
End Class
Requirements

Platforms: Windows 7 SP1 - Windows 10 Version 1909, Windows Server 2008 R2 - 2019

See Also

Reference

DrawDesignerObjectEventArgs Class
DrawDesignerObjectEventArgs Members