Modifying Uniform Grid Layout

161 views Asked by At

I am currently using a Uniform Grid to show a number of custom controls.

I have my uniform grid set up with dynamic items like so

<ItemsControl ItemsSource="{Binding LISTOFOBJECTS}">
    <ItemsControl.ItemsPanel>
        <ItemsPanelTemplate>
            <UniformGrid Rows="1" />
        </ItemsPanelTemplate>
    </ItemsControl.ItemsPanel>
    ...
</ItemsControl>

With a custom control being used to represent the items.

This is working almost exactly as I want, however some of my controls depending on properties of the item have a maximum width set. This results in the control having large margins because of how Uniform grid works (its in the name really isn't it) is there a straightforward way to overide the layout of the uniform grid to give up this "margin space" to other items that do not have a max width set.

See Picture Below

Image For Clarity

0

There are 0 answers