How to Maximize a certain tile window when loading?(Data was binded Dynamicly)

6 posts, 0 answers
  1. Xiver
    Xiver avatar
    13 posts
    Member since:
    Feb 2012

    Posted 08 Feb 2012 Link to this post

    I have a 4 tilewindows and because it was created dynamicly so I'm unable to change each tilewindows' tilestate. How can I do that?

    BTW I'm new to C# designing so if anyone knows how to do it, better come up with some examples, Thanks
  2. Zarko
    Admin
    Zarko avatar
    755 posts

    Posted 10 Feb 2012 Link to this post

    Hi,
    There are a couple of ways that you can manage the TileState of your items and it depends on your requirement which one you'll use. Just to be sure - what do you mean by "created dynamically" - do you create RadTileViewItems in code behind and add them to your RadTileView or you set a collection of business items as an ItemsSource of your RadTileView? If it's the first case - you can directly set the TileState when you create the item and if it's the second case (which I guess it is) you have a couple of possible solutions:
    - if you want to always have a MaximizedItem you can set the MaximizeMode property of the RadTileView to One and this way on loading the first item in your collection will automatically maximize.
    - if you want to be able to change the TileState of an item by a property in your business item you'll have to bind this property to the TileState property with a style binding. And here you have two choices - you can add a TileState property in your object or bind the TileState to any of your properties with a converter.
    I've attached a sample project that shows this cases so could you please examine it and if you have more questions don't hesitate to ask.

    All the best,
    Zarko
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Xiver
    Xiver avatar
    13 posts
    Member since:
    Feb 2012

    Posted 12 Feb 2012 Link to this post

    Thanks Admin, That really helps
  5. Xiver
    Xiver avatar
    13 posts
    Member since:
    Feb 2012

    Posted 13 Feb 2012 Link to this post

    actually, admin. it's the second case. I set a list of business items(Charts) as an ItemsSource of the RadTileView. So I can't set the tilestate of a certain tilewindow. Would you be kind enough to give an example on that?


  6. Zarko
    Admin
    Zarko avatar
    755 posts

    Posted 15 Feb 2012 Link to this post

    Hi,

     Could you please elaborate a little bit more what exactly is your case because with my previous post I attached a project(TileViewSample.zip) which have examples for both cases(there are 4 TileViews that show different ways to maximize an item)? It shows how to bind the TileState directly to a property of type TileViewItemState or to a property of any other type with a converter.
    We are looking forward to hearing from you.
    p.s. I've reattached the project in case there's something wrong with the previous link.

    Regards,
    Zarko
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  7. Xiver
    Xiver avatar
    13 posts
    Member since:
    Feb 2012

    Posted 23 Feb 2012 Link to this post

    I was thinking too much, problem solved, thank you
Back to Top
UI for WPF is Visual Studio 2017 Ready