private void CreateTableHeader(Grid superGrid)
        {
            var rowDef = new RowDefinition();

            rowDef.Height = new GridLength(DisplayConstants.Dimensions.Forms.SuperGrid.TableHeaderHeight);
            superGrid.RowDefinitions.Add(rowDef);

            for (int i = 0; i <= 6; i++)
            {
                var dockPanel = new DockPanel();

                var brush = EasyColour.LinearGradientBrushFromHex(DisplayConstants.Colours.GridView.HeaderRowGradientStart,
                                                                  DisplayConstants.Colours.GridView.HeaderRowGradientEnd,
                                                                  90.0);
                dockPanel.Background = brush;

                Grid.SetRow(dockPanel, 0);
                Grid.SetColumn(dockPanel, i);

                var borderTop = BorderFactory.BevelTop(SuperGridColours.HeaderRowBorderTop);
                Grid.SetRow(borderTop, 0);
                Grid.SetColumn(borderTop, i);

                var borderBot = BorderFactory.BevelBottom(SuperGridColours.HeaderRowBorderBottom);
                Grid.SetRow(borderBot, 0);
                Grid.SetColumn(borderBot, i);

                var borderRight = BorderFactory.BevelRight(SuperGridColours.HeaderRowBorderBottom);
                Grid.SetRow(borderRight, 0);
                Grid.SetColumn(borderRight, i);

                var borderLeft = BorderFactory.BevelLeft(SuperGridColours.HeaderRowBorderLeft);
                Grid.SetRow(borderLeft, 0);
                Grid.SetColumn(borderLeft, i);



                superGrid.Children.Add(dockPanel);
                superGrid.Children.Add(borderTop);
                superGrid.Children.Add(borderBot);
                superGrid.Children.Add(borderRight);
                superGrid.Children.Add(borderLeft);



                var label = Labels.SuperGridTitle();
                EasyLayout.SetPosition(superGrid, label, 0, i);

                var split = new GridSplitter();
                split.HorizontalAlignment = HorizontalAlignment.Right;
                split.ResizeDirection     = GridResizeDirection.Columns;
                split.Background          = new SolidColorBrush(Colors.Transparent);
                split.Width = 5;

                EasyLayout.SetPosition(superGrid, split, 0, i);
            }
        }
Beispiel #2
0
        public Grid Fabricate()
        {
            var contentGrid = new Grid();

            contentGrid.Background = EasyColour.BrushFromHex(DisplayConstants.Colours.Forms.PanelBackgroundWhite);

            // Title Bar : Row 0
            var row = new RowDefinition();

            row.Height = new GridLength(DisplayConstants.Dimensions.Forms.RdpSection.TitleBarHeight);
            contentGrid.RowDefinitions.Add(row);

            var title = Labels.SectionTitle();

            EasyLayout.SetPosition(contentGrid, title, 0, 0);

            // Header Bar : Row 1
            row        = new RowDefinition();
            row.Height = new GridLength(DisplayConstants.Dimensions.Forms.RdpSection.HeaderBarHeight);
            contentGrid.RowDefinitions.Add(row);

            var panel = new DockPanel();

            panel.Background = EasyColour.BrushFromHex(DisplayConstants.Colours.Forms.StandardBackgroundGrey);

            var thick = new Thickness(DisplayConstants.Dimensions.Forms.RdpSection.PaddingLeft, 0, DisplayConstants.Dimensions.Forms.RdpSection.PaddingRight, 0);

            panel.Margin = thick;
            Grid.SetRow(panel, 1);

            // Action Bar : Row 2
            CreateActionBar(contentGrid);

            contentGrid.Children.Add(panel);

            // Content Grid : Row 3
            row = new RowDefinition();
            contentGrid.RowDefinitions.Add(row);
            CreateSuperGrid(contentGrid);

            return(contentGrid);
        }