TreeViewPanel.VirtualizationMode issue

9 posts, 0 answers
  1. Andrew
    Andrew avatar
    4 posts
    Member since:
    Oct 2012

    Posted 12 Dec 2012 Link to this post

    Hello,

    In the documentation it shows setting the VirtualizatonMode of the TreeViewPanel with an attached property:

    <
    telerik:RadTreeView x:Name="radTreeView" telerikTreeView:TreeViewPanel.IsVirtualizing="True" telerikTreeView:TreeViewPanel.VirtualizationMode="Hierarchical">

    However VS is giving me the error that the attached property is read only.

    Has this method changed, or am I maybe doing something else incorrectly?

    Thanks,

    Andrew


  2. Kiril Vandov
    Admin
    Kiril Vandov avatar
    324 posts

    Posted 17 Dec 2012 Link to this post

    Hello Andrew,

    We have checked our code and the attached TreeViewPanel.VirtualizationMode Property is not readonly. As we were unable to reproduce the issue at our side I would like to ask you for more details:
    - what is the version of VisualStudio you are using ?
    - are you with our latest dll's, if not what is their version?
    Is it possible for you to send us an isolated project reproducing the issue? This way we would be better able to investigate it.
    Thank you for your cooperation in advance.


    Kind regards,
    Kiril Vandov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Felix
    Felix avatar
    17 posts
    Member since:
    Jun 2011

    Posted 24 Jan 2013 Link to this post

    Hi Kiril,

    I have the same problem. It works well under VS 2010 and .NET 4.0. But as soon as I use those attached propertys under VS 2012 and .NET 4.5, I get this error:

    error MC1000: Unknown build error, 'Ambiguous match found. Line 580 Position 49.'

    telerikTreeView:TreeViewPanel.IsVirtualizing="True"
    telerikTreeView:TreeViewPanel.VirtualizationMode="Hierarchical"

    As soon as I remove the second line, VS 2012 will build without any error!

    The exactly same code is build under VS 2010.

    Regards
    Felix

  5. Kiril Vandov
    Admin
    Kiril Vandov avatar
    324 posts

    Posted 29 Jan 2013 Link to this post

    Hello Felix,

    It seems that we have a bug with the VirtualizationMode property of the RadTreeView in WPF 4.5. We created a PITS item for it, where you can vote and track the progress of the task.

    Please accept our apology for the inconvenience.

    Regards,
    Kiril Vandov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  6. Andrew
    Andrew avatar
    1 posts
    Member since:
    Oct 2012

    Posted 29 Jan 2013 Link to this post

    Glad to hear that this issue is now understood. Since this is a bug, how likely is it that we'll get a proper fix in the short term?

    Thanks, 

    Andrew
  7. Kiril Vandov
    Admin
    Kiril Vandov avatar
    324 posts

    Posted 01 Feb 2013 Link to this post

    Hi Andrew,

    Unfortunately we can't schedule the fix for this task at the moment. However as a workaround you could set the VirtualizationMode property from code behind.

    I hope this isn't a show-stopper for you.

    Kind regards,
    Kiril Vandov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  8. Felix
    Felix avatar
    17 posts
    Member since:
    Jun 2011

    Posted 01 Feb 2013 Link to this post

    Hi Kiril,

    yes, this workaround works (code behind). Thank you for this hint.

    I have inserted this line in the constructor of the Window/UserControl after the InitializeComponent() call.

    Regards
    Felix
    // Just a workaround for WPF 4.5 (build error when setting this in XAML)
    TreeView.SetValue( TreeViewPanel.VirtualizationModeProperty, VirtualizationMode.Hierarchical );
  9. Louis
    Louis avatar
    83 posts
    Member since:
    Aug 2013

    Posted 23 Jun in reply to Kiril Vandov Link to this post

    Hi,

    The link to the PITS item is no longer valid. Still having this problem 3 years later...

    Thanks,

    Louis

     

  10. Kiril Vandov
    Admin
    Kiril Vandov avatar
    324 posts

    Posted 28 Jun Link to this post

    Hello Louis,

    This error is caused by the fact that the TreeViewPanel inherits from the MS VirtualizingPanel which in .Net4.5 exposes that same property and we are hiding an inheritance property. As Microsoft reports that the XAML parser is designed to work in that way, we have introduced another attached property which is doing the same thing. We suggest you to use the new telerik:TreeViewPanel.TreeVirtualizationMode property which works and build as expected.

    I hope this information helps.

    Kind regards,
    Kiril Vandov
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Back to Top
UI for WPF is Visual Studio 2017 Ready