Hi,
Hi Makro,
Yes, you can use Aspose.Diagram library in your Silverlight applications. You can write code to upload file to server and then pass uploaded file to Diagram class and then call Save method to render that diagram to any supported format.
I have used following code on a button click in a Silverlight application:
private void SaveToVDX_Click(object sender, RoutedEventArgs e)
{
var client = new SilverlightApplication1.ServiceReference1.DiagramServicesClient();
client.SaveToVDXCompleted += (s, ea) =>
{
TextBox1.Text = ea.Result;
};
client.SaveToVDXAsync();
}
and following service is used to convert a VSD file to VDX using Aspose.Diagram library:
namespace SilverlightApplication1.Web.Services
{
[ServiceContract(Namespace = "")]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class DiagramServices
{
[OperationContract]
public string SaveToVDX()
{
// Add your operation implementation here
Diagram diagram = new Diagram(System.Web.HttpContext.Current.Server.MapPath(@"Basic Flowchart.vsd"));
diagram.Save(System.Web.HttpContext.Current.Server.MapPath("Output.vdx"), SaveFileFormat.VDX);
return "Saved Successfully";
}
// Add more operations here and mark them with [OperationContract]
}
}
Please check product documentation http://www.aspose.com/docs/display/diagramnet/Home for available features and code examples and feel free to contact us in case you have further comments or questions.
Best Regards,