I have XamDiagram in a Grid and when user moves a node in the diagram which is not visible, I cant see scroll bars appearing. Is this expected behavior? How can we force XamDiagram to show scroll bars in such cases?
Hello Abs,
Thank you for contacting Infragistics. The XamDiagram doesn't expose scrollbars when nodes, connections etc. are out of view. However there are a few ways around this.
1. Increase the XamDiagram's WindowRect property (eg. WindowRect="0,0,500,300") to a larger height and width 2. Set the ZoomLevel property between 0.1 and 13. Peform the ScaleToFit method.
Please visit Configuring the Visible Portion of the Diagram (xamDiagram) topic in our online help for more details.
Let me know if you have any questions regarding this matter.
I could not achieve this behavior with few options you specified, it would be helpful if you have a sample to illustrate?
Thank you for following up. I've been thinking about this some more and I need more details about your application. Please provide a screenshot of your UI with the xamDiagram placed in the grid. If XamDiagramNodes are displayed within a grid cell which is too small to fit then it's possible that we will have to modify the grid instead. In that case you will have to modify the grid. Which grid are you using?
Note, the built-in NavigationPane is what we provide for panning when nodes are out of view for a standalone XamDiagram. I haven't tried this, but wiring up the XamZoombar control could also work.
Let me know if you have any quesitons regarding this matter.
Thanks Michael for the information, please see attached picture and let me know why diagram scroll bars are not available. XamDiagram is in a Grid and I am showing grid lines for illustration purposes.
Thank you for following up.
I couldn't tell from your image if the grid lines represented row and column borders.
I attached a sample below that shows how you can handle the DiagramNode's IsVisibleChanged event and simply perform ScaleToFit to show all the nodes when it's moved out the window scope. Just move any node to the right beyond the bounds of the column. It will auto scale and show the node even though it went off-screen.
You might be interested in this post that discusses how to add scrollbars to grid columns.
eg.
http://infragistics.com/community/forums/p/108165/509423.aspx#509423
Let me know if you have any questions.
I do not mean data grids, I mean simple wpf layout grids. I have modified your sample in previous post and you can see in the first column diagram is not shown in complete. Ideally if user do not prefer scale to fit or to zoom then scroll bar should appear.
Thank you for following up. There is no native support to show scrollbars for the XamDiagram. After speaking with my team we do not have a viable approach for you at this time to incorporate scrollbars. I recommend submitting a new product idea on our website.
You can suggest new product ideas for future versions (or vote for existing ones) at <http://ideas.infragistics.com>.
There are many benefits to submitting a product idea:
Direct communication with our product management team regarding your product idea.Notifications whenever new information regarding your idea becomes available.Ability to vote on your favorite product ideas to let us know which ones are the most important to you. You will have ten votes for this and can change which ideas you are voting for at any time.Allow you to shape the future of our products by requesting new controls and products altogether.You and other developers can discuss existing product ideas with members of our Product Management team.
Steps to create your idea:
1. Log into the Infragistics Product Idea site at http://ideas.infragistics.com (creating a new login if needed).
2. Navigate to the product / platform channel of your choice (e.g. WPF, Windows Forms, ASP.NET, HTML5 / Ignite UI, iOS / NucliOS, etc.)
3. Add your product idea and be sure to be specific and provide as much detail as possible.
- Explain the context in which a feature would be used, why it is needed, why it can't be accomplished today, and who would benefit from it. You can even add screenshots to build a stronger case. Remember that for your suggestion to be successful, you need other members of the community to vote for it. Be convincing!
- Include a link to this thread in your idea so product management will be able to look back at this case.
The Product Idea site puts you in the driver's seat and allows you to track the progress of your ideas at any time, see how many votes it got, read comments from other developers in the community, and see if someone from the product team has additional questions for you.