ScatterViewItem Surface Background Not Transparent

I am working on Microsoft Surface and attach a round image object to a ScatterViewItem. I have a problem hiding the background of a square ScatterViewItem. If I go in and set the background to transparent, it’s not transparent, it looks more like gray translucent. So, in the end, I get a round image in the middle of sitting on a square with gray translucent edges. How to hide it? I am doing this programmatically through C #.

+4
source share
1 answer

What you see is not the svi background, but the shadow, which is part of the default template. If you want to get rid of the shadow, you need to redefine the control template.

So like this:

<s:ScatterView> <s:ScatterViewItem Background="Transparent"> <s:ScatterViewItem.Template> <ControlTemplate> <TextBlock>Hello World</TextBlock> </ControlTemplate> </s:ScatterViewItem.Template> </s:ScatterViewItem> </s:ScatterView> 

Keep in mind that if you replace it this way, you will lose all other small visual flashes, such as the pick up effect and flicker. If you want to save them, just use blend to edit a copy of the existing template and remove the shadow.

+3
source

All Articles