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

Clicking on the bar gives strange behavior

1 Answer 96 Views
OutlookBar
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Veteran
Robert asked on 09 Sep 2020, 05:20 AM

Hi 

We have a radoutlookbar with some items in it When te user click on the minimize/restore-button ((1) in attached image)  it works perfect, the bar and all it content moves out and in. (see attached image). 

When user clicks on the "header" of the outlookbar ((2) in attached image) strange things happen. First click is most often than only the first  user control in the first item slides out, after that, sometimes the entire outlookbar is stuck half minimized and we have to restart the application. 

 

First of all, Im I doing something wrong in my xaml (below)? 

If not, is there any setting where I can make the rest of the outlookbar to minimiza/restore or could I catch the event and programmatically restore it? (We are using te MVVM approach) 

--xaml---------------------------------------

<telerik:RadOutlookBar DockPanel.Dock="Right" Width="600" IsVerticalResizerVisible="True" MinimizedButtonContent="Details" IsMinimized="True"  >
     <telerik:EventToCommandBehavior.EventBindings>
           <telerik:EventBinding EventName="SelectionChanged" Command="{Binding DrawerItemChangedCommand}" PassEventArgsToCommand="True"/>
           <telerik:EventBinding EventName="Restored" Command="{Binding ExpandCollapseDrawerCommand}" PassEventArgsToCommand="True"/>
           <telerik:EventBinding EventName="Minimized" Command="{Binding ExpandCollapseDrawerCommand}" PassEventArgsToCommand="True"/>
      </telerik:EventToCommandBehavior.EventBindings>
      <modelview:OneView DataContext="{Binding OneViewModel}"/>
      <telerik:RadOutlookBarItem Header="Another">
             <modelview:AnotherView DataContext="{Binding AnotherViewModel}" />
       </telerik:RadOutlookBarItem>
       <telerik:RadOutlookBarItem Header="LastViewIPromise">
                <moCompliance:LastView DataContext="{Binding LastViewModel}" />
        </telerik:RadOutlookBarItem>
</telerik:RadOutlookBar>

-------------------------------------------------

 

Thanks in advance, Robert

1 Answer, 1 is accepted

Sort by
0
Dilyan Traykov
Telerik team
answered on 10 Sep 2020, 02:31 PM

Hi Robert,

Thank you for the provided image and code snippet.

I tried replicating the behavior you described but the control works as expected at my end with the code you provided - do note that I've modified it a little to make it runnable. Clicking on the Details button when in minimized mode correctly shows the bound user controls in a popup as expected. Can you please have a look and let me know if I'm missing something of importance?

To answer your questions:

1) The only issue I see with the code you've provided is that the OneView is not wrapped in a RadOutlookBarItem. Is this on purpose?
2) You could handle the Minimized and/or Restored events of the control and see if they would work for you. Alternatively, you can set the IsMinimized property to control its state. Please also have a look at the other properties related to minimization to see if any of them would be useful to you.

Regards,
Dilyan Traykov
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive , special prizes and more, for FREE?! Register now for DevReach 2.0(20).

Tags
OutlookBar
Asked by
Robert
Top achievements
Rank 1
Veteran
Answers by
Dilyan Traykov
Telerik team
Share this question
or