Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > TabControl > Multiple constructor call when change selected tab item & use style selector...

Not answered Multiple constructor call when change selected tab item & use style selector...

Feed from this thread
  • Tomas avatar

    Posted on Jan 26, 2012 (permalink)

    Hallo,
    we have a new issue with RadTabControl - when we use style selector to use RadTabControl in MVVM concept, after we create more than one TabItems, after each active tab control item change, the View's constructor is everytime called.. - why RadTabControl is creating everytime new instance??? (-> Click on the button to add any tab items, create breakpoint into constructor UserControl1() and switch between the tabs...)
    When we change RadTabControl into TabControl (remove all Telerik's stuff from MainWindow.xaml), the problem is solved... Thank you for your help...

    Reply

  • Tomas avatar

    Posted on Jan 26, 2012 (permalink)

    Sorry - is it possible to upload .zip sample there??? There is a limit for pictures only...? I can't upload a zip sample :-(

    Reply

  • Petar Mladenov Petar Mladenov admin's avatar

    Posted on Jan 31, 2012 (permalink)

    Hi Tomas ,

     In order to keep the TabItem's content in memory (and this way not re-initializing) you can set the IsContentPreserved to True. Please check out this help article for more info on this.
    On a side note, you will be able to attach zips if you open a support thread.

    Regards,
    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > TabControl > Multiple constructor call when change selected tab item & use style selector...
Related resources for "Multiple constructor call when change selected tab item & use style selector..."

WPF TabControl Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]