Hi,
is it possible to change the color of nodes in the OverviewPlusDetailPane depending on the bound data?
I would like to highlight nodes in a very crowded overview to help the user to focus on the most important nodes.
Any help would be appreciated.
Hello Felix,
I have been investigating into the behavior you are looking to achieve to be able to highlight particular nodes within the OverviewPlusDetailPane depending on bound data, and unfortunately, this does not appear to be possible with the XamOrgChart control.
The reason for this is that the content of the OverviewPlusDetailPane is not modifiable because it is an Image outlining the general shape of the XamOrgChart it is being used on. It does not take any styling of the nodes into account.
If you would like to see the ability to customize the content of the OverviewPlusDetailPane or have it take that style of the nodes into account, I would recommend suggesting a new product idea for this at our WPF Ideas Site, here. This will place you in direct communication with our product management teams who plan and prioritize upcoming features and development based on community and user feedback.
Please let me know if you have any other questions or concerns on this matter.
Hi Andrew,
thank you very much for your quick response.
Is it possible to configure the OrgChart to have all zooming features disabled so I can put it inside a ScrollViewer or a third party zooming/overview control?
Or is there an underlying control that would only show the data without zoom?
I'm mainly concerned that the OrgChart control's width and height would not be dependent on the content if there is still internal zooming going on and the data gets dynamically changed.
Thank you for your update on this matter.
If you wish to disable zooming on the XamOrgChart control, the best thing that I can recommend in order to achieve this is to set the ZoomLevel, MaximumZoomLevel, and MinimumZoomLevel of the control all to the same value.
Regarding placing the XamOrgChart within a ScrollViewer, though, this might prove to be difficult as you will need to provide a Width and Height for the XamOrgChart that would represent entire size of your node layout at the zoom level that you provide. Unfortunately, there is nothing on the control that will really determine this, and when the nodes are out of view, they are virtualized and so you will not be able to get their actual visual object. This is expected and is done for performance reasons.
Theoretically, something you could do to determine the entire width and height of the XamOrgChart plot is to measure it with a value that you know for certain is larger than the plot that you have. You could then loop through each of your nodes, get the OrgChartNodeControl for those nodes from the Control property of the node, and then get their position relative to the XamOrgChart to get the left-most, right-most, top-most, and bottom-most nodes as this would allow you to determine the actual width and height. Dynamically adding or removing nodes to/from the XamOrgChart could potentially change this as well, though, and so that would be another scenario to handle.