private static void Initialize() { _style = new ProgramaticStyle { Style = _instance }; ScrollbarHelper.ApplyButtonStyle(_style, Width, Weight, TriangleDirection.Down); _style.FixedWidth = Width; _style.FixedHeight = Width; _style.Commit(); }
private static void Initialize() { const int w = (Weight + 1) * 2; _style = new ProgramaticStyle { Style = _instance }; ScrollbarHelper.ApplyThumbStyle(_style, w, Weight); _style.Commit(); }
private static void Initialize() { _style = new ProgramaticStyle { Font = FontMapper.GetDefault().Font, Style = _instance, Alignment = TextAnchor.MiddleCenter, Padding = new RectOffset(6, 6, 3, 3) }; const int w = (Weight + 1) * 2; int w2 = 18; //_style.FixedWidth = 100; //_style.FixedHeight = 100; _style.Border = new RectOffset(Weight + 1, Weight + 1, Weight + 1, Weight + 1); //_style.FontSize = 8; _style.NormalTextColor = new Color(0.1f, 0.1f, 0.1f, 1); _style.NormalGraphics = new Rect(w, w, new Fill(ColorMixer.FromHex(0xC0C0C0).ToColor()), new Stroke(Weight) { Color = ColorMixer.FromHex(0x404040).ToColor() } ); _style.HoverTextColor = new Color(0.1f, 0.1f, 0.1f, 1); _style.HoverGraphics = new Rect(w, w, new Fill(new Color(1f, 1f, 1f, 1f)), new Stroke(Weight) { Color = Color.grey } ); _style.ActiveTextColor = new Color(0.1f, 0.1f, 0.1f, 1); _style.ActiveGraphics = new Rect(w, w, new Fill(ColorMixer.FromHex(0x808080).ToColor()), new Stroke(Weight) { Color = ColorMixer.FromHex(0xD3D3D3).ToColor() } ); _style.OnNormalTextColor = Color.white; _style.OnNormalGraphics = new Rect(w, w, new Fill(ColorMixer.FromHex(0x808080).ToColor()), new Stroke(Weight) { Color = ColorMixer.FromHex(0xD3D3D3).ToColor() } ); ScrollbarHelper.ApplyButtonStyle(_style, w2, Weight, TriangleDirection.Up); _style.FixedWidth = w2; _style.FixedHeight = w2; _style.Commit(); //_style.FixedHeight = 20; //_style.FixedWidth = 100; }