Site Tools


Sample: Maximize a View

C#

public class MaximizeViewCommand : Command
{
 
  public override string EnglishName { get { return "csMaximizeView"; } }
 
  protected override Result RunCommand(RhinoDoc doc, RunMode mode)
  {
    var view = doc.Views.ActiveView;
    if (view != null)
      view.Maximized = true;
 
    return Result.Success;
  }
}

VB.NET

Public Class MaximizeViewCommand
  Inherits Command
 
  Public Overrides ReadOnly Property EnglishName() As String
    Get
      Return "vbMaximizeView"
    End Get
  End Property
 
  Protected Overrides Function RunCommand(doc As RhinoDoc, mode As RunMode) As Result
    Dim view As RhinoView = doc.Views.ActiveView
 
    If view IsNot Nothing Then
      view.Maximized = True
    End If
 
    Return Result.Success
  End Function
End Class
d Namespace
developer/rhinocommonsamples/maximizeview.txt ยท Last modified: 2015/09/14 (external edit)