简体   繁体   English

指定拆分器窗格的颜色

[英]Specify color for splitter pane

i want to specify color for a pane splitter and this is the color i want: #7FC6C8 I try that it work but how can specify for this color and this the code:我想为窗格拆分器指定颜色,这是我想要的颜色: #7FC6C8我尝试它可以工作,但how can specify for this color和代码:

 @Html.DevExpress().Splitter(
        settings =>
        {
            settings.Name = "body";
            settings.Orientation = Orientation.Vertical;
            settings.FullscreenMode = true;
            settings.ShowCollapseBackwardButton = true;
            settings.SeparatorVisible = false;

            settings.Panes.Add(pane =>
            {
                pane.Name = "FirstSplitter";
                pane.Size = Unit.Pixel(85);


                ****pane.PaneStyle.BackColor = System.Drawing.Color.Red;****

                pane.Panes.Add(contentPane =>
                {
                    contentPane.PaneStyle.BorderTop.BorderWidth = Unit.Pixel(0);
                    contentPane.PaneStyle.BorderBottom.BorderWidth = Unit.Pixel(0);
                    contentPane.PaneStyle.BorderRight.BorderWidth = Unit.Pixel(0);
                    contentPane.PaneStyle.BorderLeft.BorderWidth = Unit.Pixel(0);

                    contentPane.Size = Unit.Percentage(8);

that's work but how can i specify a color #7FC6C8 : and this work but how specify the color **pane.PaneStyle.BackColor = System.Drawing.Color.Red;**and thank you这是可行的,但我如何指定颜色 #7FC6C8 :这项工作但如何指定颜色 **pane.PaneStyle.BackColor = System.Drawing.Color.Red;** 谢谢

Define the custom color in code and then use in when setting the BackColor.在代码中定义自定义颜色,然后在设置 BackColor 时使用。 So for #7FC6C8 that is 127,198,200.所以对于#7FC6C8 来说是 127,198,200。 7F = 127, C6 = 198 and C8 = 200: 7F = 127,C6 = 198 和 C8 = 200:

Color CustomColor = Color.FromArgb(127, 198, 200);
pane.PaneStyle.BackColor = CustomColor;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM