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

TileList Data Binding - MVVM

9 Answers 84 Views
TileList
This is a migrated thread and some comments may be shown as answers.
Duncan
Top achievements
Rank 1
Duncan asked on 09 Oct 2013, 12:27 AM
I am looking to set the ItemsSource of the TileList to an ObservableCollection of object. One property of this object will respresent a SizeMode which I would like to see setup as a Setter to set the TileType property. I have created an IValueConverter to convert this INT size property to the Telerik TileType enum, and setup a binding for this, however it is looking for this property on my window ViewModel, not a property of each bound item.

In the online documentation this is achieved by implementing an AutoGeneratingTile event handler in the code behind.

Could you please provide an example of how this is achieved.

Thanks

Duncan 

 

9 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 10 Oct 2013, 10:28 AM
Hi Duncan,

Generally, there should be no problems to bind the TileType property. Check out the project attached for a reference.  

Regards,
Maya
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
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
gaurav
Top achievements
Rank 1
answered on 13 May 2019, 07:14 AM

Hello,

I want to  append tile in telerik.radtilelist after some interval of time in wpf.

so, I checked the documentation but there I couldn't find any relevant solution that I want. I am very new to telerik wpf.

I want to append the tile to tileview list after every some interval of time, so for this I need to bind the tiles to tilelist from backend(c#),

So, I am attaching the sample image as well.

 

TIA 

 

0
Martin Ivanov
Telerik team
answered on 15 May 2019, 11:53 AM
Hello TIA,

To achieve your requirement you can use a timer and on each tick, add a new item in the RadTileList Items or ItemsSource collection (based on your set up - data binding or no data binding). In WPF you can use the DispatcherTimer class.

I hope this helps.

Regards,
Martin Ivanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
gaurav
Top achievements
Rank 1
answered on 15 May 2019, 02:53 PM

Hey thanks for reply..

I already go through the link you shared... but I wonder how I bind label and buttons inside tile and how I can set there property at backend.

0
Martin Ivanov
Telerik team
answered on 16 May 2019, 06:53 AM
Hi TIA,

You can use the ItemTemplate property of RadTileList to define a DataTemplate and add the labels, buttons and whatever UI elements you want. Then you can bind properties from the tile view model in the template and update them when necessary. For example, on a timer tick. I've attached a small example showing this approach.

Regards,
Martin Ivanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
gaurav
Top achievements
Rank 1
answered on 20 May 2019, 04:33 PM

TIA 

 

How to restrict tile list to scroll horizontal and allow to scroll vertically.

 

Whenever I append any tile it scrolled horizontally but I need vertical like usual other lists do.

 

Please let me know if have any query.

0
Martin Ivanov
Telerik team
answered on 21 May 2019, 02:40 PM
Hello Gaurav,

The RadTileList is calculating its rows and columns based on the available space and the number of items. The layout panel that shows the tiles takes the width of the control into account when a scrolling should appear. In other words, more items means more columns.

A possible approach that you can try in order to achieve your requirement is to set the Height of the RadTileList control manually and wrap it into a ScrollViewer control which will be shown when there is not space. You can see this shown in the attached project.

Regards,
Martin Ivanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
gaurav
Top achievements
Rank 1
answered on 22 May 2019, 05:34 PM

Hey Thanks Martin,

I applied your suggestion, but unfortunately when I wrap my tilelist with scrollviewer  my tilelist doesn't show anything that area  become invisible.

here how I am wrapping the scrollviewer

<ScrollViewer>
        <telerik:RadTileList   Margin="919,0.2,10,173" Grid.Row="4" Height="400" Name="tileListForProduct" VerticalTilesAlignment="Center"  AutoGenerateTile="True"    >
        </telerik:RadTileList>
        </ScrollViewer>

 

I am attaching the screenshot ( output)

    

 

 

0
Martin Ivanov
Telerik team
answered on 27 May 2019, 10:25 AM
Hi Duncan,

I am afraid that I can't reproduce this on my side. This may happen because of the parent panel that holds the ScrollViewer, or because of a custom style targeting RadTileList or the Tile controls. Another thing that you can check is if the custom width calculation returns a positive size.

An alternative solution is to use RadTileView which allows defining number of columns and rows.

Regards,
Martin Ivanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
TileList
Asked by
Duncan
Top achievements
Rank 1
Answers by
Maya
Telerik team
gaurav
Top achievements
Rank 1
Martin Ivanov
Telerik team
Share this question
or