adding telerik to a user control library

10 posts, 1 answers
  1. Eric
    Eric avatar
    36 posts
    Member since:
    Apr 2013

    Posted 07 Jan 2015 Link to this post

    How do I do this? Do I just add all of the telerik references individually? If so, is there a guide to make sure I add the right ones?

    Also, with a wpf application I have to create the shared resource library with the themes. how do I do this with a user control library?

    Thanks!
    Eric
  2. Petya
    Admin
    Petya avatar
    975 posts

    Posted 12 Jan 2015 Link to this post

    Hi Eric,

    I would suggest you install the Telerik Visual Studio Extensions that can help you in determining the assemblies your project would need. The Project Configuration and Creation Wizard automatically selects all assemblies a specific assembly is dependent upon. Additionally, you could take a look at the Controls Dependencies article for a reference on the needed assemblies for each control or in the respective component's Getting Started article, e.g. Getting Started with RadGridView.

    As to your second question, the Implicit Styling approach requires to merge all needed resource dictionaries in your application. What this means is that you would need to add references to the assemblies from the Telerik UI for WPF suite in both your class library and WPF application and merge the resource dictionaries in the App.xaml of the app.

    Let us know if you have any additional questions.

    Regards,
    Petya
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Eric
    Eric avatar
    36 posts
    Member since:
    Apr 2013

    Posted 12 Jan 2015 in reply to Petya Link to this post

    I have the telerik visual studio extension installed and I use it to configure my executable projects, unfortunately it does not give me the option to configure library projects. 
  5. Momchil
    Admin
    Momchil avatar
    58 posts

    Posted 13 Jan 2015 Link to this post

    Hello Eric,

    Unfortunately Telerik Visual Studio Extensions for UI for WPF currently do not support User Control Library projects, but you should still be able to use our UI for WPF controls in your project by dragging the controls from the Visual Studio Toolbox. This way all needed references will be added to your project automatically for each control you add.

    Please let us know if you need further assistance.

    Regards,
    Momchil
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  6. Eric
    Eric avatar
    36 posts
    Member since:
    Apr 2013

    Posted 13 Jan 2015 in reply to Momchil Link to this post

    when I do that I get the following build error

    Error 5 Unknown build error, 'Cannot resolve dependency to assembly 'Telerik.Windows.Data, Version=2014.3.1021.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event. Line 11 Position 10.'

  7. Answer
    Momchil
    Admin
    Momchil avatar
    58 posts

    Posted 14 Jan 2015 Link to this post

    Hi Eric,

    This might happen if you are using Implicit Styles with XAML binaries. If you are using Implicit Styles please ensure that the NoXaml binaries distribution is registered in the Visual Studio Toolbox. You can do that with the help of the Toolbox Configurator. Open it and select the NoXAML entry with the desired version. After the Toolbox Configurator restarts the Visual Studio try again to add a control from the Toolbox.

    Please let us know if this helps.

    Regards,
    Momchil
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  8. Eric
    Eric avatar
    36 posts
    Member since:
    Apr 2013

    Posted 28 Jan 2015 in reply to Momchil Link to this post

    Woo hoo! Thank you!
  9. Eric
    Eric avatar
    36 posts
    Member since:
    Apr 2013

    Posted 28 Jan 2015 in reply to Eric Link to this post

    well, shoot, I just tried building the project and now I get the following error:

    "CultureToLocalizationStringConverter" does not exist in the namespace "clr-namespace:Telerik.Windows.Controls.Localization;assembly=Telerik.Windows.Controls". C:\...\Themes\ExpressionDark\Telerik.Windows.Controls.Input.xaml

    I'm not sure which styles are explicit and which are implicit, but I'm using the ones where the project has the xaml files in it. I like that solution because I can customize the styles pretty easy, but if I can't use that along with my user control library I'll make do

  10. Eric
    Eric avatar
    36 posts
    Member since:
    Apr 2013

    Posted 29 Jan 2015 in reply to Eric Link to this post

    switching to the library way of implicit styling and then back to the xaml way fixed whatever references got broken.

    Thank you for your help!
  11. Petya
    Admin
    Petya avatar
    975 posts

    Posted 29 Jan 2015 Link to this post

    Hello Eric,

    I'm glad to hear you found a solution to the issue.

    Just to let you know and anyone else who might encounter this topic, the error suggests that the assemblies registered in the toolbox are not the same version as the XAML files in the project.  More precisely, the Telerik.Windows.Controls.Input.xaml depends on the assemblies from the most recent 2014.3 1202 release, and the assemblies in the toolbox are an older version.

    Do let us know if you are experiencing any other issues or have further questions.

    Regards,
    Petya
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
UI for WPF is Visual Studio 2017 Ready