|
S.no |
Queries |
Responses |
|
1. |
the overview used to auto scale to the contents of the diagram no matter what the coordinates of its contents were and center them in the viewfinder. It would also allow the red box to scale outside of what was visible inside the viewfinder. Now it appears that when I force a fit on the diagram load, the overview bugs out and the entirety of the red box of visible, but outside the bounds of the overview. Additionally, interacting with the overview in any way forced it, and the bound diagram, to snap back to the "pre fit" view. It would appear that this is happening because the latest version of the diagram forces the maximum size of the red control box for the overview to be no larger than the overview itself, in addition to not being able leave the bounds of the view. This both makes the overview inflexible and forces me to arrange my nodes within the bound internally defined by the library. I have included videos on the behavior I am seeing with v16 and the intended behavior with v15 for reference. Additionally here is the code that gets executed when I click the "Fit" button on the upper right: private void FitButton_Click(object sender, RoutedEventArgs e) { IGraphInfo graphinfo = SLD.Info as IGraphInfo; graphinfo.Commands.FitToPage.Execute( new FitToPageParameter() { FitToPage = FitToPage.FitToPage, Margin = new Thickness(150) }); } |
Fit To Page
In our older version, during fit to page, diagram will zoom-in or zoom-out to fit diagram along with viewport. But we have changed this behavior in such a way that diagram cannot zoom below 100%. Instead diagram will be placed center of the view port.
You can customize fit to page to older behavior, please set CanZoomIn to true as shown in the following code example.
Code Example:
IGraphInfo graphinfo = diagram.Info as IGraphInfo;
graphinfo.Commands.FitToPage.Execute(
new FitToPageParameter()
{
FitToPage = FitToPage.FitToPage,
Margin = new Thickness(150),
CanZoomIn = true,
});
Overview drag restriction:
In older version, there is no restrictions to move the red rectangle in Overview. Currently we have limited it within overview area. To change it back to older behavior, please set ScrollLimit to infinity as shown in the code example.
Code Example:
<overview:Overview x:Name="overview" ScrollLimit="Infinity" Source="{Binding ElementName=diag}" Height="100" Width="200" Grid.Row="1">
</overview:Overview> |
|
2. |
annotations seem to no longer be working. Diagram seems to be attempting to render the annotation itself instead of the "Content" property of the Annotation as was previously the case in version 15. Here is the code used to create the Annotations, it is exactly the same as the code from your docs: node.Annotations = new AnnotationCollection() { //Define the Annotation new AnnotationEditorViewModel() { Content="Annotation", } }; |
In v15 we have provided .binding style support to Node, Connectors but not to the Annotation. From 15.2.0.40 releases we have provide binding style support to annotation also. So we have to provide binding style for Annotation also. For more details please refer to the below link.
Release Notes Link:https://help.syncfusion.com/wpf/release-notes/v15.2.0.40?type=all#sfdiagram-breaking-changes
We have provided a screenshot to refer the suitable link for your requirement.
Screenshot:
|