0

I've got a question regarding the ScatterViewItem control in WPF surface.

I want to have an image in the control -- which I can do -- but I also want to have more controls in the same ScatterViewItem, like a delete button.

Now I am stuck on how to get multiple elements in a ScatterViewItem control. I tried a Canvas, but that didn't look quite right, since you cant play with the image like you can with the ScatterViewItem control.

Does anyone have ideas or code that can help me?

pnuts
  • 58,317
  • 11
  • 87
  • 139

1 Answers1

0

You can simply use any container, which can scale in size. I usually use the Grid container within the ScatterViewItem which allows me to have as many nested elements in the Grid as I wish.

The problem with the Canvas is that it can't automatically resize and because ScatterViewItems are designed for resizing and rotating this is not a great match.

XAML:

<s:ScatterView >    
    <Grid Width="Auto" Height="Auto">
        <s:SurfaceButton />
    </Grid>
</s:ScatterView>
bengro
  • 1,004
  • 10
  • 19