TileList Data Binding - MVVM

10 posts, 0 answers
  1. Duncan
    Duncan avatar
    5 posts
    Member since:
    Sep 2013

    Posted 08 Oct 2013 Link to this post

    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 

     
  2. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 10 Oct 2013 Link to this post

    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 >>
  3. gaurav
    gaurav avatar
    12 posts
    Member since:
    Aug 2015

    Posted 13 May Link to this post

    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 

     

  4. Martin Ivanov
    Admin
    Martin Ivanov avatar
    2217 posts

    Posted 15 May Link to this post

    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.
  5. gaurav
    gaurav avatar
    12 posts
    Member since:
    Aug 2015

    Posted 15 May in reply to Martin Ivanov Link to this post

    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.

  6. Martin Ivanov
    Admin
    Martin Ivanov avatar
    2217 posts

    Posted 16 May Link to this post

    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.
  7. gaurav
    gaurav avatar
    12 posts
    Member since:
    Aug 2015

    Posted 20 May Link to this post

    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.

  8. Martin Ivanov
    Admin
    Martin Ivanov avatar
    2217 posts

    Posted 21 May Link to this post

    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.
  9. gaurav
    gaurav avatar
    12 posts
    Member since:
    Aug 2015

    Posted 22 May in reply to Martin Ivanov Link to this post

    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)

        

     

     

  10. Martin Ivanov
    Admin
    Martin Ivanov avatar
    2217 posts

    Posted 27 May Link to this post

    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.
Back to Top