Radpane MVVM floating issue

7 posts, 0 answers
  1. Jurgen
    Jurgen avatar
    1 posts
    Member since:
    Oct 2012

    Posted 23 Oct 2012 Link to this post

    I have a radpane which can have different viewmodels as a datatemplate. I attached my object to the content of the radpane.
    When the pane is docked there is not issue, but when the pane is in the floating state, the templated control only shows the datatype of the viewmodel.

     <telerik:RadPane x:Name="paneManufacturers" 
                     Header="{x:Static Properties:Resources.LabelLibraryExplorer}"
               Content="{Binding AvailableItems}">
    </telerik:RadPane>
  2. George
    Admin
    George avatar
    1332 posts

    Posted 25 Oct 2012 Link to this post

    Hi Jurgen,

     
    Thank you for contacting us.

    I am not sure what could be the cause of the problem, but I could give a hint. Please, note that when a pane goes floating, it's placed in another window and it's not in the same visual tree as the RadDocking control. This means that if the DataTemplates are placed in the MainWindow.Resources, they won't be applied for the floating panes(as I note, floating panes are in another Windows). 

    Hope this sheds some light on the problem.

    Regards,
    George
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
  4. D
    D avatar
    3 posts
    Member since:
    Feb 2013

    Posted 04 Feb 2013 Link to this post

    I've got exactly the same issue. I've tried to add datatemplate in toolwindow's style resources and nothing happened. What can you suggest?
  5. George
    Admin
    George avatar
    1332 posts

    Posted 07 Feb 2013 Link to this post

    Hi,

    Please, double check that the DataTemplates are defined in the app.xaml file, but not in the MainWindow.Resources.

    Kind regards,
    George
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  6. D
    D avatar
    3 posts
    Member since:
    Feb 2013

    Posted 07 Feb 2013 Link to this post

    that solved my problem, but partially. First time my pane goes floating everything is OK. When I pin it and then try to move it, its content disappears.
  7. George
    Admin
    George avatar
    1332 posts

    Posted 11 Feb 2013 Link to this post

    Hi,

    Can you share some more details about this scenario? If you can send us a sample code, it would be of great help to pinpoint the problem.

    Kind regards,
    George
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  8. D
    D avatar
    3 posts
    Member since:
    Feb 2013

    Posted 11 Feb 2013 Link to this post

    Thank you for you support! I've solved my issue. The reason why my datatemplate in app.resources didn't get applied was a WPF bug. When there's no styles declared in resourcedictionary, this dictionary is skipped, and WPF doesn't look inside. So, I only had my datatemplate in app resorcedictionary. I've added a default style and it started working!
Back to Top
UI for WPF is Visual Studio 2017 Ready