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

AddHandler Event for Outlookbaritem

1 Answer 10 Views
OutlookBar
This is a migrated thread and some comments may be shown as answers.
Manikandan
Top achievements
Rank 1
Manikandan asked on 01 Aug 2013, 02:13 PM
Hi Telerik Team,

When applied on Outlookbar, the AddHandler event is raised.

But when i wire it for the outlookbaritem, it is not raised. why?

Thanks
Manikandan

1 Answer, 1 is accepted

Sort by
0
Pavel R. Pavlov
Telerik team
answered on 05 Aug 2013, 03:49 PM
Hi Manikandan,

I am not sure which event you need to subscribe to. However, it is most likely that the RadOutlookBarItem handles that event and this is why you can not catch it in you handler. However, if you try to listen for the already handled events you will be able to hear it.

Lets say that you need to subscribe to the MouseLeftButtonDown event of the RadOutlookBarItem with x:Name="testItem". This event is internally handled and if you try to subscribe to it in XAML with the default event handler, your handler will not be invoked. This is why you need to subscribe in code like this:
public MainPage()
{
    InitializeComponent();
    this.testitem.AddHandler ( RadOutlookBarItem.MouseLeftButtonDownEvent, new MouseButtonEventHandler ( OnMouseDown ), true );
}
 
private void OnMouseDown(object sender, MouseButtonEventArgs e)
{
}
Please give this approach a try and let me know if it works for you.

Regards,
Pavel R. Pavlov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
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 >>
Tags
OutlookBar
Asked by
Manikandan
Top achievements
Rank 1
Answers by
Pavel R. Pavlov
Telerik team
Share this question
or