When I try to get printpreview of SfDataGrid I get following error
System.Windows.Markup.XamlParseException: 'Add value to collection of type 'System.Windows.Controls.UIElementCollection' threw an exception.'
Inner Exception
FileNotFoundException: Could not load file or assembly 'Syncfusion.Shared.Wpf.Classic, Culture=neutral' or one of its dependencies. The system cannot find the file specified.
DO
Thanks for your reply
This issue came only after updating my syncfusion assemblies from 18.3.0.35 to 19.3.0.53
There is no change in my project and all the assemblies are referred properly
I just posted this issue here so that if there is any change in assembly reference then ok else if any problem then please check
Thanks for reply
Amit Saraf
Hi,
I'm using 21.1.35 and I've tried 21.2.8 and I get the exact same error. I'm referencing the packages in my project file:
<PackageReference Include="Syncfusion.SfChart.WPF" Version="21.1.35" />
<PackageReference Include="Syncfusion.SfGrid.WPF" Version="21.1.35" />
The Shared package is referenced implicitly, but the Classic isn't to be found... what can be the issue?
Hi Erik,
We have delisted all our classic assemblies (tools classic, shared classic, and
some of our themes). That’s why the Syncfusion.Shared.Wpf.Classic
assembly was not found while searching in the NuGet packages.
However, you can resolve the
reported problem by installing Syncfusion.Shared.Wpf.Classic assembly
in your application.
NuGet Details Link: https://www.nuget.org/packages/Syncfusion.Shared.WPF.Classic
Note: You can install this NuGet package by the command in the Package
Manager Console. Refer to the below-mentioned screenshot for opening the
Package Manager Console in Visual Studio.
Install Command:
Find the sample demo in the attachment.
Regards,
Vijayarasan S
If this post is helpful, please consider Accepting it as the solution so that
other members can locate it more quickly.
Hi Vijayarasan,
Yes it works! Thank you for your quick response!
Since this this package is unlisted, may I assume that this way of Print Preview isn't the recommended way to do it (anymore)? According to the docs it is...
Kind regards,
Erik
Erik,
The current look and feel of the PrintPreviewWindow is achieved by applying the
Metro theme. However, we would like to
inform you that this assembly has been removed since Syncfusion version
(v19.4.0.56) due to being classified as classic. Therefore, we kindly request
you to install the package through the Package Manager as we suggested in our
previous updates to resolve this issue. This is the recommended way to print
the data by using the ShowPrintPreview method.