当前位置: 首页>>代码示例>>C#>>正文


C# UserControl.SuspendLayout方法代码示例

本文整理汇总了C#中System.Windows.Forms.UserControl.SuspendLayout方法的典型用法代码示例。如果您正苦于以下问题:C# UserControl.SuspendLayout方法的具体用法?C# UserControl.SuspendLayout怎么用?C# UserControl.SuspendLayout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.Forms.UserControl的用法示例。


在下文中一共展示了UserControl.SuspendLayout方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Configure

        /// <summary>
        /// Configures the editor</summary>
        /// <param name="treeControl">Control to display data</param>
        /// <param name="treeControlAdapter">Adapter to drive control. Its ITreeView should
        /// implement IInstancingContext and/or IHierarchicalInsertionContext.</param>
        /// <remarks>Default is to create a TreeControl and TreeControlAdapter,
        /// using the global image lists.</remarks>
        protected override void Configure(
            out TreeControl treeControl,
            out TreeControlAdapter treeControlAdapter)
        {
            treeControl = new TreeControl();
            treeControl.ImageList = ResourceUtil.GetImageList16();
            treeControl.StateImageList = ResourceUtil.GetImageList16();

            treeControlAdapter = new TreeControlAdapter(treeControl);

            treeControl.PreviewKeyDown += treeControl_PreviewKeyDown;
            treeControl.NodeExpandedChanging += treeControl_NodeExpandedChanging;
            treeControl.NodeExpandedChanged += treeControl_NodeExpandedChanged;

 
            m_searchInput = new StringSearchInputUI();
            m_searchInput.Updated += UpdateFiltering;

            m_control = new UserControl();
            m_control.Dock = DockStyle.Fill;
            m_control.SuspendLayout();
            m_control.Name = "Tree View".Localize();
            m_control.Text = "Tree View".Localize();
            m_control.Controls.Add(m_searchInput);
            m_control.Controls.Add(TreeControl);
            m_control.Layout += controls_Layout;
            m_control.ResumeLayout();
        }
开发者ID:GeertVL,项目名称:ATF,代码行数:35,代码来源:FilteredTreeControlEditor.cs

示例2: PaletteService

        public PaletteService(
            ICommandService commandService,
            IControlHostService controlHostService)
            : base(commandService)
        {
            m_controlHostService = controlHostService;

            m_searchInput = new StringSearchInputUI();
            m_searchInput.Updated += searchInput_Updated;

            m_control = new UserControl();
            m_control.Dock = DockStyle.Fill;
            m_control.SuspendLayout();
            m_control.Name = "Palette".Localize();
            m_control.Text = "Palette".Localize();
            m_control.Controls.Add(m_searchInput);
            m_control.Controls.Add(TreeControl);
            m_control.Layout += controls_Layout;
            m_control.ResumeLayout();

            m_controlHostService.RegisterControl(
                m_control,
                new ControlInfo(
                    "Palette", //Is the ID in the layout. We'll localize DisplayName instead.
                    "Creates new instances".Localize(),
                    StandardControlGroup.Left, null,
                    "https://github.com/SonyWWS/ATF/search?utf8=%E2%9C%93&q=PaletteService+or+Palette".Localize())
                {
                    DisplayName = "Palette".Localize()
                },
                this);
        }
开发者ID:sbambach,项目名称:ATF,代码行数:32,代码来源:PaletteService.cs

示例3: PaletteService

        public PaletteService(
            ICommandService commandService,
            IControlHostService controlHostService)
            : base(commandService)
        {
            m_controlHostService = controlHostService;

            m_searchInput = new StringSearchInputUI();
            m_searchInput.Updated += searchInput_Updated;

            m_control = new UserControl();
            m_control.Dock = DockStyle.Fill;
            m_control.SuspendLayout();
            m_control.Name = "Palette".Localize();
            m_control.Text = "Palette".Localize();
            m_control.Controls.Add(m_searchInput);
            m_control.Controls.Add(TreeControl);
            m_control.Layout += controls_Layout;
            m_control.ResumeLayout();

            m_controlHostService.RegisterControl(
                m_control,
                new ControlInfo(
                    "Palette".Localize(),
                    "Creates new instances".Localize(),
                    StandardControlGroup.Left, null,
                    "http://www.ship.scea.com/portal/search/search.action?q=PaletteService+or+Palette&context=resource_WIKI%7CWWSSDKATF".Localize()),
                this);

            m_paletteTreeAdapter = new PaletteTreeAdapter(this, m_searchInput);
        }
开发者ID:JanDeHud,项目名称:LevelEditor,代码行数:31,代码来源:PaletteService.cs

示例4: Configure

        /// <summary>
        /// Create and configure TreeControl</summary>
        /// <param name="treeControl">New TreeControl</param>
        /// <param name="treeControlAdapter">Adapter for TreeControl</param>
        protected override void Configure(out TreeControl treeControl, out TreeControlAdapter treeControlAdapter)
        {
            base.Configure(out treeControl, out treeControlAdapter);

            m_searchInput = new StringSearchInputUI();
            m_searchInput.Updated += UpdateFiltering;
            m_control = new UserControl();
            m_control.Dock = DockStyle.Fill;
            m_control.SuspendLayout();
            m_control.Name = "Tree View".Localize();
            m_control.Text = "Tree View".Localize();
            m_control.Controls.Add(m_searchInput);
            m_control.Controls.Add(TreeControl);
            m_control.Layout += controls_Layout;
            m_control.ResumeLayout();

            TreeControl.PreviewKeyDown += TreeControl_PreviewKeyDown;
            TreeControl.NodeExpandedChanging += TreeControl_NodeExpandedChanging;
            TreeControl.NodeExpandedChanged += TreeControl_NodeExpandedChanged;
            TreeControl.ItemRendererChanged += (sender, e) => UpdateTreeItemRenderer();
        }
开发者ID:sbambach,项目名称:ATF,代码行数:25,代码来源:FilteredTreeControlEditor.cs

示例5: DomNodePropertySearchService

        public DomNodePropertySearchService(
            IContextRegistry contextRegistry,
            IControlHostService controlHostService)
        {
            m_contextRegistry = contextRegistry;
            m_controlHostService = controlHostService;

            // define root control
            m_rootControl = new UserControl();
            m_rootControl.Name = "Search and Replace";
            m_rootControl.SuspendLayout();
            m_rootControl.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;

            // Create and add the search input control
            var domNodeSearchToolStrip = new DomNodeSearchToolStrip();
            SearchUI = domNodeSearchToolStrip;
            SearchUI.Control.Dock = DockStyle.None;
            m_rootControl.Controls.Add(SearchUI.Control);
            SearchUI.UIChanged += UIElement_Changed;

            // Create and add the replace input control
            var domNodeReplaceToolStrip = new DomNodeReplaceToolStrip();
            domNodeReplaceToolStrip.DomNodeSearchToolStrip = domNodeSearchToolStrip;
            ReplaceUI = domNodeReplaceToolStrip;
            ReplaceUI.Control.Dock = DockStyle.None;
            m_rootControl.Controls.Add(ReplaceUI.Control);
            ReplaceUI.UIChanged += UIElement_Changed;
            

            // Create and add the results output control
            ResultsUI = new DomNodeSearchResultsListView(m_contextRegistry);
            ResultsUI.Control.Dock = DockStyle.None;
            m_rootControl.Controls.Add(ResultsUI.Control);
            ResultsUI.UIChanged += UIElement_Changed;            
            
            m_rootControl.Layout += controls_Layout;
            m_rootControl.ResumeLayout();
        }
开发者ID:vincenthamm,项目名称:ATF,代码行数:38,代码来源:DomNodePropertySearchService.cs


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