Change Mouse for button

6 posts, 0 answers
  1. Mirko
    Mirko avatar
    9 posts
    Member since:
    Aug 2012

    Posted 25 Jul 2013 Link to this post

    Hi,

    I like to use the button for a Hyperlink Button. Everything looks fine if I´m setting the IsBackgroundVisible Property to false. 

    But it´s not possible for me to change the mouse if the user has the mouse over the button. At this moment I like to show a Hand mouse courser.

    Thanks for your help.


  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 25 Jul 2013 Link to this post

    Hi Mirko,

     The way to change the image of the Mouse Cursor that appears over the RadButton in WPF is to use the Cursor property:

    <telerik:RadButton Cursor="Hand"/>

    Regards,
    Petar Mladenov
    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
  4. Mirko
    Mirko avatar
    9 posts
    Member since:
    Aug 2012

    Posted 26 Jul 2013 Link to this post

    Sorry, I´m miss to write some more informations.

    I´m writing my own usercontrol and the new Button is inherits from RadButton. In the style of my new Button I´m writing the following xaml code.

    <Style TargetType="MyHyperlinkButton">
      <Setter Property="Cursor" Value="Hand" />
    </Style>

    But if I´m over the button the cursor don´t change.

    Do you have any idea?

    Thanks
  5. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 26 Jul 2013 Link to this post

    Hello Mirko,

     We cannot reproduce such issue, please check out our test project and let us know if we a re missing something.

    Regards,
    Petar Mladenov
    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 >>
  6. Mirko
    Mirko avatar
    9 posts
    Member since:
    Aug 2012

    Posted 26 Jul 2013 Link to this post

    Hi,

    currently I can´t modify your example like my situation. We have 2 assemblies. 

    1. My Application
    2. My Controls Libary

    In the second one we have created a button like your example and set the style to the generic.xaml file in the themes folder. 
    We use the button from the controls in the first assembly but the style from the generic.xaml file don´t used.

    Thanks
  7. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1183 posts

    Posted 31 Jul 2013 Link to this post

    Hello Mirko,

    Can you please try to merge the dictionary that you have created. The best way to merge it is to use the following snippet in the App.xaml file:

    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Themes\Generic.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>
    I hope this will help you.

    Regards,
    Pavel R. Pavlov
    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 >>
Back to Top
UI for WPF is Visual Studio 2017 Ready