ToolWindow Tag Problem

4 posts, 0 answers
  1. Ozcan Oksuz
    Ozcan Oksuz avatar
    9 posts
    Member since:
    Feb 2010

    Posted 16 Apr 2010 Link to this post

    Hello,

    I am trying to keep an object in the Tag property of a tool window.
    But when I dock the tool window to a position the tag property becomes null.

      

     

    ToolWindow window = new ToolWindow();   
    _documentTabStrip.Controls.Add(window);  
    window.Tag = "Tag";  // Here I assign a tag   
    _radDock.DockControl(window, DockPosition.Top, DockType.ToolWindow);  
    // The Tag property of the docked toolwindow is null (_radDock.ToolWindows[0].Tag is null)  
     

    Is there any way to find the docked window in the _radDock to set its Tag.
    Please help.
    Burhan Eyimaya

     

     

     

     

     

     

     

     

     

     

  2. Alexander
    Admin
    Alexander avatar
    306 posts

    Posted 19 Apr 2010 Link to this post

    Hi Ozcan Oksuz,

    Thank you for contacting us.

    When using:
     
    _radDock.DockControl(window, DockPosition.Top, DockType.ToolWindow);
     
    you wrap the window (ToolWindow instance) in a HostWindow. To access its Tag you could use the code:
     
    object tag = ((HostWindow)(_radDock.DockWindows.ToolWindows[0])).Content.Tag;
     
    Here Content is your instance of ToolWindow.

    For the specific case of using ToolWindow we recommend using the DockWindow method of RadDock:
     
    _radDock.DockWindow(window, DockPosition.Top);
     
    In this case you can access the Tag of the window with the code:
     
    object tag = _radDock.DockWindows.ToolWindows[0].Tag;

    Hope it helps.

    Regards,
    Alexander
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. Manoj
    Manoj avatar
    5 posts
    Member since:
    Jan 2017

    Posted 20 Feb Link to this post

    Hi

    I want to set the Unique ID property for Tool window as like below  can you please provide me specific solutions.

    Me.DocumentExplorerDockPanel.ID = New System.Guid("e4a0db3d-615d-46e5-9aca-3889ff200a49")

    So unable to bind this id to our Guid please suggest.

    Thanks Manoj

  4. Hristo
    Admin
    Hristo avatar
    837 posts

    Posted 20 Feb Link to this post

    Hi Manoj,

    Thank you for writing.

    The tool windows of RadDock do not expose an ID property. If it fits your local setup you can use the Tag property of the windows for your purpose.

    An alternative approach is to inherit the ToolWindow class and extend it with an ID property. Please note you will need to manually change the type of all custom tool windows added in the Visual Studio designer. I am sending you attached a sample project demonstrating the suggested solution.

    I hope this helps. Should you have further questions please do not hesitate to write back.

    Regards,
    Hristo
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top