Boas Enkler
Boas Enkler

Reputation: 12557

Sizeable Horizontal ItemsControl in WinRT

I want a Items Control which shows items in a horizontal alignment and it should stretch / size over the whole aviable horizontal space. Currently I have 7 Columns, but it would be possible that the amount may be dynamic.

First of all I used a stackpanel as items like this:

<ItemsControl.ItemsPanel>
    <ItemsPanelTemplate>
        <StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch"/>
    </ItemsPanelTemplate>
</ItemsControl.ItemsPanel>

This works for the horizontal alignment requirement. But, as the stackpanel does, it does not strecth. It always has the same size not regarding the aviable space of the device.

What Items.Panel should I use to achieve this?

Any advice?

many thanks in advance.

Upvotes: 1

Views: 373

Answers (1)

Filip Skakun
Filip Skakun

Reputation: 31724

You could try a UniformGrid. There is one in WinRT XAML Toolkit.

Upvotes: 2

Related Questions