diagram.PageSettings.PageBackground = new SolidColorBrush(Colors.Transparent);
Here,diagram is instance of SfDiagram.
How can you set the page background in xaml using a dynamic resource!. As a control this should be straight forward without the need for view models, which is curious why you have them in the first place.
Any help would be appreciated.
Requirement: Need to set the diagram background to be transparent.
We have prepared a simple sample to achieve your requirement. In the sample, we have used transparent .png images in the Content of the Node and set the page background as Red and Diagram’s Background as Black to show the difference between them. Please follow the sample in the below link.
If the provided sample doesn’t help you to achieve your requirement, please revert us with more details or modify the sample to understand your requirement on our end.
Karkuvel Rajan S