Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
110
SCSF and Ribbon integration
posted

 Hello,

I hava the following problem: There is a already defined SCSF in which Shell and Layout are separated projects. I'm trying to use UltraToolbarManager in the project like Ribbon. I put need references to Infragistics.Practices.CompositeUI.WinForms. After that I change inheritance of SmartClientApplication from FormShellApplication<TWorkItem, TShell> to IGFormShellApplication<TWorkItem, TShell> in the library project. Next step was to insert UltraToolbarManager in ShellForm because it need to be on the top of the hierarchy, and not allow me to put the control in the ShellLayoutView. After that I add following lines in ShellForm to register UltraToolbarManager : 

RootWorkItem.UIExtensionSites.RegisterSite("ribbon", this.Shell.UltraToolbarsManager.Ribbon);

            // Register the ultraToolbarsManager1's RibbonTabs collection
            RootWorkItem.UIExtensionSites.RegisterSite("ribbonTabs", this.Shell.UltraToolbarsManager.Ribbon.Tabs);

            // Now create a Ribbon Tab and add it to the ribbonTabs collection
            RibbonTab newRibbonTab = new RibbonTab("ribbonTab1", "Ribbon Tab 1");
            RootWorkItem.UIExtensionSites["ribbonTabs"].Add<RibbonTab>(newRibbonTab);

            // Now register newRibbonTab's Groups collection
            RootWorkItem.UIExtensionSites.RegisterSite("ribbonTab1Groups", newRibbonTab.Groups);

 

When I finish with this I try to build the solution and the following error appears:

The type 'Microsoft.Practices.CompositeUI.WinForms.WindowsFormsApplication`2<T0,T1>' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.Practices.CompositeUI.WinForms, Version=1.0.51205.0, Culture=neutral, PublicKeyToken=null'.    C:\Documents and Settings\dimo.kapnilov\Desktop\SmartClientDevelopmentSolution4\Source\Infrastructure\Infrastructure.Library\SmartClientApplication.cs    25    27    Infrastructure.Library.

 

I can't understand why it is looking for  Microsoft.Practices.CompositeUI.WinForm, and actually I have reference to this assembly. I will be very thankful if somebody can help to resolve this problem.

Parents
No Data
Reply
  • 2077
    Offline posted

    smartgen said:
    I can't understand why it is looking for  Microsoft.Practices.CompositeUI.WinForm

    Infragistics.Practices.CompositeUI.WinForms extends the Microsoft.Practices.CompositeUI.WinForm, that is why you need both.

    The error you are receiving is thrown because your referenced CompositeUI libraries (Microsoft.Practices.CompositeUI.dll, Microsoft.Practices.CompositeUI.WinForms.dll, Microsoft.Practices.ObjectBuilder.dll) are from a different build than the ones used to build the Infragistics.Practices.CompositeUI.WinForms. You should reference the ones you can find in the bin\debug (I guess) folder where the Infragistics.Practices.CompositeUI.WinForms was built.

    HTH,

    Emanuel

Children
No Data