RadUniformGrid?

2 posts, 0 answers
  1. Erik
    Erik avatar
    314 posts
    Member since:
    Feb 2008

    Posted 23 Feb 2012 Link to this post

    Hi,

    I'm having some xaml code which is using "RadUniformGrid" in a listbox.

    <ListBox x:Name="listBox1" Margin="5" HorizontalAlignment="Stretch" Height="600"
         ItemTemplate="{StaticResource AItemTemplate}" >
        <ListBox.ItemsPanel>
            <ItemsPanelTemplate>
                <telerik:RadUniformGrid Columns="3" HorizontalAlignment="Left" VerticalAlignment="Top" />
            </ItemsPanelTemplate>
        </ListBox.ItemsPanel>
    </ListBox>

    How can I make the columns auto fit the Width of the listbox? (taking in account a scrollbar)

    I can not find any in formation about RadUniformGrid.


    Regards,

    Erik
  2. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 28 Feb 2012 Link to this post

    Hello Erik,

    Actually RadUniformGrid is intended only for internal use in various controls (for example RadScheduler) - it is not an official product in our portfolio.

    In your case you can try setting VeritcalAlignment and HorizontalAlignment properties of the UniformGrid to "Stretch":

    <ListBox x:Name="listBox1" Margin="5" HorizontalAlignment="Stretch" Height="600">
        <ListBox.ItemsPanel>
            <ItemsPanelTemplate>
                <telerik:RadUniformGrid Columns="3" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
            </ItemsPanelTemplate>
        </ListBox.ItemsPanel>      
    </ListBox>

    Greetings,
    Yana
    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
Back to Top