public override Control Generate (DynamicLayout layout) { if (rows.Count == 0) return null; int cols = rows.Max (r => r.Items.Count); if (Container == null) { Container = new Panel (); this.Layout = new TableLayout (Container, cols, rows.Count); } else { this.Layout = new TableLayout (null, cols, rows.Count); Container.SetInnerLayout (); } var tableLayout = this.Layout; var padding = this.Padding ?? layout.DefaultPadding; if (padding != null) tableLayout.Padding = padding.Value; var spacing = this.Spacing ?? layout.DefaultSpacing; if (spacing != null) tableLayout.Spacing = spacing.Value; for (int cy = 0; cy < rows.Count; cy++) { var row = rows[cy]; for (int cx = 0; cx < row.Items.Count; cx++) { var item = row.Items[cx]; item.Generate (layout, tableLayout, cx, cy); } } return Container; }
public virtual void SetParent(Eto.Forms.Container parent) { if (parent == null) { if (ContainerControl.Parent != null) { ((Gtk.Container)ContainerControl.Parent).Remove(ContainerControl); } } }
Control LoginSection () { var layout = new DynamicLayout (loginSection = new GroupBox{ Text = "Login"}); layout.Add (null); layout.AddRow (new Label { Text = "UserName" }, EditUserName ()); layout.AddRow (new Label { Text = "Password" }, EditPassword ()); layout.Add (null); return layout.Container; }
Control LoginSection() { var layout = new DynamicLayout(loginSection = new GroupBox{ Text = "Login"}); layout.Add(null); layout.BeginVertical(); layout.AddRow(new Label { Text = "User Name" }, EditUserName()); layout.AddRow(new Label { Text = "Password" }, EditPassword()); layout.EndVertical(); layout.AddSeparateRow(null, CreateAccountButton(), null); layout.Add(null); return layout.Container; }
Control SocialSection () { var layout = new DynamicLayout (socialSection = new GroupBox{ Text = "Janrain"}); layout.Add (null); layout.AddSeparateRow (new Label { Text = "App Name" }, JanrainAppName ()); layout.Add (null); layout.BeginVertical (); layout.AddRow (null, StatusLabel (), null); layout.AddRow (null, AuthButton(), null); layout.EndVertical (); layout.Add (null); return layout.Container; }
public JabbRServerEdit(JabbRServer server, DynamicLayout layout) { this.server = server; layout.AddRow(new Label { Text = "Address" }, EditAddress()); layout.EndBeginVertical(); layout.AddRow(UseSocialLogin()); layout.Add(authSection = new Panel { MinimumSize = new Size(0, 100) }); layout.EndBeginVertical(); LoginSection(); SocialSection(); authSection.DataContextChanged += (sender, e) => { SetVisibility(); }; }
public DockLayout(Container container) : base(container != null ? container.Generator : Generator.Current, container, typeof (IDockLayout)) { inner = (IDockLayout)Handler; }
public PixelLayout (Container container) : base (container != null ? container.Generator : Generator.Current, container, typeof (IPixelLayout), true) { inner = (IPixelLayout)Handler; }
public override void Generate(PreferencesDialog dialog, Container container) { var handler = dialog.Handler as IPreferencesDialog; handler.GenerateSection(this, container); }
public abstract void Generate(PreferencesDialog dialog, Container container);
public virtual void SetParent(Eto.Forms.Container parent) { }
protected override void CreateLayout(Container container) { var split = new Splitter{ Size = new Size(200, 200), Position = 50, FixedPanel = SplitterFixedPanel.Panel2 }; split.Panel1 = new Panel(); split.Panel2 = UserList = new UserList(this.Channel); base.CreateLayout(split.Panel1 as Panel); container.AddDockedControl(split); }
protected virtual void CreateLayout(Container container) { var layout = new DynamicLayout(container, Padding.Empty, Size.Empty); layout.Add(History, yscale: true); layout.Add(DockLayout.CreatePanel(TextEntry, new Padding(10))); }
public void SetParent(Container parent) { }
public override Control Generate (DynamicLayout layout) { if (rows.Count == 0) return null; int cols = rows.Where (r => r != null).Max (r => r.Items.Count); if (Container == null) { Container = new Panel (); this.Layout = new TableLayout (Container, cols, rows.Count); } else { this.Layout = new TableLayout (null, cols, rows.Count); layout.SetBaseInnerLayout(); } var tableLayout = this.Layout; var padding = this.Padding ?? layout.DefaultPadding; if (padding != null) tableLayout.Padding = padding.Value; var spacing = this.Spacing ?? layout.DefaultSpacing; if (spacing != null) tableLayout.Spacing = spacing.Value; var scalingRow = new DynamicRow (); scalingRow.Items.Add (new DynamicControl{ YScale = true }); for (int cy = 0; cy < rows.Count; cy++) { var row = rows[cy]; if (row == null) row = scalingRow; for (int cx = 0; cx < row.Items.Count; cx++) { var item = row.Items[cx]; if (item == null) item = new DynamicControl { XScale = true }; item.Generate (layout, tableLayout, cx, cy); } } return Container; }