VisualStudio2005 look and feel

4 posts, 0 answers
  1. Evgueni
    Evgueni avatar
    2 posts
    Member since:
    Nov 2006

    Posted 21 Feb 2007 Link to this post

    I am brand new to Telerik.

    I would like the DockPanel to have the look and feel of Visual Studio 2005. In particular, the pin icon, dropdown icon and close icon should look like the ones from VS 2005.

    Could you please describe the steps necessary to implement that.

    Thank you,

    Evgueni
  2. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 23 Feb 2007 Link to this post

    Hello Evgueni,

    To change DockPanel look & feel use the Visual Style Builder. You must create a new theme. To do so follow the steps bellow:

    1) Open Visual Style Builder from the Start Menu -> All Programs -> telerik

    2) Choose File -> Load Control -> Telerik.WinControls.Docking -> Dock Presenter Control

    3) In "Control Structure" panel select:

    RootRadElement > DockPresenterElement > DockPresenterLayout > DockPresenterCaptionElement > CaptionLayout > CaptionButton



    There are three CaptionButtons (one for menu button, one for the pin button and one for the close button).

    3) In "Expert Mode" panel go to the "Misc" section:



    Here you can change the button image for different states (Active, Hovered, Clicked).

    4) Change some other properties to achieve look & feel similar to VS 2005 one (e.g Fill and Border)

    5) Optionally create VS2005 theme for DocumentPresenterControl, DropDownButton, TabStrip and DropDownButton.

    6) Put the code below when you create DockPanels (This problem will be fixed in our next release)

    DockPanel dockPanel = new DockPanel(); 
    ... 
    DockPresenterElement element = ((DockPresenterControl)dockPanel.DefaultPresenter).DockPresenterElement; 
    element.Children[2].Children[0].RadPropertyChanged += element_RadPropertyChanged; 
    ... 
    void element_RadPropertyChanged(object sender, RadPropertyChangedEventArgs e) 
        if (e.Property == DockPresenterCaptionElement.ActivatedProperty) 
        { 
            RadElement element = (RadElement)sender; 
            foreach(RadElement el in element.ChildrenHierarchy) 
                el.SetValue(DockPresenterCaptionElement.ActivatedProperty, e.NewValue); 
        } 


    I have attached sample theme file for your convenience. To install it use this code:

    ThemeResolutionService.RegisterThemeFromStorage(ThemeStorageType.File, @"c:\VS2005.xml"); 
    dockingManager1.ThemeName = "VS2005"


    Greetings,
    Tsvetan Raikov
    the telerik team
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Evgueni
    Evgueni avatar
    2 posts
    Member since:
    Nov 2006

    Posted 23 Feb 2007 Link to this post

    Tsvetan,

    Thank you for your detailed response. The only thing I am not sure is about the last paragraph where you say that you attached a sample theme. I cannot find the attachment.

    Thank you,

    Evgueni
  5. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 26 Feb 2007 Link to this post

    Sorry, Evgueni, my mistake. Here we go.
     

    Best wishes,
    Tsvetan Raikov
    the telerik team
Back to Top