/// <summary> /// Create the view hierarchy for this view mode. /// </summary> protected override void CreateCheckItemView() { // Create the view element that lays out the check buttons _layoutBar = new ViewLayoutBar(Navigator.StateCommon.Bar, PaletteMetricInt.CheckButtonGap, Navigator.Bar.ItemSizing, Navigator.Bar.ItemAlignment, Navigator.Bar.BarMultiline, Navigator.Bar.ItemMinimumSize, Navigator.Bar.ItemMaximumSize, Navigator.Bar.BarMinimumHeight, false); // Create the scroll spacer that restricts display _layoutBarViewport = new ViewLayoutViewport(Navigator.StateCommon.Bar, PaletteMetricPadding.BarPaddingInside, PaletteMetricInt.CheckButtonGap, Navigator.Header.HeaderPositionBar, Navigator.Bar.ItemAlignment, Navigator.Bar.BarAnimation); _layoutBarViewport.Add(_layoutBar); // Create the button bar area docker _layoutBarDocker = new ViewLayoutDocker(); _layoutBarDocker.Add(_layoutBarViewport, ViewDockStyle.Fill); // Place the bar inside a header style area _viewHeadingBar = new ViewDrawDocker(Navigator.StateNormal.HeaderGroup.HeaderBar.Back, Navigator.StateNormal.HeaderGroup.HeaderBar.Border, Navigator.StateNormal.HeaderGroup.HeaderBar, PaletteMetricBool.None, PaletteMetricPadding.HeaderGroupPaddingSecondary, VisualOrientation.Top); _viewHeadingBar.Add(_layoutBarDocker, ViewDockStyle.Fill); // Construct the viewlet instance _headerGroup = new ViewletHeaderGroup(Navigator, Redirector, NeedPaintDelegate); // Create and initialize the standard header group view elements _viewGroup = _headerGroup.Construct(_oldRoot); // Add the extra bar header alongside the standard primary and secondary headers _viewGroup.Insert(0, _viewHeadingBar); _viewGroup.SetDock(_viewHeadingBar, ViewDockStyle.Top); // Define the new root for the view hieararchy _newRoot = _viewGroup; // Must call the base class to perform common actions base.CreateCheckItemView(); }
/// <summary> /// Create the view hierarchy for this view mode. /// </summary> protected override void CreateCheckItemView() { // Create the view element that lays out the check buttons _layoutBar = new ViewLayoutBar(Navigator.StateCommon.Bar, PaletteMetricInt.CheckButtonGap, Navigator.Bar.ItemSizing, Navigator.Bar.ItemAlignment, Navigator.Bar.BarMultiline, Navigator.Bar.ItemMinimumSize, Navigator.Bar.ItemMaximumSize, Navigator.Bar.BarMinimumHeight, false); // Create the scroll spacer that restricts display _layoutBarViewport = new ViewLayoutViewport(Navigator.StateCommon.Bar, PaletteMetricPadding.BarPaddingInside, PaletteMetricInt.CheckButtonGap, Navigator.Header.HeaderPositionBar, Navigator.Bar.ItemAlignment, Navigator.Bar.BarAnimation); _layoutBarViewport.Add(_layoutBar); // Create the button bar area docker _layoutBarDocker = new ViewLayoutDocker(); _layoutBarDocker.Add(_layoutBarViewport, ViewDockStyle.Fill); // Place the bar inside a header style area _viewHeadingBar = new ViewDrawDocker(Navigator.StateNormal.HeaderGroup.HeaderBar.Back, Navigator.StateNormal.HeaderGroup.HeaderBar.Border, Navigator.StateNormal.HeaderGroup.HeaderBar, PaletteMetricBool.None, PaletteMetricPadding.HeaderGroupPaddingSecondary, VisualOrientation.Top); _viewHeadingBar.Add(_layoutBarDocker, ViewDockStyle.Fill); // Create the docker used to layout contents of main panel and fill with group _drawPanelDocker = new ViewDrawDocker(Navigator.StateNormal.HeaderGroup.Back, Navigator.StateNormal.HeaderGroup.Border, Navigator.StateNormal.HeaderGroup, PaletteMetricBool.HeaderGroupOverlay); _drawPanelDocker.Add(_oldRoot, ViewDockStyle.Fill); _drawPanelDocker.Add(_viewHeadingBar, ViewDockStyle.Top); _newRoot = _drawPanelDocker; // Must call the base class to perform common actions base.CreateCheckItemView(); }
/// <summary> /// Create the view hierarchy for this view mode. /// </summary> protected override void CreateCheckItemView() { // Create a canvas for containing the selected page and put old root inside it _drawGroup = new ViewDrawCanvas(Navigator.StateNormal.HeaderGroup.Back, Navigator.StateNormal.HeaderGroup.Border, VisualOrientation.Top); _drawGroup.Add(_oldRoot); // Create the view element that lays out the check buttons _layoutBar = new ViewLayoutBar(Navigator.StateCommon.Bar, PaletteMetricInt.CheckButtonGap, Navigator.Bar.ItemSizing, Navigator.Bar.ItemAlignment, Navigator.Bar.BarMultiline, Navigator.Bar.ItemMinimumSize, Navigator.Bar.ItemMaximumSize, Navigator.Bar.BarMinimumHeight, false); // Create the scroll spacer that restricts display _layoutBarViewport = new ViewLayoutViewport(Navigator.StateCommon.Bar, PaletteMetricPadding.BarPaddingOutside, PaletteMetricInt.CheckButtonGap, Navigator.Bar.BarOrientation, Navigator.Bar.ItemAlignment, Navigator.Bar.BarAnimation); _layoutBarViewport.Add(_layoutBar); // Create the button bar area docker _layoutBarDocker = new ViewLayoutDocker(); _layoutBarDocker.Add(_layoutBarViewport, ViewDockStyle.Fill); // Add a separators for insetting items _layoutBarSeparatorFirst = new ViewLayoutSeparator(0); _layoutBarSeparatorLast = new ViewLayoutSeparator(0); _layoutBarDocker.Add(_layoutBarSeparatorFirst, ViewDockStyle.Left); _layoutBarDocker.Add(_layoutBarSeparatorLast, ViewDockStyle.Right); // Create the docker used to layout contents of main panel and fill with group _layoutPanelDocker = new ViewLayoutDocker(); _layoutPanelDocker.Add(_drawGroup, ViewDockStyle.Fill); _layoutPanelDocker.Add(_layoutBarDocker, ViewDockStyle.Top); // Create the top level panel and put a layout docker inside it _drawPanel = new ViewDrawPanel(Navigator.StateNormal.Back); _drawPanel.Add(_layoutPanelDocker); _newRoot = _drawPanel; // Must call the base class to perform common actions base.CreateCheckItemView(); }