Inheritance of an existing usercontrol

4 posts, 0 answers
  1. Christie Admin
    Christie Admin avatar
    239 posts
    Member since:
    Aug 2013

    Posted 22 Mar 2015 Link to this post

    Hi,

    In my solution, in namespace B, I have a project named CustomControls. This project contain 5 customs UserControls based on existing Telerik UserControls.

    ie:

    public class CustomExpander : RadExpander (no xaml attached to the class)
    {
    }

    When I try to use my customs UserControls in my main project which is in namespace A in the same solution, in my xaml I can add as an example my CustomExpander but all the properties of the RadExpander are not accesssible in the xaml?!?

    Thank's
    Alain
  2. Kalin
    Admin
    Kalin avatar
    1209 posts

    Posted 24 Mar 2015 Link to this post

    Hi Alain,

    You should have referenced the Telerik binaries in both of the projects in order to get it working correctly. So assume this is the issue here - please try adding references to the other project also.

    Hope this helps.

    Regards,
    Kalin
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Christie Admin
    Christie Admin avatar
    239 posts
    Member since:
    Aug 2013

    Posted 24 Mar 2015 in reply to Kalin Link to this post

    Hi Kalin,

    referencing the binairies solved the issue. I have another issue since then... In my UserControl, I added in the MergedDictionary  the theme xaml files but my custom control become not visible. If I use a direct Telerik control, the Telerik control are visible.

    Thank's
    Alain
  5. Kalin
    Admin
    Kalin avatar
    1209 posts

    Posted 27 Mar 2015 Link to this post

    Hello Alain,

    When using Implicit Styles you also would also need to merge the theme files in the App.xaml of the other project in order to show the custom controls.

    Hope this helps.

    Regards,
    Kalin
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
Back to Top