Add close button

2 posts, 0 answers
  1. first100
    first100 avatar
    4 posts
    Member since:
    Sep 2013

    Posted 13 Oct 2013 Link to this post

    Hy,

    In radbook template i would to add a simply close button with its click event to close the control itself
    How i can this? There is any code sample?

    Many thanks :)
  2. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 16 Oct 2013 Link to this post

    Hello Massimo,

    The RadBook control is essentially an ItemsControl that displays a collection of RadBookItems. Each RadBookItem can act as a container for many visual elements. This means that if you need to add a button in the RadBook, you can simply add it to one of the RadBookItems.

    You can find a declaratively defined RadBook in the FirstLook example of the component in our demos. This link will take you to the Silverlight demos but the approach for WPF and Silverlight is the same. And you can find the same implementation in our WPF demos, which you can download from here.

    The other approach you can use is to edit the default ControlTemplate of a RadBookItem. Here again, you'll be adding the Button to a RadBookItem but in its Template. You can follow the steps described in the Editing ControlTemplate in Blend tutorial to edit the RadBookItem template and then you can add a Button element wherever you need to.

    I hope this information will get you started. However, if you need further assistance or you're having troubles implementing one of the above approaches, don't hesitate to write back.

    Regards,
    Tina Stancheva
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top