Northwoods.GoWeb Assembly > Northwoods.GoWeb Namespace > GoView Class : CreateSheet Method |
'Declaration Public Overridable Function CreateSheet() As GoSheet
public virtual GoSheet CreateSheet()
public virtual GoSheet CreateSheet() { GoSheet sheet = new GoSheet(); sheet.Visible = (this.SheetStyle != GoViewSheetStyle.None); sheet.Printable = false; sheet.Selectable = false; // the following three lines are executed only in WinForms, in a try-catch: PrintDocument pd = new PrintDocument(); PageSettings ps = pd.DefaultPageSettings; sheet.UpdateBounds(ps, this.PrintScale); GoRectangle paper = sheet.Paper; Color color = this.Document.PaperColor; if (color == Color.Empty) color = Color.White; paper.BrushColor = color; return sheet; }The BackgroundHasSheet setter will automatically call this method and set the Sheet property, which will add that sheet to this view's background layer, as if:
this.BackgroundLayer.Add(s);
Target Platforms: 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