This is a migrated thread and some comments may be shown as answers.

requirement to change the image of the radbutton to different image on 'Hover' operation

0 Answers 60 Views
Buttons
This is a migrated thread and some comments may be shown as answers.
Srinivas
Top achievements
Rank 1
Srinivas asked on 20 Sep 2010, 04:25 PM


Hello Telerik,
I am developing a customcontrol for radbutton .


I have a requirement to change the image of the radbutton to different image on 'Hover' operation.

public

 

 

class TngButton : TngBaseTemplateControl

 

{

 


 

 

static TngButton()

 

{

DefaultStyleKeyProperty.OverrideMetadata(

 

typeof(TngButton), new FrameworkPropertyMetadata(typeof(TngButton)));

 

}

#endregion

 

 

public override void OnApplyTemplate()

 

{

 

 

base.OnApplyTemplate();

 

 

 

RadButton btn = this.Template.FindName("PART_BaseControl", this) as RadButton;

 

 

 

ContentPresenter content = this.Template.FindName("PART_ContentControl", this) as ContentPresenter;

 

 

 

btn.Hover+=new EventHandler<Telerik.Windows.RadRoutedEventArgs>(btn_Hover);

 

 

}

 

 

 

void btn_Hover(object sender, EventArgs e)

 

{

 

 

 

// code to change the image at the hover .

 

 

 

 

}


i want to have two properties like 'originalimage' and 'hoverimage" which can be changed on mover hover action
can you help me in how to setting the logic for this ?

regards,
Srinivas

No answers yet. Maybe you can help?

Tags
Buttons
Asked by
Srinivas
Top achievements
Rank 1
Share this question
or