RadDiagramShape, virtualizing Diagram, and Visibility

4 posts, 1 answers
  1. David
    David avatar
    25 posts
    Member since:
    Jan 2013

    Posted 12 Feb Link to this post

    for our RadDiagramShapes, we have a Style that includes the Setter:

    <Setter Property="Visibility" Value="{Binding Visibility}" />

    When we have a these shapes in a diagram with DiagramSurface.IsVirtualizing set to false, the binding appears as expected.  However, when we enable virtualization, we see via Snoop that the binding on that property has instead been set locally to a path of "(0)".

    We use Visibility to control, oddly enough, the visibility of elements in our diagram.  Can you all offer any insights into what's going on and also what we could do to work around this while still having virtualization enabled, please?

    This is with UI for WPF v. 2015.2.0401.

     

    Thanks,

     

    -David

     

  2. Answer
    Kiril Vandov
    Admin
    Kiril Vandov avatar
    324 posts

    Posted 15 Feb Link to this post

    Hello David,

    The RadDiagram supports a UIVirtualization which collapses all items outside the viewable area, thus enhancing the UI performance while manipulating the Diagramming elements. We are internally using the Visibility and change it based on the element and its location.
    If you want to continue using the Virtualization of the RadDiagram and execute your custom logic for showing/hiding elements, we suggest you to use the Opacity property and set its Value to 0 when you want to hide a shape.

    I hope this information helps.

    Kind regards,
    Kiril Vandov
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
  3. UI for WPF is Visual Studio 2017 Ready
  4. David
    David avatar
    25 posts
    Member since:
    Jan 2013

    Posted 19 Feb Link to this post

    Hi Kiril,

    Thanks for the reply!  Thankfully, we're not otherwise using opacity in this case, so we can use it as a surrogate for visibility.

    If I may say, I would recommend that you all add a more explicit note to your Diagram Virtualization documentation (http://docs.telerik.com/devtools/wpf/controls/raddiagram/features/raddiagrams-virtualization) saying that you use the Visibility property on items to achieve UI Virtualization.  I understand now that's what you all are describing in the documentation, but it didn't register at the time.

     

    Thanks again!

     

    -David

     

  5. Kiril Vandov
    Admin
    Kiril Vandov avatar
    324 posts

    Posted 22 Feb Link to this post

    Hello David,

    Thank you for the valuable feedback we will try to update the Virtualization article accordingly to be more understandable that we are using the Visibility property.

    Kind regards,
    Kiril Vandov
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
Back to Top