Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Diagram scroll (Read 216 times)
BigWander1
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 5
Joined: Sep 26th, 2024
Diagram scroll
Jan 9th, 2026 at 7:57am
Print Post  
Hi! I have question about scroll feature when user moves object outside of diagram control. In related solution, when user moves object outside of diagram control, scrolls does not follow it and just stay on the same place. But, if Template assignment will be removed (36 line, MainWindow.xaml), then scrolls will follow this object. Could you help me, is it possible to use build-in features to make scrolls follow selected object (with template assignment) or i need to implement custom logic for it?
  

MindfusionScroll.zip ( 30 KB | 16 Downloads )
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3435
Joined: Oct 19th, 2005
Re: Diagram scroll
Reply #1 - Jan 9th, 2026 at 9:15am
Print Post  
Hi,

Checking diffs with our standard template, adding CanContentScroll to the custom one and removing the Margin value fixes auto-scrolling:

Code
Select All
<ScrollViewer
    x:Name="PART_ScrollViewer"
    CanContentScroll="True"
    VerticalScrollBarVisibility="Auto"
    HorizontalScrollBarVisibility="Auto">

    <mindfusion:DiagramPresenter
        x:Name="PART_Presenter"
        HorizontalAlignment="Left"
        VerticalAlignment="Top"/>

</ScrollViewer> 



CanContentScroll lets the ScrollViewer communicate with DiagramPresenter via IScrollInfo interface.

I guess Margin value interferes somehow with our hot-zone calculation for when to start scrolling. If you need to add Margin back, see if you can compensate for it by adjusting the DiagramView.ScrollZoneSize property.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint