OutlookBar MouseDown event behavior different depending on size

2 posts, 0 answers
  1. Brian Pratt
    Brian Pratt avatar
    28 posts
    Member since:
    Apr 2010

    Posted 25 Oct 2010 Link to this post

    I'm using MVVM, PRISM with an outlook bar as a Prism region.

    I have made a custom command that changes the main region when an OutlookBaritem is mouse down.  (think MS Outlook, when you click on the 'calendar' bar).  When the OutlookBarItems are bars, everything works fine, but when the application first starts, the outlook bars are minimized to buttons.  

    What I noticed:
    The mouse down event does not fire when the OutlookBarItem is minimized to a button instead of a bar.
    Is this normal behavior?  
    If so, this seems like illogical behavior.  A mouse down on a OutlookBarItem should fire regardless of it's display mode.  (I would assume that when minimized, a different template is used, with a button that has a click event instead of a UIElement that has a MouseDown event?)

  2. Tina Stancheva
    Tina Stancheva avatar
    3299 posts

    Posted 28 Oct 2010 Link to this post

    Hello Brian Pratt,

    This behavior is expected at the moment since the minimized items are of type MinimizedOutlookBarItem, which is different from the RadOutlookBarItem. Therefore a simplified approach towards similar scenario can be something similar to this:
    public MainPage()
        radOutlookBar.AddHandler(FrameworkElement.MouseLeftButtonDownEvent, new MouseButtonEventHandler(RadOutlookBarItem_MouseLeftButtonDown), true);
    private void RadOutlookBarItem_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        if ((e.OriginalSource as UIElement).ParentOfType<MinimizedOutlookBarItem>() != null || (e.OriginalSource as UIElement).ParentOfType<RadOutlookBarItem>() != null)

    I hope you can implement such an approach in your scenario. However, we will be working on the RadOutlookBar in the following months in order to allow the RadOutlookBarItems to access their corresponding  minimized items.

    Tina Stancheva
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top