iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hi,
We are trying to use the DialogBoxServiceProvider.cs from the ClientUI/Devforce exemple (ContactMVVM).
Our project has one unique application and many DLL, each ones containing ViewModels et Views.
When we try to open a view as modal, it only works if the view is in the silverlight application.
We can't manage to call a view in another DLL. Is there a particulary way to name the view when it is not in the application ? We tried many way but each gave an error :
In the function GetInstanceAsync, the property Instance as null for value on the following line : resultCallback((IModalWindow)asyncResult.Instance);
We tried to call the main function with thiose parameter :
"viewA"
"AssemblyA.viewA"
"AssemblyA;component/viewA"
"/AssemblyA;component/viewA"
etc ...
Is it possible to call as modal a view wich isn't in the silverlight application ? if yes how ?
thanks
Hello,
Does the dll come from another library WebProject application? Or is it from Silverlight Web Aplication?I think if it is from another Silverlight Web Application, you could not refer into .dll itself, but it should .xap itself. Regarding this scenario, I would like to discuss with our developer teams. I will let you know asap after I got the response.
Regards,Handy
Our DLL were created as "Silverlight Class Library". They are part of the Silverlight project (the silverlight application has a dependency on them).
Our concern is about the naming convention on this call :
UXShell.Current.RootApplication.CreateInstance(viewType)
What should be the value of viewType in our case ? « Assembly.View » ? « Assembly/View » ? Something else ?
Hi Sebastien,
I supposed that you have created the ApplicationPackage for the Silverlight project you wish to load on demand.
In this case, make sure the EntryPointAssembly or the MainAssembly attribute in the SAFMetaData.xml that resides in your "external" Silverlight project has been properly set.
The type that you passed to the CreateInstance should be the FQDN of the class type (i.e., SilverlightApp1.Class1), and this class should be found in the assembly you specified in either the EntryPointAssembly/MainAssembly described above.
For more information about ApplicationPackage, please refer to ClientUI Application Framework Overview.
Hope this helps,Jimmy
We found a way to resolve our issue.
We changed the "public static IModalWindow GetInstance(string viewType)" method like this :
Original :
public static IModalWindow GetInstance(string viewType) { return UXShell.Current.RootApplication.CreateInstance(viewType) as IModalWindow; }
public static IModalWindow GetInstance(string viewType)
{
return UXShell.Current.RootApplication.CreateInstance(viewType) as IModalWindow;
}
Modified :
public static IModalWindow GetInstance(string viewType) { Assembly assembly = Assembly.GetCallingAssembly(); return assembly.CreateInstance(viewType) as IModalWindow; }
Assembly assembly = Assembly.GetCallingAssembly();
return assembly.CreateInstance(viewType) as IModalWindow;
Any idea if we could have any side effect ?
regards,
Although your workaround may work in the current state, you lose the benefits of having independent type that created based on the application package. For instance, the GetCallingAssembly may return an unexpected assembly when your application grows more complex.
Hth,Jimmy
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname