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

MinHeight, Horizontal layout, Height of RDBLB

5 Answers 60 Views
DataBoundListBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Alex
Top achievements
Rank 1
Alex asked on 13 Aug 2013, 06:51 AM
Hey!
I found out when using RDBLB in horizontal mode, it's MinHeight is set to 100 somewhere, so you can't easily have smaller  than 100 units.

<telerikPrimitives:RadDataBoundListBox ItemsSource="{Binding }" 
                                      EmptyContentDisplayMode="DataSourceEmpty"
                                      EmptyContentTemplate="{StaticResource DefaultEmptyContentTemplate}"
                                      ItemLoadingTemplate="{StaticResource EmptyDataTemplate}"
                                      ItemTemplate="{StaticResource ItemTemplate}"
                                      Margin="0" Background="White">
          <telerikPrimitives:RadDataBoundListBox.VirtualizationStrategyDefinition>
              <telerikPrimitives:StackVirtualizationStrategyDefinition Orientation="Horizontal"/>
          </telerikPrimitives:RadDataBoundListBox.VirtualizationStrategyDefinition>
          <telerikPrimitives:RadDataBoundListBox.ItemAddedAnimation>
              <telerik:RadFadeAnimation StartOpacity="0" EndOpacity="1" Duration="0:0:1"/>
          </telerikPrimitives:RadDataBoundListBox.ItemAddedAnimation>
      </telerikPrimitives:RadDataBoundListBox>
 
What I see in runtime is that my items are 80 units high, and the control is 100 units high.
XamlSpy shows following: MinHeight is set to 100 units. (see attached image).

Setting MinHeight to lower value makes control high of this value, even if items are taller.

Please advice

5 Answers, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 15 Aug 2013, 08:30 AM
Hi Alex,

Thanks for writing and for reporting this.

Indeed, RadDataBoundListBox has its MinHeight and MinWidth properties initialized by its default Style. We will revisit this but we need some further details on your scenario so that we can make sure we handle the case correctly:

1. Do you want to have your DataBoundListBox autosized based on the items' size even if their size is smaller than 100?

2. Is clearing the style acquired values of the MinWidth and MinHeight properties resolving this limitations?

3. Can you please send us a sample project that reproduces your scenario so that we debug the case and see how we need to update the behavior of the control to better handle the scenario?

Regards,
Deyan
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINDOWS PHONE 7.
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 >>
0
Alex
Top achievements
Rank 1
answered on 19 Aug 2013, 10:19 AM
1. Yes. I want it to take height which fits all items
2. Making MinHeight=0 makes control be of height=0. Very strange to me.
3. Item template is following

   <Button c:TiltEffect.IsTiltEnabled="True" Command="{Binding ShowItemCommand, Source={StaticResource V}}" CommandParameter="{Binding}" Margin="0"
                           d:DataContext="{d:DesignInstance services:Item1}" HorizontalAlignment="Center" VerticalAlignment="Center">
            <Button.Template>
                <ControlTemplate>
                    <Border Background="White" HorizontalAlignment="Left" VerticalAlignment="Top">
                        <Image Source="{Binding LogoUrl}" VerticalAlignment="Top" HorizontalAlignment="Center" Stretch="None" Margin="0"/>
                    </Border>
                </ControlTemplate>
            </Button.Template>
        </Button>
0
Deyan
Telerik team
answered on 22 Aug 2013, 02:53 PM
Hello Alex,

Can you please try clearing the local value of the MinHeight property:

this.radListBox.ClearValue(RadDataBoundListBox.MinHeightProperty);

Does this work for you?

Regards,
Deyan
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINDOWS PHONE 7.
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 >>
0
Alex
Top achievements
Rank 1
answered on 26 Aug 2013, 07:32 AM
Well, the xaml is inside default control style (themes/generic.xaml) and it's not that easy to clear the height.
For now I decided to go with fixed width.

Next time I see the issue I'll try your workaround.

Thank you
0
Deyan
Telerik team
answered on 26 Aug 2013, 08:10 AM
Hi Alex,

You can just extract the style in Blend or Visual Studio and remove these settings.

We will make sure to review this portion of the style anyway.

We will consider this thread closed for now. Feel free to get back to us anytime you need further assistance.

Regards,
Deyan
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINDOWS PHONE 7.
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
DataBoundListBox
Asked by
Alex
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Alex
Top achievements
Rank 1
Share this question
or