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

RadUniformGrid?

1 Answer 182 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Erik
Top achievements
Rank 2
Erik asked on 23 Feb 2012, 01:09 PM
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

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 28 Feb 2012, 10:44 AM
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 >>
Tags
General Discussions
Asked by
Erik
Top achievements
Rank 2
Answers by
Yana
Telerik team
Share this question
or