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

DataBoundListBox, EmptyContent, EmptyContentTemplate not working ?

1 Answer 96 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.
David
Top achievements
Rank 1
David asked on 15 Nov 2013, 09:31 AM
Hi,

I have tried in many ways to get EmptyContent or EmptyContentTemplate working but nothing is working at all. Am I doind something wrong ? I have tried to set EmptyContentTemplate and also EmptyContent but nothing working :-(. UserClubs is an ObservableCollection (Set, and Cleared)

Here is my code :

<telerikPrimitives:RadDataBoundListBox
                        ItemsSource="{Binding UserClubs}"
                        EmptyContent="{Binding}"
                        ScrollViewer.HorizontalScrollBarVisibility="Auto"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled"
                        CacheMode="BitmapCache" x:Name="RadClubList">
                         
                        <telerikPrimitives:RadDataBoundListBox.EmptyContentTemplate>
                            <DataTemplate>
                                <Button Style="{StaticResource ButtonNoStyle}"
                                        Command="{Binding
                                        DataContext.GoToClubsCommand,
                                        ElementName=RadClubList}">
                                    <Image Source="/Assets/Images/Icons/fav-add-fill-icon-green.png"
                                           Stretch="Uniform"
                                           Height="128"
                                           />
                                </Button>
                            </DataTemplate>
                        </telerikPrimitives:RadDataBoundListBox.EmptyContentTemplate>
                         
                        <telerikPrimitives:RadDataBoundListBox.VirtualizationStrategyDefinition>
                            <telerikPrimitives:StackVirtualizationStrategyDefinition Orientation="Horizontal"/>
                        </telerikPrimitives:RadDataBoundListBox.VirtualizationStrategyDefinition>
                        <telerikPrimitives:RadDataBoundListBox.ItemAddedAnimation>
                            <telerikCore:RadMoveAnimation StartPoint="700,0" EndPoint="0,0" Duration="0:0:1">
                                <telerikCore:RadMoveAnimation.Easing>
                                    <CubicEase EasingMode="EaseOut"/>
                                </telerikCore:RadMoveAnimation.Easing>
                            </telerikCore:RadMoveAnimation>
                        </telerikPrimitives:RadDataBoundListBox.ItemAddedAnimation>
                        <telerikPrimitives:RadDataBoundListBox.ItemTemplate>
                            <DataTemplate>
                                <Button Style="{StaticResource ButtonNoStyle}"
                                        VerticalAlignment="Center"
                                        Command="{Binding
                                        DataContext.NavigateToClubNewsCommand,
                                        ElementName=RadClubList}"
                                        CommandParameter="{Binding}">
                                    <Image Stretch="Uniform" Width="90" Margin="6,0,18,0">
                                        <Image.Source>
                                            <BitmapImage UriSource="{Binding Image}" CreateOptions="BackgroundCreation" />
                                        </Image.Source>
                                    </Image>
                                </Button>
                            </DataTemplate>
                        </telerikPrimitives:RadDataBoundListBox.ItemTemplate>
                    </telerikPrimitives:RadDataBoundListBox>

Thanks for your help

1 Answer, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 15 Nov 2013, 04:23 PM
Hello David,

Thanks for writing.

Based on the XAML snippet itself I cannot exactly say why you don't get the expected results. Is it possible for you to open a new support ticket and attach your project so that we can inspect it thoroughly?

Thanks for your time.

Regards,
Deyan
Telerik
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
Tags
DataBoundListBox
Asked by
David
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Share this question
or