public void InitializeScrollsAndResizer()
        {
            VerticalScroll = new BvgScroll <TItem>
            {
                bvgGrid     = this,
                bsbSettings = new BsbSettings("VericalScroll")
                {
                    VerticalOrHorizontal = true,
                    width             = bvgSettings.ScrollSize,
                    height            = bvgSize.H,
                    ScrollVisibleSize = bvgSize.H - bvgSettings.HeaderHeight,
                    ScrollTotalSize   = RowsTotalCount * bvgSettings.RowHeight,
                    bsbStyle          = new BsbStyle
                    {
                        ButtonColor   = bvgSettings.VerticalScrollStyle.ButtonColor,
                        ThumbColor    = bvgSettings.VerticalScrollStyle.ThumbColor,
                        ThumbWayColor = bvgSettings.VerticalScrollStyle.ThumbWayColor,
                    }
                }
            };
            VerticalScroll.ID = VerticalScroll.bsbSettings.ID;
            VerticalScroll.bsbSettings.initialize();



            HorizontalScroll = new BvgScroll <TItem>
            {
                bvgGrid     = this,
                bsbSettings = new BsbSettings("HorizontalScroll")
                {
                    VerticalOrHorizontal = false,
                    width             = bvgSize.W,
                    height            = bvgSettings.ScrollSize,
                    ScrollVisibleSize = 0,
                    ScrollTotalSize   = 0,
                    bsbStyle          = new BsbStyle
                    {
                        ButtonColor   = bvgSettings.HorizontalScrollStyle.ButtonColor,
                        ThumbColor    = bvgSettings.HorizontalScrollStyle.ThumbColor,
                        ThumbWayColor = bvgSettings.HorizontalScrollStyle.ThumbWayColor,
                    }
                }
            };
            HorizontalScroll.ID = HorizontalScroll.bsbSettings.ID;


            ResizerBsSettings = new BsSettings(string.Concat("SplitterResizer"))
            {
                VerticalOrHorizontal = true,
                IsDiagonal           = true,
                index   = 0,
                width   = bvgSettings.ScrollSize,
                height  = bvgSettings.ScrollSize,
                BgColor = bvgSettings.VerticalScrollStyle.ThumbColor,
            };
        }
Exemplo n.º 2
0
        protected override void OnInitialized()
        {
            BSplitterCJsInterop.jsRuntime = jsRuntime;

            for (int i = 0; i < 6; i++)
            {
                CompBlazorSplitters_List_Cols.Add(new CompBlazorSplitter());
                Width_list_Cols.Add(100);

                CompBlazorSplitters_List_Rows.Add(new CompBlazorSplitter());
                Height_list_Rows.Add(30);
            }



            for (int i = 0; i < Values_Matrix.GetLength(0); i++)
            {
                for (int j = 0; j < Values_Matrix.GetLength(1); j++)
                {
                    Values_Matrix[i, j] = Guid.NewGuid().ToString("d").Substring(1, 4);
                }
            }

            for (int i = 0; i < 5; i++)
            {
                bsSettings_List_Cols.Add(new BsSettings("VerticalScroll" + i)
                {
                    index   = bsSettings_List_Cols.Count,
                    width   = 5,
                    height  = 40,
                    BgColor = "#bfbfbf",
                });


                bsSettings_List_Rows.Add(new BsSettings("HorizontalScroll" + 1)
                {
                    VerticalOrHorizontal = true,
                    index   = bsSettings_List_Rows.Count,
                    width   = 30,
                    height  = 5,
                    BgColor = "#b3ffb3",
                });
            }



            bsSettingPanel1 = new BsSettings("HorizontalScrollpanel")
            {
                VerticalOrHorizontal = true,
                index   = 0,
                width   = 200,
                height  = 4,
                BgColor = "#bfbfbf",
            };


            bsSettingPanel2 = new BsSettings("VerticalScrollpanel")
            {
                VerticalOrHorizontal = false,
                index   = 0,
                width   = 4,
                height  = 200,
                BgColor = "#b3ffb3",
            };


            base.OnInitialized();
        }