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

inactive items fires SelectedIndex mutliple times

2 Answers 45 Views
OutlookBar
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 23 Dec 2014, 04:49 PM
I am using 2014.2.729.45 RadOutlookBar as a navigation tool in my wpf app.  there are 8 menu items.  I have set active items count = 5. and my selected index is bound to my view model.

If increase, via the app when running, my active items count to 8 (showing all options), and I click on ANY outlookBarItem, then the correct menu appears.

Interestingly, if I say keep the active items count to 5 and I have 3 items in the small bar across the bottom I get very strange behavior.  so my description let's say there is Item1 thru Item 8.

Item1 thru Item5 are showing
Item6 to Item8 are in the bottom bar, small icon section.

If I click on icon for Item6, the viewmodel registers Item6 clicked.
If I click on icon for Item7, the viewmodel registers Item7 clicked, and then Item6 click. - so item 6 appears
If I click on icon for Item8, the viewmodel registers Item8 clicked, and then Item7 click, then item6. - so item6 appears

so you can never get to item7 and item8 to show, unless you make all items active.


<telerik:RadOutlookBar Grid.Row="0"
                             Grid.Column="0"
                             VerticalContentAlignment="Center"
                             ActiveItemsCount="5"
                             Background="{StaticResource ColorUnityWhite}"
                             IsMinimizable="False"
                             IsVerticalResizerVisible="False"
                             MinimizedButtonContent="Menu"
                             MinimizedWidth="40"
                             SelectedIndex="{Binding CurrentMenuIndex,
                                                     Mode=TwoWay,
                                                     UpdateSourceTrigger=PropertyChanged}"
                             >

this what an Item looks like:

<!--  home  -->
            <telerik:RadOutlookBarItem Height="40"
                                      BorderBrush="{x:Null}"
                                      Header="Home"
                                      SmallIcon="/Ppdg.Unity.Client.UI;component/Assets/Images/homeVerySmall.gif"
                                      Visibility="{Binding Path=CanAccessHome,
                                                           Mode=OneWay,
                                                           Converter={StaticResource Bvc}}"
                                      >
                <telerik:RadOutlookBarItem.HeaderTemplate>
                    <DataTemplate>
                        <Grid>
                            <telerik:RadDockPanel>
                                <Image Width="32"
                                      Height="32"
                                      Source="/Ppdg.Unity.Client.UI;component/Assets/Images/homeMedium.gif"
                                      ToolTip="Home"
                                      telerik:RadDockPanel.Dock="Left"
                                      />
                                <TextBlock Margin="6 6 0 0"
                                          Style="{StaticResource MainMenuTextBlockStyle}"
                                          Text="Home"
                                          />
                            </telerik:RadDockPanel>
                        </Grid>
                    </DataTemplate>
                </telerik:RadOutlookBarItem.HeaderTemplate>
            </telerik:RadOutlookBarItem>

2 Answers, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 26 Dec 2014, 07:18 AM
Hello Robert,

I prepared a small project based on your code but I was not able to reproduce the issue. I attached the project so that you can try it on your side and see if the described behavior is reproducible. Can you please do this and let me know if I am missing something?

Also, it would be helpful if you can send over an isolated project with your implementation. This will allow me to test it on my side and investigate what is causing the issue.

Thank you for any help you can provide.

Regards,
Martin
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Robert
Top achievements
Rank 1
answered on 08 Jan 2015, 10:28 PM
thanks for the response. i figured out the problem.  i had numerous radoutookBarItems.  I had two of them at the bottom that were placeholders and did not have any content.  Never "noticed" or thought about it until reviewing your project as compared to mine.  The screen would show the first empty Item but not the second.

When i commented out all the placeholder items - including the RadoutlookBarItem tags, the outlookbar behaved correctly and all is well.

   thanks.

Tags
OutlookBar
Asked by
Robert
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Robert
Top achievements
Rank 1
Share this question
or