Hot File

Visual Studio IDE like Dock Container - Second Version

View: 1257    Dowload: 2   Comment: 0   Post by: naruto  
Author: none   Category: Form - Instructions   Fields: Computers - Technology

0 point/4 review File has been tested

Download   visual-studio-ide-like-dock.rar (270.79 KB)

You need to Sign In to download the file visual-studio-ide-like-dock.rar
If you do not have an account then Sign up for free here

Download error   Report copyright violation

Is your email address OK? You are signed up for our newsletters but your email address is either unconfirmed, or has not been reconfirmed in a long time. Please click here to have a confirmation email sent so we can confirm your email address and start sending you newsletters again. Alternatively, you can update your subscriptions.

Introduction

This is the second version of the product Crom.Controls.Docking.

What's new

The following functionalities were added/changed:

  • Complex docking: it is now possible to create complex layouts:

  • Preview on mouse hover over auto-hidden buttons:

  • Form selector using Ctrl+Tab:

  • Save/load layout

Using the Code

Here are the basic steps that you need to do for using the control:

  • Add reference to Crom.Controls.dll assembly in your project
  • Place a DockContainer control on your form and set its Dock property to DockStyle.Fill

After completing these steps you can start using the control.

 

Adding a form to the dock guider container

First you need to add a form to guider using the method:


    DockableFormInfo Add(Form form, zAllowedDock allowedDock, Guid formIdentifier)

The parameters are:

  • form which should be a not null, not disposed instance of the form to guide, with the following properties set:
    • FormBorderStyle = FormBorderStyle.SizableToolWindow
    • TopLevel = false
  • allowedDock is the enumeration of the places where the form is allowed to be docked.
  • formIdentifier is an unique identifier associated with the form. These identifiers will be used when the layout state is saved/restored so they should be defined as constants in your application.

When adding a form to the guider, you'll receive a DockableFormInfo object. This object contains information about the guided form and is required by DockContainer on any operation with the form.

 

Docking a form added to the container

You can dock a form previously added to the container by calling one of the methods:

  • void DockForm(DockableFormInfo info, DockStyle dock, zDockMode mode)
  • void DockForm(DockableFormInfo info, DockableFormInfo infoOver, DockStyle dock, zDockMode mode)

The first method should be called when docking the form directly in the container, the second should be called when docking the form over an existing form. The parameters are:

  • info which should be a not null, not disposed instance of the form information obtained after adding a form to guider.
  • dock initial dock of the form (must be a valid dock value, other than DockStyle.None)
  • mode initial dock mode with one of the values:
    • zDockMode.Outer to dock the form on one of the margin edges of the container.
    • zDockMode.Inner to dock the form near the center of the free area of the container.
  • infoOver is the information of the form over which you want to dock your form.

 

Undocking a docked form

You can undock a docked form by calling the method:

 
   void Undock(DockableFormInfo info, Rectangle hintBounds)

The parameters are:

  • info which should be a not null, not disposed instance of the form information obtained after adding a form to guider.
  • hintBounds are the proposed bound of the form after will be undocked.

 

Removing a from from container

You can remove the from from container by calling the method:


    void Remove(DockableFormInfo info)

where info is the not null, not disposed instance of the form information obtained after adding the form to guider.

 

Getting the forms added in the container

You can get the count of forms added in the container by calling the property:


    int Count
    {
      get;
    }

You can get the information for a form added in the container by calling the property:

Collapse | Copy Code
    DockableFormInfo GetFormInfoAt(int index)

where the index is the form index with valid values from 0 (zero) to Count - 1

 

Toggling the AutoHide mode of a docked window

To toggle the AutoHide mode of a docked window you should call the method:

  
  void SetAutoHide(DockableFormInfo info, bool autoHide)

The parameters are:

  • info which should be a not null, not disposed instance of the docked form information obtained after adding a form to guider.
  • autoHide is the flag indicating if should set auto-hide mode(true) or unset it(false)

 

Selecting a form

To select the input for a form you should set (true) the IsSelected property of DockableFormInfo object associated with the form. To intercept when a form is selected/deselected, you should connect to the SelectedChanged event of DockableFormInfo object associated with the form.

 

Associating context menu

To associate a context menu to a guided form you should connect to the ShowContextMenu event of the DockContainer control. The handler of this event should be something like:


     void OnDockerShowContextMenu(object sender, FormContextMenuEventArgs e)
     {
        contextMenuStrip1.Show(e.Form, e.MenuLocation);
     }

 

Preventing the close of a form

To disable closing a form you should connect to FormClosing event of the DockContainer control. The handler of this event should be something like:

          void OnDockerFormClosing(object sender, DockableFormClosingEventArgs e)
     {
        DockableFormInfo info = _docker.GetFormInfo(e.Form);
        if (info.Id == new Guid("0a3f4468-080b-404e-b012-997b93ed2005"))
        {
           e.Cancel = true;
        }
     }

Destroying a closed form

To destroy a closed form you shoud connect to FormClosed event of the DockContainer control. The handler of this event should be something like:

Collapse | Copy Code
     void OnDockerFormClosed(object sender, FormEventArgs e)
     {
        e.Form.Close();
     }

 

Saving/restoring the container layout

To save/restore the container layout you need to use an object of type DockStateSerializer. To save the container layout you should call from DockStateSerializer the method:


    void Save() 

The layout state is saved by default in the local application data folder of your application. This default path is given by the serializer.SavePath property of the serializer and can be changed through this member. To load the container layout you should call from DockStateSerializer the method:

    
void Load(bool clear, FormFactoryHandler formsFactory)

The parameters are:

  • clear a flag indicating if shoul clear all existing forms from the docker, before restoring the state (recommended value is true).
  • formsFactory is a handler to a form factory method.

The form factory method signature is Form CreateTestForm(Guid identifier)

Visual Studio IDE like Dock Container - Second Version

Visual Studio IDE like Dock Container - Second Version Posted on 21-03-2014  Is your email address OK? You are signed up for our newsletters but your email address is either unconfirmed, or has not been reconfirmed in a long time. Please click here to have a confirmation email sent so we can confirm your email address and start sending you newsletters again. Alternatively, you can update your subscriptions. 5/10 1257

Comment:

To comment you must be logged in members.

Files with category

  • Form Management in MOSS 2007

    View: 2978    Download: 0   Comment: 0   Author: none  

    Form Management in MOSS 2007

    Category: Form - Instructions
    Fields: Other

    0/8 review
    The purpose of this document is to give an overview of Form Management in Microsoft Office SharePoint Server 2007. This article explains how to create and publish forms using Microsoft Office InfoPath 2007 in to SharePoint site.

  • Mac OS X Theme for Windows Forms

    View: 3503    Download: 2   Comment: 0   Author: none  

    Mac OS X Theme for Windows Forms

    Category: Form - Instructions
    Fields: Other

    0/9 review
    Some programmers might want to apply some themes or skins to their forms so that it will look cool, sophisticated, and attractive. I have created a Mac OS X open source theme library for everyone and the usage of it is indicated on this article.

  • Those Crazy Popups

    View: 1898    Download: 0   Comment: 0   Author: none  

    Those Crazy Popups

    Category: Form - Instructions
    Fields: Other

    0/1 review
    Ever tried to create a pop-up in ASP.NET? Well, in this article, we will see different ways to create them. We'll also see a few issues surrounding the different ways.

  • Handling .NET forms and their events in VB6 main application

    View: 3466    Download: 1   Comment: 0   Author: none  

    Handling .NET forms and their events in VB6 main application

    Category: Form - Instructions
    Fields: Other

    0/6 review
    I always wanted to post an article in CodeProject. I was always "taking" not "giving" anything back to this community and that made me feel guilty. I think its time to "give" back something useful to this community

  • Beginners’ Guide To Web Design

    View: 578    Download: 0   Comment: 0   Author: none  

    Beginners’ Guide To Web Design

    Category: Form - Instructions
    Fields: Other

    0/2 review
    If you’re a total newbie to the whole web designing business, you’ve come to the right place. Web design is a tricky thing to deal with, and with that being said there are many things that you have to keep in mind. Enumerated below are the things...

  • GraphicRiver.net – A Review

    View: 796    Download: 0   Comment: 0   Author: none  

    GraphicRiver.net – A Review

    Category: Form - Instructions
    Fields: none

    0/1 review
    Designers are always looking for resources to maximize their revenue. Whether it is a useful freelancing website, a blog or a marketplace, they never fail to entertain a designer’s desire to earn and learn, too. In this article I am going to review...

  • How to Establish a Dreamweaver Website on Localhost – EasyPhp

    View: 1123    Download: 0   Comment: 0   Author: none  

    How to Establish a Dreamweaver Website on Localhost – EasyPhp

    Category: Form - Instructions
    Fields: none

    0/4 review
    While developing a website, it is sometimes quite annoying and repetitive to edit the code in the editor and then test it on the browser, especially when working with WordPress. So, to ensure smooth workflow and faster development, we use a feature...

  • Top 15 Websites to learn Web Design and Development

    View: 850    Download: 0   Comment: 0   Author: none  

    Top 15 Websites to learn Web Design and Development

    Category: Form - Instructions
    Fields: none

    0/1 review
    People are, at all times looking to enhance their skills at Designing and Developing websites. Formal education in this field is quite rare so in this article, I’m going to share the 15 Top Websites to Learn Web Design and Development from, more...

 
Newsletter Email

File suggestion for you

File top downloads

logo codetitle
Codetitle.com - library source code to share, download the file to the community
Copyright © 2015. All rights reserved. codetitle.com Develope by Vinagon .Ltd