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

Strange behaviour of minimized Icons

2 Answers 114 Views
OutlookBar
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 15 Jul 2011, 09:47 AM
Edit: Title should be "Strange behaviour of minimized ITEMS" (not icons, but I can't change the Title)

Dear Support,

I'm just testing your controls because the Infragistics-Suite seems not to support MVVM in any way.
Your OutlookBar works great, but I have an issue/question about the "Caption/Header/Text" of minimizedItems.
Please take a look at following XAML
<telerik:RadOutlookBar QuickStart:ThemeAwareBackgroundBehavior.IsEnabled="True" telerik:Theming.Theme="Office_Blue" ItemsSource="{Binding OutlookEntries}" Height="234" HorizontalAlignment="Stretch" Margin="211,6,160,31" Name="RadOutlookBar1" VerticalAlignment="Stretch" Width="229">
                     
     <telerik:RadOutlookBar.Resources>
            <Style TargetType="{x:Type telerik:RadOutlookBarItem}">
                  <Setter Property="Header" Value="{Binding Header}"/>                         
                  <Setter Property="SmallIcon"  Value="{Binding SmallImage}"/>
                  <Setter Property="Title" Value="{Binding Header}"/>
                  <Setter Property="Icon" Value="{Binding LargeImage}"/>
              </Style>
        </telerik:RadOutlookBar.Resources>
</telerik:RadOutlookBar>

The Items are shown correctly. But if I'm using the slider in order to minimize the Items, the SmallIcon together with the ClassName will be shown at each "minimizedItem" in the outlookbar at the bottom. I don't understand why. 

I have seen your MVVM-Binding-Sample in which you used ItemMinimizedTemplate
<telerik:RadOutlookBar.ItemMinimizedTemplate>
    <DataTemplate>
        <StackPanel Orientation="Horizontal">
                 <TextBlock Text={Binding Header}/>                              
        </StackPanel>
    </DataTemplate>
</telerik:RadOutlookBar.ItemMinimizedTemplate>

I could use this DataTemplage and delete the TextBlock inside the StackPanel. Then only the Icon will be shown within minimized Items.
But it seems more clean for me with my code above, instead of retemplating ItemMinimizedTemplate, ItemTemplate, HeaderTemplate etc.  The OutlookBar is bound to a CollectionView calles "OutlookEntries" which contains  a simple Class with Strings as Header and ImageSources as Icons.

Any hints would be appreciated.

2 Answers, 1 is accepted

Sort by
0
John
Top achievements
Rank 1
answered on 18 Jul 2011, 07:25 AM
I think above text might be a bit difficult to understand, so please finde enclosed following screenshot:

http://www.bilder-hochladen.net/files/85t4-1u-fc49.png

As said, using an Empty DataTemplate for "ItemMinimizedTemplate"  does help, but I guess there might be a more elegant solution.

0
Petar Mladenov
Telerik team
answered on 20 Jul 2011, 02:58 PM
Hi John,

Your approach cannot be used because when minimized the RadOutlookBarItem transforms to MinimizedOutlookBarItem and your style cannot apply. We still think that using HeaderTemplate,Titletemplate ItemMinimizedTemplate is a very elegant MVVM solution that makes the customization of this control easier. 

Kind regards,
Petar Mladenov
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
OutlookBar
Asked by
John
Top achievements
Rank 1
Answers by
John
Top achievements
Rank 1
Petar Mladenov
Telerik team
Share this question
or