public TilesetViewer(string name) : base(name) { base.BackColor = Color.White; vScroll = new VScrollBar("vScroll"); vScroll.Visible = false; vScroll.BackColor = Color.Transparent; vScroll.ValueChanged += new EventHandler<ValueChangedEventArgs>(vScroll_ValueChanged); hScroll = new HScrollBar("hScroll"); hScroll.Visible = false; hScroll.BackColor = Color.Transparent; hScroll.ValueChanged += new EventHandler<ValueChangedEventArgs>(hScroll_ValueChanged); base.Click += new EventHandler<SdlDotNet.Widgets.MouseButtonEventArgs>(TilesetViewer_Click); base.MouseEnter += new EventHandler(TilesetViewer_MouseEnter); base.MouseLeave += new EventHandler(TilesetViewer_MouseLeave); selectedTile = new Point(0, 0); this.AddWidget(vScroll); this.AddWidget(hScroll); base.Paint += new EventHandler(TilesetViewer_Paint); }
public kitMapReport(string name) : base(name) { enabled = true; base.BackColor = Color.Transparent; lstMaps = new ListBox("lstMaps"); lstMaps.Location = new Point(5, 5); lstMaps.MultiSelect = false; lstMaps.Height = 300; for (int i = 0; i < 10; i++) { ListBoxTextItem lbiMaps = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), "");//(i + 1) + ": " + MapName); lstMaps.Items.Add(lbiMaps); } vsbMaps = new VScrollBar("vsbMaps"); vsbMaps.ValueChanged += new EventHandler<ValueChangedEventArgs>(vsbMaps_ValueChanged); vsbMaps.Maximum = 0; btnLoadMapNames = new Button("btnLoadMapNames"); btnLoadMapNames.Size = new Size(100, 30); btnLoadMapNames.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 12); btnLoadMapNames.Text = "Load Maps"; Skins.SkinManager.LoadButtonGui(btnLoadMapNames); btnLoadMapNames.Click += new EventHandler<MouseButtonEventArgs>(btnLoadMapNames_Click); lblFindMap = new Label("lblFindMap"); lblFindMap.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 12); lblFindMap.AutoSize = true; lblFindMap.Text = "Search for maps"; lblFindMap.ForeColor = Color.WhiteSmoke; lblFindMap.Hide(); txtFindMap = new TextBox("txtFindMap"); txtFindMap.KeyDown += new EventHandler<SdlDotNet.Input.KeyboardEventArgs>(txtFindMap_KeyDown); txtFindMap.Hide(); lstFindResults = new ListBox("lstFindResults"); lstFindResults.MultiSelect = false; lstFindResults.Hide(); this.AddWidget(lstMaps); this.AddWidget(vsbMaps); this.AddWidget(btnLoadMapNames); this.AddWidget(lblFindMap); this.AddWidget(txtFindMap); this.AddWidget(lstFindResults); }
public PackageScroller(string name) : base(name) { this.Size = new Size(212, 300); this.BackColor = Color.White; vScroll = new VScrollBar("vScroll"); vScroll.BackColor = Color.Transparent; vScroll.Size = new Size(12, this.Height); vScroll.Location = new Point(this.Width - vScroll.Width, 0); vScroll.Minimum = 1; vScroll.Value = 1; vScroll.ValueChanged += new EventHandler<ValueChangedEventArgs>(vScroll_ValueChanged); buttons = new List<PackageButton>(); maxVisibleButtons = (this.Height / PackageButton.BUTTON_HEIGHT) - 1; this.AddWidget(vScroll); }
static void scroll_EventScrollChangePosition(VScrollBar _sender, uint _position) { Export.DebugOut("EventScrollChangePosition position=" + _position.ToString()); }
public void InitializeComponent() { table = new TableLayoutPanel(); view = new ViewportPanel(); scroll = new VScrollBar(); scroll.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Bottom; view.Dock = DockStyle.Fill; table.Dock = DockStyle.Fill; table.RowStyles.Add(new RowStyle(SizeType.Percent, 100)); table.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100)); table.ColumnStyles.Add(new ColumnStyle(SizeType.AutoSize, 0)); table.RowCount = 1; table.ColumnCount = 2; table.Controls.Add(view); table.Controls.Add(scroll); table.SetColumn(view, 0); table.SetColumn(scroll, 1); scroll.Scroll += (sender, e) => OnScroll(e); view.Paint += (sender, e) => OnPaint(e); Controls.Add(table); }
override protected void CreateChildren() { base.CreateChildren(); /** * Note: this demo HAS the overall scroller, but the stage itself SEEMS not to scroll * That's because we pushed the scrolled 150 px from both right and bottom * so we could place additional scrollbars there. * */ #region Scroller + viewport Scroller scroller = new Scroller { SkinClass = typeof (ScrollerSkin2), Left = 10, Right = 150, Top = 10, Bottom = 150 }; //scroller.SetStyle("horizontalScrollPolicy", ScrollPolicy.On); //scroller.SetStyle("verticalScrollPolicy", ScrollPolicy.On); AddChild(scroller); Group viewport = new Group(); scroller.Viewport = viewport; #endregion #region Horizontal scrollers HGroup hGroup = new HGroup { Gap = 10 }; viewport.AddChild(hGroup); VGroup hScrollers = new VGroup { PercentWidth = 100, Gap = 10, Left = 10, Right = 150, Bottom = 10 }; AddChild(hScrollers); HScrollBar hScroll = new HScrollBar { SkinClass = typeof(HScrollBarSkin3), PercentWidth = 100, Maximum = 600, Viewport = viewport, MouseWheelScrollsHorizontally = true }; hScrollers.AddChild(hScroll); hScroll = new HScrollBar { SkinClass = typeof(HScrollBarSkin2), PercentWidth = 100, Maximum = 600, Viewport = viewport, }; hScrollers.AddChild(hScroll); hScroll = new HScrollBar { PercentWidth = 100, Maximum = 600, Viewport = viewport, }; hScrollers.AddChild(hScroll); #endregion #region Vertical scrollers HGroup vScrollers = new HGroup { PercentHeight = 100, Gap = 10, Right = 10, Top = 10, Bottom = 150 }; AddChild(vScrollers); VScrollBar vScroll = new VScrollBar { SkinClass = typeof(VScrollBarSkin3), PercentHeight = 100, Maximum = 600, Viewport = viewport }; vScrollers.AddChild(vScroll); vScroll = new VScrollBar { SkinClass = typeof(VScrollBarSkin2), PercentHeight = 100, Maximum = 600, Viewport = viewport }; vScrollers.AddChild(vScroll); vScroll = new VScrollBar { PercentHeight = 100, Maximum = 600, Viewport = viewport }; vScrollers.AddChild(vScroll); #endregion #region Content VGroup vGroup = new VGroup { Id = "vGroup", VerticalAlign = VerticalAlign.Middle, HorizontalCenter = 0, VerticalCenter = 0, PaddingLeft = 10, PaddingRight = 10, PaddingTop = 10, PaddingBottom = 10, Gap = 10 }; vGroup.SetStyle("showBackground", true); vGroup.SetStyle("backgroundColor", Color.white); hGroup.AddChild(vGroup); HGroup hgroup = new HGroup(); vGroup.AddChild(hgroup); _btn = new Button { Text = "Default button", FocusEnabled = false, Icon = ImageLoader.Instance.Load("Icons/page_white_text"), MinWidth = 200, MinHeight = 150 }; /* Let's just add a panel to the bottom row on double-clicking this button */ _btn.DoubleClick += delegate { AddPanel(); }; hgroup.AddChild(_btn); _btn = new Button { Text = "Default toggle", FocusEnabled = false, ToggleMode = true, Selected = true, Icon = ImageLoader.Instance.Load("Icons/page_white_text") }; hgroup.AddChild(_btn); _btn = new Button { Text = "Styled button", SkinClass = typeof (ButtonSkin2), FocusEnabled = false, Icon = ImageLoader.Instance.Load("Icons/page_white_text"), MinWidth = 200, MinHeight = 150 }; hgroup.AddChild(_btn); _btn = new Button { Text = "Styled toggle", SkinClass = typeof (ButtonSkin2), FocusEnabled = false, ToggleMode = true, Selected = true, Icon = ImageLoader.Instance.Load("Icons/page_white_text") }; hgroup.AddChild(_btn); // nice buttons 1st row hgroup = new HGroup(); vGroup.AddChild(hgroup); _btn = new Button { Text = "Option 1", SkinClass = typeof (ButtonSkin4), FocusEnabled = false, Icon = ImageLoader.Instance.Load("IconsBig/arkshany-bookmarks"), MinWidth = 200, MinHeight = 200 }; hgroup.AddChild(_btn); _btn = new Button { Text = "Option 2", SkinClass = typeof (ButtonSkin4), FocusEnabled = false, Icon = ImageLoader.Instance.Load("IconsBig/arkshany-bookmarks"), MinWidth = 200, MinHeight = 200 }; hgroup.AddChild(_btn); _btn = new Button { Text = "Option 3", SkinClass = typeof (ButtonSkin4), FocusEnabled = false, Icon = ImageLoader.Instance.Load("IconsBig/arkshany-bookmarks"), MinWidth = 200, MinHeight = 200, ToggleMode = true, Selected = true }; hgroup.AddChild(_btn); // nice buttons 2nd row hgroup = new HGroup(); vGroup.AddChild(hgroup); _btn = new MyButton { Text = "Option 1", SkinClass = typeof (ButtonSkin5), FocusEnabled = false, Icon = ImageLoader.Instance.Load("IconsBig/applications-games"), MinWidth = 200, MinHeight = 200 }; hgroup.AddChild(_btn); _btn = new MyButton2 { Text = "Option 2", SkinClass = typeof (ButtonSkin5), FocusEnabled = false, Icon = ImageLoader.Instance.Load("IconsBig/gconfeditor"), MinWidth = 200, MinHeight = 200 }; hgroup.AddChild(_btn); _btn = new Button { Text = "Option 3 (disabled)", SkinClass = typeof (ButtonSkin5), FocusEnabled = false, Icon = ImageLoader.Instance.Load("IconsBig/gtk-floppy"), MinWidth = 200, MinHeight = 200, Enabled = false }; hgroup.AddChild(_btn); // new row hgroup = new HGroup(); vGroup.AddChild(hgroup); // image var image = new Image { Texture = (Texture) Resources.Load("eDriven/Editor/Logo/logo2") }; hgroup.AddChild(image); // panel 1 _panel = new Panel { Title = "Panel 1", MinWidth = 200, MinHeight = 300 }; hgroup.AddChild(_panel); // panel 2 _panel = new Panel { SkinClass = typeof (PanelSkin3), Title = "Panel 2", MinWidth = 200, MinHeight = 300 }; hgroup.AddChild(_panel); // panel 3 _panel = new Panel { SkinClass = typeof (PanelSkin4), Title = "Panel 3", MinWidth = 200, MinHeight = 300 }; hgroup.AddChild(_panel); #endregion // new row (placeholder) _hgroup = new HGroup(); vGroup.AddChild(_hgroup); }
private void InitializeComponent() { this.m_grid = new System.Windows.Forms.TableLayoutPanel(); this.m_btnPrev = new System.Windows.Forms.Button(); this.m_btnNext = new System.Windows.Forms.Button(); this.m_headerPanel = new System.Windows.Forms.Panel(); this.m_dataPanel = new System.Windows.Forms.Panel(); this.m_scrollPanel = new System.Windows.Forms.Panel(); this.m_Scrollbar = new System.Windows.Forms.VScrollBar(); this.m_grid.SuspendLayout(); this.m_dataPanel.SuspendLayout(); this.m_scrollPanel.SuspendLayout(); this.SuspendLayout(); // // m_grid // this.m_grid.ColumnCount = 1; this.m_grid.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.m_grid.Controls.Add(this.m_btnPrev, 0, 0); this.m_grid.Controls.Add(this.m_btnNext, 0, 3); this.m_grid.Controls.Add(this.m_headerPanel, 0, 1); this.m_grid.Controls.Add(this.m_dataPanel, 0, 2); this.m_grid.Dock = System.Windows.Forms.DockStyle.Fill; this.m_grid.Location = new System.Drawing.Point(0, 0); this.m_grid.Name = "m_grid"; this.m_grid.RowCount = 4; this.m_grid.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.m_grid.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 40F)); this.m_grid.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.m_grid.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.m_grid.Size = new System.Drawing.Size(530, 426); this.m_grid.TabIndex = 0; // // m_btnPrev // this.m_btnPrev.Dock = System.Windows.Forms.DockStyle.Top; this.m_btnPrev.Location = new System.Drawing.Point(0, 0); this.m_btnPrev.Margin = new System.Windows.Forms.Padding(0); this.m_btnPrev.Name = "m_btnPrev"; this.m_btnPrev.Size = new System.Drawing.Size(530, 23); this.m_btnPrev.TabIndex = 0; this.m_btnPrev.Text = "button1"; this.m_btnPrev.UseVisualStyleBackColor = true; // // m_btnNext // this.m_btnNext.Dock = System.Windows.Forms.DockStyle.Bottom; this.m_btnNext.Location = new System.Drawing.Point(0, 403); this.m_btnNext.Margin = new System.Windows.Forms.Padding(0); this.m_btnNext.Name = "m_btnNext"; this.m_btnNext.Size = new System.Drawing.Size(530, 23); this.m_btnNext.TabIndex = 1; this.m_btnNext.Text = "button2"; this.m_btnNext.UseVisualStyleBackColor = true; // // m_headerPanel // this.m_headerPanel.Dock = System.Windows.Forms.DockStyle.Fill; this.m_headerPanel.Location = new System.Drawing.Point(0, 23); this.m_headerPanel.Margin = new System.Windows.Forms.Padding(0); this.m_headerPanel.Name = "m_headerPanel"; this.m_headerPanel.Size = new System.Drawing.Size(530, 40); this.m_headerPanel.TabIndex = 2; // // m_dataPanel // this.m_dataPanel.Controls.Add(this.m_scrollPanel); this.m_dataPanel.Dock = System.Windows.Forms.DockStyle.Fill; this.m_dataPanel.Location = new System.Drawing.Point(0, 63); this.m_dataPanel.Margin = new System.Windows.Forms.Padding(0); this.m_dataPanel.Name = "m_dataPanel"; this.m_dataPanel.Size = new System.Drawing.Size(530, 340); this.m_dataPanel.TabIndex = 3; // // m_scrollPanel // this.m_scrollPanel.Controls.Add(this.m_Scrollbar); this.m_scrollPanel.Dock = System.Windows.Forms.DockStyle.Right; this.m_scrollPanel.Location = new System.Drawing.Point(511, 0); this.m_scrollPanel.Margin = new System.Windows.Forms.Padding(0); this.m_scrollPanel.Name = "m_scrollPanel"; this.m_scrollPanel.Size = new System.Drawing.Size(19, 340); this.m_scrollPanel.TabIndex = 5; // // m_Scrollbar // this.m_Scrollbar.Dock = System.Windows.Forms.DockStyle.Right; this.m_Scrollbar.Location = new System.Drawing.Point(0, 0); this.m_Scrollbar.Maximum = 1000; this.m_Scrollbar.Minimum = 1; this.m_Scrollbar.Name = "m_Scrollbar"; this.m_Scrollbar.Size = new System.Drawing.Size(19, 340); this.m_Scrollbar.TabIndex = 4; this.m_Scrollbar.Value = 1; // // Calendar // this.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.Controls.Add(this.m_grid); this.Name = "Calendar"; this.Size = new System.Drawing.Size(530, 426); this.m_grid.ResumeLayout(false); this.m_dataPanel.ResumeLayout(false); this.m_scrollPanel.ResumeLayout(false); this.ResumeLayout(false); }
override protected void CreateChildren() { base.CreateChildren(); TitleLabel titleLabel = new TitleLabel { Text = "Scrollbar Demo", StyleName = "title", Right = 20, Top = 20 }; AddChild(titleLabel); #region Scroller Scroller scroller = new Scroller { SkinClass = typeof (ScrollerSkin2), Left = 0, Right = 0, Top = 0, Bottom = 0, }; //scroller.SetStyle("horizontalScrollPolicy", ScrollPolicy.On); //scroller.SetStyle("verticalScrollPolicy", ScrollPolicy.On); AddChild(scroller); Group viewport = new Group { Layout = new VerticalLayout { HorizontalAlign = HorizontalAlign.Left, PaddingLeft = 10, PaddingRight = 10, PaddingTop = 10, PaddingBottom = 10, Gap = 10 } }; scroller.Viewport = viewport; #endregion #region Vertical scrollbars HGroup hGroup = new HGroup {Gap = 10, Id = "hbox2", PercentHeight = 100}; viewport.AddChild(hGroup); VScrollBar s = new VScrollBar {PercentHeight = 100, Maximum = 300}; s.Change += delegate(Event e) { Debug.Log("Change: " + e); }; hGroup.AddChild(s); s = new VScrollBar {PercentHeight = 100, Maximum = 400, PageSize = 100}; hGroup.AddChild(s); s = new VScrollBar {SkinClass = typeof (VScrollBarSkin2), PercentHeight = 100, Maximum = 1000, PageSize = 100}; hGroup.AddChild(s); s = new VScrollBar {SkinClass = typeof (VScrollBarSkin2), Height = 400, Maximum = 400, PageSize = 100}; hGroup.AddChild(s); s = new VScrollBar {SkinClass = typeof (VScrollBarSkin3), PercentHeight = 100, Maximum = 200, PageSize = 100}; hGroup.AddChild(s); s = new VScrollBar {SkinClass = typeof (VScrollBarSkin3), Height = 400, Maximum = 300, PageSize = 100}; hGroup.AddChild(s); #endregion #region Horizontal scrollbars Label label = new Label {Text = "Will change the skin on drag: "}; viewport.AddChild(label); HScrollBar scrollBar1 = new HScrollBar {Width = 300, Maximum = 300, PageSize = 100}; scrollBar1.Change += delegate(Event e) { scrollBar1.SkinClass = typeof (HScrollBarSkin3); }; viewport.AddChild(scrollBar1); label = new Label {Text = "Will change the skin on drag: "}; viewport.AddChild(label); _scrollbar2 = new HScrollBar {PercentWidth = 100, Maximum = 500, Value = 200, PageSize = 100}; _scrollbar2.Change += delegate(Event e) { _scrollbar2.SkinClass = typeof (HScrollBarSkin3); }; viewport.AddChild(_scrollbar2); HScrollBar scrollbar3 = new HScrollBar { SkinClass = typeof (HScrollBarSkin2), MinWidth = 600, Maximum = 1000, PageSize = 100 }; viewport.AddChild(scrollbar3); HScrollBar scrollbar4 = new HScrollBar { SkinClass = typeof (HScrollBarSkin3), MinWidth = 700, Maximum = 300, PageSize = 100 }; viewport.AddChild(scrollbar4); HScrollBar scrollbar5 = new HScrollBar { PercentWidth = 100, MinWidth = 600, SkinClass = typeof (HScrollBarSkin3), Maximum = 1000, PageSize = 100 }; viewport.AddChild(scrollbar5); #endregion }
override protected void CreateChildren() { base.CreateChildren(); #region Controls Toolbar toolbar = new Toolbar(); AddChild(toolbar); #region Alert Button btnAlert = new Button { Text = "Alert", FocusEnabled = false, SkinClass = typeof(ImageButtonSkin), Icon = ImageLoader.Instance.Load("Icons/comment") }; btnAlert.Click += delegate { Alert.Show("Info", "This is the example alert.", AlertButtonFlag.Ok, new AlertOption(AlertOptionType.HeaderIcon, Resources.Load<Texture>("Icons/information")), new AlertOption(AlertOptionType.Icon, Resources.Load<Texture>("Icons/star_big"))); }; toolbar.AddContentChild(btnAlert); #endregion #region Window Button btnWindow = new Button { Text = "New window", FocusEnabled = false, SkinClass = typeof(ImageButtonSkin), Icon = ImageLoader.Instance.Load("Icons/comment") }; btnWindow.Click += delegate { _count++; var window = new MyWindow { Title = "The Window " + _count, Id = "window_" + _count, SkinClass = typeof(WindowSkin2), Icon = ImageLoader.Instance.Load("Icons/balloon_32"), Width = 400, Height = 600 }; window.SetStyle("addedEffect", _windowShow); window.Plugins.Add(new Resizable { ShowOverlay = false }); window.AddEventListener(CloseEvent.CLOSE, delegate { PopupManager.Instance.RemovePopup(window); }); PopupManager.Instance.AddPopup(window, false); PopupManager.Instance.CenterPopUp(window); }; toolbar.AddContentChild(btnWindow); #endregion #endregion #region Scroller Scroller scroller = new Scroller { SkinClass = typeof (ScrollerSkin2), PercentWidth = 100, PercentHeight = 100 }; //scroller.SetStyle("horizontalScrollPolicy", ScrollPolicy.On); //scroller.SetStyle("verticalScrollPolicy", ScrollPolicy.On); AddChild(scroller); Group viewport = new Group { Layout = new VerticalLayout { HorizontalAlign = HorizontalAlign.Left, PaddingLeft = 10, PaddingRight = 10, PaddingTop = 10, PaddingBottom = 10, Gap = 10 } }; scroller.Viewport = viewport; #endregion #region Horizontal Scrollbars viewport.AddChild(new HScrollBar { SkinClass = typeof(HScrollBarSkin3), PercentWidth = 100, MinWidth = 300, Maximum = 300, PageSize = 100 }); viewport.AddChild(new HScrollBar { SkinClass = typeof(HScrollBarSkin3), PercentWidth = 50, Maximum = 500, Value = 200, PageSize = 100 }); viewport.AddChild(new HScrollBar { SkinClass = typeof(HScrollBarSkin2), MinWidth = 600, Maximum = 1000, PageSize = 100 }); viewport.AddChild(new HScrollBar { SkinClass = typeof(HScrollBarSkin3), MinWidth = 700, Maximum = 300, PageSize = 100 }); viewport.AddChild(new HScrollBar { PercentWidth = 100, MinWidth = 600, SkinClass = typeof(HScrollBarSkin3), Maximum = 1000, PageSize = 100 }); #endregion #region HGroup HGroup hGroup = new HGroup { /*PercentWidth = 100, */Gap = 10 }; viewport.AddChild(hGroup); #endregion #region Vertical scrollbars VScrollBar vScrollBar = new VScrollBar { PercentHeight = 100, Maximum = 300 }; vScrollBar.Change += delegate(Event e) { Debug.Log("Change: " + e); }; hGroup.AddChild(vScrollBar); hGroup.AddChild(new VScrollBar { PercentHeight = 100, Maximum = 400, PageSize = 100 }); hGroup.AddChild(new VScrollBar { SkinClass = typeof(VScrollBarSkin2), PercentHeight = 100, Maximum = 1000, PageSize = 100 }); hGroup.AddChild(new VScrollBar { SkinClass = typeof(VScrollBarSkin2), Height = 400, Maximum = 400, PageSize = 100 }); hGroup.AddChild(new VScrollBar { SkinClass = typeof(VScrollBarSkin3), PercentHeight = 100, Maximum = 200, PageSize = 100 }); hGroup.AddChild(new VScrollBar { SkinClass = typeof(VScrollBarSkin3), Height = 400, Maximum = 300, PageSize = 100 }); #endregion #region Panels //hGroup.AddChild(new Spacer { PercentWidth = 50 }); Panel panel = new MyPanel { Width = 360, Height = 600, Icon = ImageLoader.Instance.Load("Icons/shape_square_add"), Title = "First panel", StyleName = "default" }; hGroup.AddChild(panel); panel = new MyPanel2 { MaxWidth = 500, Height = 600, SkinClass = typeof (PanelSkin2), Icon = ImageLoader.Instance.Load("Icons/page_white_text"), Title = "Second panel" }; panel.SetStyle("titleColor", 0xffff00); hGroup.AddChild(panel); //hGroup.AddChild(new Spacer { PercentWidth = 50 }); #endregion #region Vertical sliders hGroup.AddChild(new VSlider { PercentHeight = 100 }); hGroup.AddChild(new VSlider { Width = 30, Height = 400, SkinClass = typeof(VSliderSkin2) }); hGroup.AddChild(new VSlider { Width = 30, Height = 400, SkinClass = typeof(VSliderSkin2), Enabled = false }); hGroup.AddChild(new VSlider { Width = 50, Height = 400, SkinClass = typeof(VSliderSkin2) }); hGroup.AddChild(new VSlider { Width = 80, Height = 400, SkinClass = typeof(VSliderSkin3) }); hGroup.AddChild(new VSlider { Width = 80, PercentHeight = 100, Maximum = 1000, SkinClass = typeof(VSliderSkin3) }); #endregion #region Horizontal sliders viewport.AddChild(new HSlider { Maximum = 400, PercentWidth = 100 }); viewport.AddChild(new HSlider { Width = 400, Maximum = 400, Height = 30, SkinClass = typeof(HSliderSkin2) }); viewport.AddChild(new HSlider { Width = 400, Maximum = 400, Height = 50, SkinClass = typeof(HSliderSkin2) }); viewport.AddChild(new HSlider { PercentWidth = 50, Height = 80, SkinClass = typeof(HSliderSkin3) }); viewport.AddChild(new HSlider { PercentWidth = 100, Maximum = 1000, Height = 80, SkinClass = typeof(HSliderSkin3) }); #endregion }