Databind TileView and Border Height.

3 posts, 1 answers
  1. Nemo
    Nemo avatar
    12 posts
    Member since:
    Jul 2012

    Posted 06 Mar 2012 Link to this post

    I have a Popup with a Listbox, Button and RadTileView . The RadTileView's ItemSource is an ObservableCollection(Customers).  Is it possible to bind the Popup's Border Height with RadTileView item's count using IValueConverters? (for eg: when the TileView is empty,If Customers.Count==0, Height = 100, If Customers.Count<5, Height =150). Something like that. The popup Looks like this:

    <Popup>
                <Border>
                    <StackPanel x:Name="MainStackPanel" Orientation="Vertical">
                        <StackPanel x:Name="ListBoxStackPanel" Orientation="Horizontal" >
                            <ListBox/>
                            <Button/>
                        </StackPanel>
                        <telerik:RadTileView/>
                    </StackPanel>
                </Border>
     </Popup>
     
  2. Answer
    Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 09 Mar 2012 Link to this post

    Hi Nemo,

     I prepared a project for you where the TileView and the Popup are bound to a common MainViewModel and the Height of the Border is bound to the Number of Items in the ViewModel's Collection.
    Please let us know if this is what you need.

    Regards,
    Petar Mladenov
    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. DevCraft banner
  4. Nemo
    Nemo avatar
    12 posts
    Member since:
    Jul 2012

    Posted 09 Mar 2012 Link to this post

    Petar,

    Thank you so much. This is exactly I was looking for.

Back to Top