• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Toolkit.PaletteRedirect类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ComponentFactory.Krypton.Toolkit.PaletteRedirect的典型用法代码示例。如果您正苦于以下问题:C# PaletteRedirect类的具体用法?C# PaletteRedirect怎么用?C# PaletteRedirect使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



PaletteRedirect类属于ComponentFactory.Krypton.Toolkit命名空间,在下文中一共展示了PaletteRedirect类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: PaletteNavigatorOtherRedirect

        /// <summary>
        /// Initialize a new instance of the PaletteNavigatorOtherRedirect class.
        /// </summary>
        /// <param name="redirectCheckButton">Inheritence redirection instance for the check button.</param>
        /// <param name="redirectOverflowButton">Inheritence redirection instance for the outlook overflow button.</param>
        /// <param name="redirectMiniButton">Inheritence redirection instance for the outlook mini button.</param>
        /// <param name="redirectTab">Inheritence redirection instance for the tab.</param>
        /// <param name="redirectRibbonTab">Inheritence redirection instance for the ribbon tab.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public PaletteNavigatorOtherRedirect(PaletteRedirect redirectCheckButton,
                                             PaletteRedirect redirectOverflowButton,
                                             PaletteRedirect redirectMiniButton,
                                             PaletteRedirect redirectTab,
                                             PaletteRedirect redirectRibbonTab,
                                             NeedPaintHandler needPaint)
        {
            // Create the palette storage
            _paletteCheckButton = new PaletteTripleRedirect(redirectCheckButton,
                                                            PaletteBackStyle.ButtonStandalone,
                                                            PaletteBorderStyle.ButtonStandalone,
                                                            PaletteContentStyle.ButtonStandalone,
                                                            needPaint);

            _paletteOverflowButton = new PaletteTripleRedirect(redirectCheckButton,
                                                               PaletteBackStyle.ButtonNavigatorOverflow,
                                                               PaletteBorderStyle.ButtonNavigatorOverflow,
                                                               PaletteContentStyle.ButtonNavigatorOverflow,
                                                               needPaint);

            _paletteMiniButton = new PaletteTripleRedirect(redirectMiniButton,
                                                            PaletteBackStyle.ButtonNavigatorMini,
                                                            PaletteBorderStyle.ButtonNavigatorMini,
                                                            PaletteContentStyle.ButtonNavigatorMini,
                                                            needPaint);

            _paletteTab = new PaletteTabTripleRedirect(redirectTab,
                                                       PaletteBackStyle.TabHighProfile,
                                                       PaletteBorderStyle.TabHighProfile,
                                                       PaletteContentStyle.TabHighProfile,
                                                       needPaint);

            _paletteRibbonTab = new PaletteRibbonTabContentRedirect(redirectRibbonTab, needPaint);
        }
开发者ID:ComponentFactory,项目名称:Krypton,代码行数:43,代码来源:PaletteNavigatorOtherRedirect.cs


示例2: KryptonPaletteTabButtons

        /// <summary>
        /// Initialize a new instance of the KryptonPaletteTabButtons class.
        /// </summary>
        /// <param name="redirector">Palette redirector for sourcing inherited values.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        internal KryptonPaletteTabButtons(PaletteRedirect redirector,
                                       NeedPaintHandler needPaint)
        {
            Debug.Assert(redirector != null);

            // Create the button style specific and common palettes
            _tabCommon = new KryptonPaletteTabButton(redirector, PaletteBackStyle.TabHighProfile, PaletteBorderStyle.TabHighProfile, PaletteContentStyle.TabHighProfile, needPaint);
            _tabHighProfile = new KryptonPaletteTabButton(redirector, PaletteBackStyle.TabHighProfile, PaletteBorderStyle.TabHighProfile, PaletteContentStyle.TabHighProfile, needPaint);
            _tabStandardProfile = new KryptonPaletteTabButton(redirector, PaletteBackStyle.TabStandardProfile, PaletteBorderStyle.TabStandardProfile, PaletteContentStyle.TabStandardProfile, needPaint);
            _tabLowProfile = new KryptonPaletteTabButton(redirector, PaletteBackStyle.TabLowProfile, PaletteBorderStyle.TabLowProfile, PaletteContentStyle.TabLowProfile, needPaint);
            _tabDock = new KryptonPaletteTabButton(redirector, PaletteBackStyle.TabDock, PaletteBorderStyle.TabDock, PaletteContentStyle.TabDock, needPaint);
            _tabDockAutoHidden = new KryptonPaletteTabButton(redirector, PaletteBackStyle.TabDockAutoHidden, PaletteBorderStyle.TabDockAutoHidden, PaletteContentStyle.TabDockAutoHidden, needPaint);
            _tabOneNote = new KryptonPaletteTabButton(redirector, PaletteBackStyle.TabOneNote, PaletteBorderStyle.TabOneNote, PaletteContentStyle.TabOneNote, needPaint);
            _tabCustom1 = new KryptonPaletteTabButton(redirector, PaletteBackStyle.TabCustom1, PaletteBorderStyle.TabCustom1, PaletteContentStyle.TabCustom1, needPaint);
            _tabCustom2 = new KryptonPaletteTabButton(redirector, PaletteBackStyle.TabCustom2, PaletteBorderStyle.TabCustom2, PaletteContentStyle.TabCustom2, needPaint);
            _tabCustom3 = new KryptonPaletteTabButton(redirector, PaletteBackStyle.TabCustom3, PaletteBorderStyle.TabCustom3, PaletteContentStyle.TabCustom3, needPaint);

            // Create redirectors for inheriting from style specific to style common
            PaletteRedirectTriple redirectCommon = new PaletteRedirectTriple(redirector,
                                                                             _tabCommon.StateDisabled, _tabCommon.StateNormal,
                                                                             _tabCommon.StatePressed, _tabCommon.StateTracking,
                                                                             _tabCommon.StateSelected,_tabCommon.OverrideFocus);
            // Inform the button style to use the new redirector
            _tabHighProfile.SetRedirector(redirectCommon);
            _tabStandardProfile.SetRedirector(redirectCommon);
            _tabLowProfile.SetRedirector(redirectCommon);
            _tabDock.SetRedirector(redirectCommon);
            _tabDockAutoHidden.SetRedirector(redirectCommon);
            _tabOneNote.SetRedirector(redirectCommon);
            _tabCustom1.SetRedirector(redirectCommon);
            _tabCustom2.SetRedirector(redirectCommon);
            _tabCustom3.SetRedirector(redirectCommon);
        }
开发者ID:ComponentFactory,项目名称:Krypton,代码行数:38,代码来源:KryptonPaletteTabButtons.cs


示例3: ButtonSpecView

        /// <summary>
        /// Initialize a new instance of the ButtonSpecView class.
        /// </summary>
        /// <param name="redirector">Palette redirector.</param>
        /// <param name="paletteMetric">Source for metric values.</param>
        /// <param name="metricPadding">Padding metric for border padding.</param>
        /// <param name="manager">Reference to owning manager.</param>
        /// <param name="buttonSpec">Access</param>
        public ButtonSpecView(PaletteRedirect redirector,
                              IPaletteMetric paletteMetric,
                              PaletteMetricPadding metricPadding,
                              ButtonSpecManagerBase manager,
                              ButtonSpec buttonSpec)
        {
            Debug.Assert(redirector != null);
            Debug.Assert(manager != null);
            Debug.Assert(buttonSpec != null);

            // Remember references
            _redirector = redirector;
            _manager = manager;
            _buttonSpec = buttonSpec;
            _finishDelegate = new EventHandler(OnFinishDelegate);

            // Create delegate for paint notifications
            NeedPaintHandler needPaint = new NeedPaintHandler(OnNeedPaint);

            // Intercept calls from the button for color remapping and instead use
            // the button spec defined map and the container foreground color
            _remapPalette = _manager.CreateButtonSpecRemap(redirector, buttonSpec);

            // Use a redirector to get button values directly from palette
            _palette = new PaletteTripleRedirect(_remapPalette,
                                                 PaletteBackStyle.ButtonButtonSpec,
                                                 PaletteBorderStyle.ButtonButtonSpec,
                                                 PaletteContentStyle.ButtonButtonSpec,
                                                 needPaint);

            // Create the view for displaying a button
            _viewButton = new ViewDrawButton(_palette, _palette, _palette, _palette,
                                             paletteMetric, this, VisualOrientation.Top, false);

            // Associate the view with the source component (for design time support)
            if (buttonSpec.AllowComponent)
                _viewButton.Component = buttonSpec;

            // Use a view center to place button in centre of given space
            _viewCenter = new ViewLayoutCenter(paletteMetric, metricPadding, VisualOrientation.Top);
            _viewCenter.Add(_viewButton);

            // Create a controller for managing button behavior
            ButtonSpecViewControllers controllers = CreateController(_viewButton, needPaint, new MouseEventHandler(OnClick));
            _viewButton.MouseController = controllers.MouseController;
            _viewButton.SourceController = controllers.SourceController;
            _viewButton.KeyController = controllers.KeyController;

            // We need notifying whenever a button specification property changes
            _buttonSpec.ButtonSpecPropertyChanged += new PropertyChangedEventHandler(OnPropertyChanged);

            // Associate the button spec with the view that is drawing it
            _buttonSpec.SetView(_viewButton);

            // Finally update view with current button spec settings
            UpdateButtonStyle();
            UpdateVisible();
            UpdateEnabled();
            UpdateChecked();
        }
开发者ID:Cocotteseb,项目名称:Krypton,代码行数:68,代码来源:ButtonSpecView.cs


示例4: PaletteMetricRedirect

        /// <summary>
        /// Initialize a new instance of the PaletteMetricRedirect class.
        /// </summary>
        /// <param name="redirect">Inheritence redirection instance.</param>
        public PaletteMetricRedirect(PaletteRedirect redirect)
        {
            Debug.Assert(redirect != null);

            // Remember the redirect reference
            _redirect = redirect;
        }
开发者ID:ComponentFactory,项目名称:Krypton,代码行数:11,代码来源:PaletteMetricRedirect.cs


示例5: PaletteComboBoxRedirect

        /// <summary>
        /// Initialize a new instance of the PaletteComboBoxRedirect class.
        /// </summary>
        /// <param name="redirect">Inheritence redirection instance.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public PaletteComboBoxRedirect(PaletteRedirect redirect,
                                       NeedPaintHandler needPaint)
        {
            Debug.Assert(redirect != null);

            // Store the provided paint notification delegate
            NeedPaint = needPaint;

            // Create storage that maps onto the inherit instances
            _itemRedirect = new PaletteTripleRedirect(redirect,
                                                      PaletteBackStyle.ButtonListItem,
                                                      PaletteBorderStyle.ButtonListItem,
                                                      PaletteContentStyle.ButtonListItem,
                                                      NeedPaint);

            _comboBoxRedirect = new PaletteInputControlTripleRedirect(redirect,
                                                                      PaletteBackStyle.InputControlStandalone,
                                                                      PaletteBorderStyle.InputControlStandalone,
                                                                      PaletteContentStyle.InputControlStandalone,
                                                                      NeedPaint);

            _dropBackRedirect = new PaletteDoubleRedirect(redirect,
                                                          PaletteBackStyle.ControlClient,
                                                          PaletteBorderStyle.ButtonStandalone,
                                                          NeedPaint);
        }
开发者ID:ComponentFactory,项目名称:Krypton,代码行数:31,代码来源:PaletteComboBoxRedirect.cs


示例6: Construct

        /// <summary>
        /// Construct the view appropriate for this builder.
        /// </summary>
        /// <param name="navigator">Reference to navigator instance.</param>
        /// <param name="manager">Reference to current manager.</param>
        /// <param name="redirector">Palette redirector.</param>
        public override void Construct(KryptonNavigator navigator, 
									   ViewManager manager,
									   PaletteRedirect redirector)
        {
            // Let base class perform common operations
            base.Construct(navigator, manager, redirector);

            // Get the current root element
            _oldRoot = ViewManager.Root;

            // Create a canvas for the background
            _drawPanel = new ViewDrawPanel(Navigator.StateNormal.Back);

            // Put the exisint root into the canvas
            _drawPanel.Add(_oldRoot);

            // Update the child panel to have panel appearance
            Navigator.ChildPanel.PanelBackStyle = Navigator.Panel.PanelBackStyle;

            // Set the correct palettes based on enabled state and selected page
            UpdateStatePalettes();

            // Canvas becomes the new root
            ViewManager.Root = _drawPanel;

            // Need to monitor changes in the enabled state
            Navigator.EnabledChanged += new EventHandler(OnEnabledChanged);
        }
开发者ID:ComponentFactory,项目名称:Krypton,代码行数:34,代码来源:ViewBuilderPanel.cs


示例7: PaletteTripleJustImageRedirect

 /// <summary>
 /// Initialize a new instance of the PaletteTripleJustImageRedirect class.
 /// </summary>
 /// <param name="redirect">Inheritence redirection instance.</param>
 /// <param name="backStyle">Initial background style.</param>
 /// <param name="borderStyle">Initial border style.</param>
 /// <param name="contentStyle">Initial content style.</param>
 public PaletteTripleJustImageRedirect(PaletteRedirect redirect,
                                       PaletteBackStyle backStyle,
                                       PaletteBorderStyle borderStyle,
                                       PaletteContentStyle contentStyle)
     : this(redirect, backStyle, borderStyle, contentStyle, null)
 {
 }
开发者ID:ComponentFactory,项目名称:Krypton,代码行数:14,代码来源:PaletteTripleJustImageRedirect.cs


示例8: KryptonPaletteForm

 /// <summary>
 /// Initialize a new instance of the KryptonPaletteForm class.
 /// </summary>
 /// <param name="redirect">Redirector to inherit values from.</param>
 /// <param name="backStyle">Background style.</param>
 /// <param name="borderStyle">Border style.</param>
 /// <param name="needPaint">Delegate for notifying paint requests.</param>
 public KryptonPaletteForm(PaletteRedirect redirect,
                           PaletteBackStyle backStyle,
                           PaletteBorderStyle borderStyle,
                           NeedPaintHandler needPaint)
     : base(redirect, backStyle, borderStyle, needPaint)
 {
 }
开发者ID:Cocotteseb,项目名称:Krypton,代码行数:14,代码来源:KryptonPaletteForm.cs


示例9: Construct

        /// <summary>
        /// Construct the view appropriate for this builder.
        /// </summary>
        /// <param name="navigator">Reference to navigator instance.</param>
        /// <param name="manager">Reference to current manager.</param>
        /// <param name="redirector">Palette redirector.</param>
        public override void Construct(KryptonNavigator navigator, 
									   ViewManager manager,
									   PaletteRedirect redirector)
        {
            // Let base class perform common operations
            base.Construct(navigator, manager, redirector);
        }
开发者ID:Cocotteseb,项目名称:Krypton,代码行数:13,代码来源:ViewBuilderBarCheckButtonGroupInside.cs


示例10: KryptonPaletteHeaders

        /// <summary>
        /// Initialize a new instance of the KryptonPaletteHeaders class.
        /// </summary>
        /// <param name="redirector">Palette redirector for sourcing inherited values.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        internal KryptonPaletteHeaders(PaletteRedirect redirector,
                                       NeedPaintHandler needPaint)
        {
            Debug.Assert(redirector != null);
            // Create the button style specific and common palettes
            _headerCommon = new KryptonPaletteHeader(redirector, PaletteBackStyle.HeaderPrimary, PaletteBorderStyle.HeaderPrimary, PaletteContentStyle.HeaderPrimary, needPaint);
            _headerPrimary = new KryptonPaletteHeader(redirector, PaletteBackStyle.HeaderPrimary, PaletteBorderStyle.HeaderPrimary, PaletteContentStyle.HeaderPrimary, needPaint);
            _headerSecondary = new KryptonPaletteHeader(redirector, PaletteBackStyle.HeaderSecondary, PaletteBorderStyle.HeaderSecondary, PaletteContentStyle.HeaderSecondary, needPaint);
            _headerDockInactive = new KryptonPaletteHeader(redirector, PaletteBackStyle.HeaderDockInactive, PaletteBorderStyle.HeaderDockInactive, PaletteContentStyle.HeaderDockInactive, needPaint);
            _headerDockActive = new KryptonPaletteHeader(redirector, PaletteBackStyle.HeaderDockActive, PaletteBorderStyle.HeaderDockActive, PaletteContentStyle.HeaderDockActive, needPaint);
            _headerCalendar = new KryptonPaletteHeader(redirector, PaletteBackStyle.HeaderCalendar, PaletteBorderStyle.HeaderCalendar, PaletteContentStyle.HeaderCalendar, needPaint);
            _headerForm = new KryptonPaletteHeader(redirector, PaletteBackStyle.HeaderForm, PaletteBorderStyle.HeaderForm, PaletteContentStyle.HeaderForm, needPaint);
            _headerCustom1 = new KryptonPaletteHeader(redirector, PaletteBackStyle.HeaderCustom1, PaletteBorderStyle.HeaderCustom1, PaletteContentStyle.HeaderCustom1, needPaint);
            _headerCustom2 = new KryptonPaletteHeader(redirector, PaletteBackStyle.HeaderCustom2, PaletteBorderStyle.HeaderCustom2, PaletteContentStyle.HeaderCustom2, needPaint);

            // Create redirectors for inheriting from style specific to style common
            PaletteRedirectTripleMetric redirectCommon = new PaletteRedirectTripleMetric(redirector,
                                                                                         _headerCommon.StateDisabled, _headerCommon.StateDisabled,
                                                                                         _headerCommon.StateNormal, _headerCommon.StateNormal);

            // Inform the button style to use the new redirector
            _headerPrimary.SetRedirector(redirectCommon);
            _headerSecondary.SetRedirector(redirectCommon);
            _headerDockInactive.SetRedirector(redirectCommon);
            _headerDockActive.SetRedirector(redirectCommon);
            _headerCalendar.SetRedirector(redirectCommon);
            _headerForm.SetRedirector(redirectCommon);
            _headerCustom1.SetRedirector(redirectCommon);
            _headerCustom2.SetRedirector(redirectCommon);
        }
开发者ID:ComponentFactory,项目名称:Krypton,代码行数:35,代码来源:KryptonPaletteHeaders.cs


示例11: KryptonPaletteControls

        /// <summary>
        /// Initialize a new instance of the KryptonPaletteControls class.
        /// </summary>
        /// <param name="redirector">Palette redirector for sourcing inherited values.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        internal KryptonPaletteControls(PaletteRedirect redirector,
                                        NeedPaintHandler needPaint)
        {
            Debug.Assert(redirector != null);

            // Create the button style specific and common palettes
            _controlCommon = new KryptonPaletteControl(redirector, PaletteBackStyle.ControlClient, PaletteBorderStyle.ControlClient, needPaint);
            _controlClient = new KryptonPaletteControl(redirector, PaletteBackStyle.ControlClient, PaletteBorderStyle.ControlClient, needPaint);
            _controlAlternate = new KryptonPaletteControl(redirector, PaletteBackStyle.ControlAlternate, PaletteBorderStyle.ControlAlternate, needPaint);
            _controlGroupBox = new KryptonPaletteControl(redirector, PaletteBackStyle.ControlGroupBox, PaletteBorderStyle.ControlGroupBox, needPaint);
            _controlToolTip = new KryptonPaletteControl(redirector, PaletteBackStyle.ControlToolTip, PaletteBorderStyle.ControlToolTip, needPaint);
            _controlRibbon = new KryptonPaletteControl(redirector, PaletteBackStyle.ControlRibbon, PaletteBorderStyle.ControlRibbon, needPaint);
            _controlRibbonAppMenu = new KryptonPaletteControl(redirector, PaletteBackStyle.ControlRibbonAppMenu, PaletteBorderStyle.ControlRibbonAppMenu, needPaint);
            _controlCustom1 = new KryptonPaletteControl(redirector, PaletteBackStyle.ControlCustom1, PaletteBorderStyle.ControlCustom1, needPaint);

            // Create redirectors for inheriting from style specific to style common
            PaletteRedirectDouble redirectCommon = new PaletteRedirectDouble(redirector, _controlCommon.StateDisabled, _controlCommon.StateNormal);

            // Inform the button style to use the new redirector
            _controlClient.SetRedirector(redirectCommon);
            _controlAlternate.SetRedirector(redirectCommon);
            _controlGroupBox.SetRedirector(redirectCommon);
            _controlToolTip.SetRedirector(redirectCommon);
            _controlRibbon.SetRedirector(redirectCommon);
            _controlRibbonAppMenu.SetRedirector(redirectCommon);
            _controlCustom1.SetRedirector(redirectCommon);
        }
开发者ID:ComponentFactory,项目名称:Krypton,代码行数:32,代码来源:KryptonPaletteControls.cs


示例12: AppButtonMenuProvider

        /// <summary>
        /// Initialize a new instance of the ContextMenuProvider class.
        /// </summary>
        /// <param name="viewManager">View manager used to organize keyboard events.</param>
        /// <param name="menuCollection">Top level set of menu items.</param>
        /// <param name="viewColumns">Stack used for adding new columns.</param>
        /// <param name="palette">Local palette setting to use initially.</param>
        /// <param name="paletteMode">Palette mode setting to use initially.</param>
        /// <param name="redirector">Redirector used for obtaining palette values.</param>
        /// <param name="needPaintDelegate">Delegate used to when paint changes occur.</param>
        public AppButtonMenuProvider(ViewContextMenuManager viewManager,
                                     KryptonContextMenuItemCollection menuCollection,
                                     ViewLayoutStack viewColumns,
                                     IPalette palette,
                                     PaletteMode paletteMode,
                                     PaletteRedirect redirector,
                                     NeedPaintHandler needPaintDelegate)
        {
            // Store incoming state
            _viewManager = viewManager;
            _menuCollection = menuCollection;
            _viewColumns = viewColumns;
            _palette = palette;
            _paletteMode = paletteMode;
            _redirector = redirector;
            _needPaintDelegate = needPaintDelegate;

            // Create all other state
            _parent = null;
            _enabled = true;
            _canCloseMenu = true;
            _showHorz = KryptonContextMenuPositionH.After;
            _showVert = KryptonContextMenuPositionV.Top;
            _stateCommon = new PaletteContextMenuRedirect(redirector, needPaintDelegate);
            _stateNormal = new PaletteContextMenuItemState(_stateCommon);
            _stateDisabled = new PaletteContextMenuItemState(_stateCommon);
            _stateHighlight = new PaletteContextMenuItemStateHighlight(_stateCommon);
            _stateChecked = new PaletteContextMenuItemStateChecked(_stateCommon);
            _redirectorImages = new PaletteRedirectContextMenu(redirector, new ContextMenuImages(needPaintDelegate));
        }
开发者ID:Cocotteseb,项目名称:Krypton,代码行数:40,代码来源:AppButtonMenuProvider.cs


示例13: Construct

        /// <summary>
        /// Construct the view appropriate for this builder.
        /// </summary>
        /// <param name="navigator">Reference to navigator instance.</param>
        /// <param name="manager">Reference to current manager.</param>
        /// <param name="redirector">Palette redirector.</param>
        public override void Construct(KryptonNavigator navigator, 
									   ViewManager manager,
									   PaletteRedirect redirector)
        {
            // Let base class perform common operations
            base.Construct(navigator, manager, redirector);

            // Get the current root element
            _oldRoot = ViewManager.Root;

            // Create a canvas for the border and background using current enabled state
            _drawCanvas = new ViewDrawCanvas(Navigator.StateNormal.HeaderGroup.Back,
                                             Navigator.StateNormal.HeaderGroup.Border,
                                             VisualOrientation.Top);

            // Put the exising root into the canvas
            _drawCanvas.Add(_oldRoot);

            // Set the correct palettes based on enabled state and selected page
            UpdateStatePalettes();

            // Canvas becomes the new root
            ViewManager.Root = _drawCanvas;

            // Need to monitor changes in the enabled state
            Navigator.EnabledChanged += new EventHandler(OnEnabledChanged);
        }
开发者ID:Cocotteseb,项目名称:Krypton,代码行数:33,代码来源:ViewBuilderGroup.cs


示例14: MyUserControl

        public MyUserControl()
        {
            // To remove flicker we use double buffering for drawing
            SetStyle(ControlStyles.AllPaintingInWmPaint |
                     ControlStyles.OptimizedDoubleBuffer |
                     ControlStyles.ResizeRedraw, true);

            // Cache the current global palette setting
            _palette = KryptonManager.CurrentGlobalPalette;

            // Hook into palette events
            if (_palette != null)
                _palette.PalettePaint += new EventHandler<PaletteLayoutEventArgs>(OnPalettePaint);

            // We want to be notified whenever the global palette changes
            KryptonManager.GlobalPaletteChanged += new EventHandler(OnGlobalPaletteChanged);

            // Create redirection object to the base palette
            _paletteRedirect = new PaletteRedirect(_palette);

            // Create accessor objects for the back, border and content
            _paletteBack = new PaletteBackInheritRedirect(_paletteRedirect);
            _paletteBorder = new PaletteBorderInheritRedirect(_paletteRedirect);
            _paletteContent = new PaletteContentInheritRedirect(_paletteRedirect);
        }
开发者ID:ComponentFactory,项目名称:Krypton,代码行数:25,代码来源:MyUserControl.cs


示例15: PaletteRibbonBackInheritRedirect

        /// <summary>
        /// Initialize a new instance of the PaletteRibbonBackInheritRedirect class.
        /// </summary>
        /// <param name="redirect">Source for inherit requests.</param>
        /// <param name="styleBack">Ribbon item background style.</param>
        public PaletteRibbonBackInheritRedirect(PaletteRedirect redirect,
                                                PaletteRibbonBackStyle styleBack)
        {
            Debug.Assert(redirect != null);

            _redirect = redirect;
            _styleBack = styleBack;
        }
开发者ID:Cocotteseb,项目名称:Krypton,代码行数:13,代码来源:PaletteRibbonBackInheritRedirect.cs


示例16: ViewletHeaderGroupOutlook

 /// <summary>
 /// Initialize a new instance of the ViewletHeaderGroupOutlook class.
 /// </summary>
 /// <param name="navigator">Reference to navigator instance.</param>
 /// <param name="redirector">Palette redirector.</param>
 /// <param name="needPaintDelegate">Delegate for notifying paint requests.</param>
 public ViewletHeaderGroupOutlook(KryptonNavigator navigator,
                                  PaletteRedirect redirector,
                                  NeedPaintHandler needPaintDelegate)
     : base(navigator, redirector, needPaintDelegate)
 {
     // Are we using the full or mini outlook mode.
     _full = (navigator.NavigatorMode == NavigatorMode.OutlookFull);
 }
开发者ID:ComponentFactory,项目名称:Krypton,代码行数:14,代码来源:ViewletHeaderGroupOutlook.cs


示例17: PaletteRibbonTextInheritRedirect

        /// <summary>
        /// Initialize a new instance of the PaletteRibbonTextInheritRedirect class.
        /// </summary>
        /// <param name="redirect">Source for inherit requests.</param>
        /// <param name="styleText">Ribbon item text style.</param>
        public PaletteRibbonTextInheritRedirect(PaletteRedirect redirect,
                                                PaletteRibbonTextStyle styleText)
        {
            Debug.Assert(redirect != null);

            _redirect = redirect;
            _styleText = styleText;
        }
开发者ID:ComponentFactory,项目名称:Krypton,代码行数:13,代码来源:PaletteRibbonTextInheritRedirect.cs


示例18: ButtonSpecViewAppButton

 /// <summary>
 /// Initialize a new instance of the ButtonSpecViewAppButton class.
 /// </summary>
 /// <param name="redirector">Palette redirector.</param>
 /// <param name="paletteMetric">Source for metric values.</param>
 /// <param name="metricPadding">Padding metric for border padding.</param>
 /// <param name="manager">Reference to owning manager.</param>
 /// <param name="buttonSpec">Access</param>
 public ButtonSpecViewAppButton(PaletteRedirect redirector,
                                IPaletteMetric paletteMetric,
                                PaletteMetricPadding metricPadding,
                                ButtonSpecManagerBase manager,
                                ButtonSpec buttonSpec)
     : base(redirector, paletteMetric, metricPadding, manager, buttonSpec)
 {
 }
开发者ID:ComponentFactory,项目名称:Krypton,代码行数:16,代码来源:ButtonSpecViewAppButton.cs


示例19: KryptonPaletteNavigatorState

        /// <summary>
        /// Initialize a new instance of the KryptonPaletteNavigatorState class.
        /// </summary>
        /// <param name="redirect">Inheritence redirection instance.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public KryptonPaletteNavigatorState(PaletteRedirect redirect,
                                            NeedPaintHandler needPaint)
        {
            Debug.Assert(redirect != null);

            // Create the storage objects
            _bar = new KryptonPaletteNavigatorStateBar(redirect, needPaint);
        }
开发者ID:Cocotteseb,项目名称:Krypton,代码行数:13,代码来源:KryptonPaletteNavigatorState.cs


示例20: CreateButtonSpecView

 /// <summary>
 /// Create the button spec view appropriate for the button spec.
 /// </summary>
 /// <param name="redirector">Redirector for acquiring palette values.</param>
 /// <param name="viewPaletteMetric">Target metric providers.</param>
 /// <param name="viewMetricPadding">Target metric padding.</param>
 /// <param name="buttonSpec">ButtonSpec instance.</param>
 /// <returns>ButtonSpecView derived class.</returns>
 protected override ButtonSpecView CreateButtonSpecView(PaletteRedirect redirector, 
                                                        IPaletteMetric viewPaletteMetric, 
                                                        PaletteMetricPadding viewMetricPadding, 
                                                        ButtonSpec buttonSpec)
 {
     return new ButtonSpecViewRibbon(redirector, viewPaletteMetric,
                                     viewMetricPadding, this, buttonSpec);
 }
开发者ID:Cocotteseb,项目名称:Krypton,代码行数:16,代码来源:ButtonSpecManagerLayoutRibbon.cs



注:本文中的ComponentFactory.Krypton.Toolkit.PaletteRedirect类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Toolkit.RenderContext类代码示例发布时间:2022-05-24
下一篇:
C# Navigator.KryptonPage类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap