Problem with DropDown when closing Tabs

6 posts, 1 answers
  1. Ariel Gonzalez
    Ariel Gonzalez avatar
    8 posts
    Member since:
    Jan 2010

    Posted 21 Jun 2010 Link to this post

    Hi

    I use in my application a RadTabControl that uses a Close button in the TabItem template. The problem is that when I use the DropDown it successfully shows the template that I used for the TabItems in the DropDown but If I click the close button from the dropdown the tab is closed and deleted from the RadTabControl but the DropDown does not get refreshes and this can lead to problem since if a click again in the close button of that tab from the dropdown I will get an error obviously because that Tab doesn't exists anymore.

    I am using the Q2 2010 beta

    Any solutions for that? There is a workaround for that?

    Thanks,

    Ariel
  2. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 24 Jun 2010 Link to this post

    Hi Ariel,

    Thank you for this report. We will investigate it further.

    For now I can suggest you to close the DropDownMenu whenever the close button is clicked through the MenuItem. For example: DropDownMenu.IsOpen = false;

    Give this approach a try and let me know if it works for you.

    Sincerely yours,
    Tina Stancheva
    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. UI for WPF is Visual Studio 2017 Ready
  4. Ariel Gonzalez
    Ariel Gonzalez avatar
    8 posts
    Member since:
    Jan 2010

    Posted 24 Jun 2010 Link to this post

    Hi Tina

    I am using MVVM so that solution is not ideal but for now I did it as a work around. Just set the TabControl.IsDropDownOpen  to false every time a tab closed and worked. The perfect solution is that somehow you hook up an event that went tabitems collection is changed you refresh the dropdown items collection that seems not to be the same when it should.

    Thanks,

    Ariel
  5. Answer
    Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1512 posts

    Posted 29 Jun 2010 Link to this post

    Hello Ariel Gonzalez,

    I've prepared a small project that shows you how to delete items from the DropDownMenu without closing it. Have a look at it and let me know how it works for you.

    On a side note, I'd like to inform you that we've just released an online tool that allows you to reduce the size of your Silverilght applications. For more information, please visit http://blogs.telerik.com/blogs/posts/10-06-10/telerik_assembly_minifier.aspx

    Greetings,
    Kiril Stanoev
    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
  6. Ariel Gonzalez
    Ariel Gonzalez avatar
    8 posts
    Member since:
    Jan 2010

    Posted 29 Jun 2010 Link to this post

    Hi Kiril

    That worked better. Still is not the preferred solution since I used MVVM then I have to be notifying the View from the ViewModel every time the tab has been closed. I do that using the IView approach.  I still would like to see that done behind scene in the control internal code so I don't have to worry about that, probably some sort of synch  between ItemSource in tab control and ItemSource in the DropDownMenu.

    Thanks

    Ariel


  7. Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1512 posts

    Posted 01 Jul 2010 Link to this post

    Hi Ariel,

    I agree that this scenario should be supported by RadTabControl out of the box. I've added your request in out public issue tracking system under the name "TabControl: When a tab is removed through a Close button in the DropDownMenu, the menu is not updated" and it will be available for tracking and voting tomorrow the latest. We will be working on this feature during our next quarter.

    Regards,
    Kiril Stanoev
    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
Back to Top
UI for WPF is Visual Studio 2017 Ready