WPF/Silverlight vs. Jupiter Quirks – Opacity

Have you noticed the difference in how the Opacity property is handled by child elements the Windows 8 XAML vs. Silverlight or WPF?

Silverlight/WPF:

Windows 8 XAML (Jupiter):

I suppose it might help performance, but it’s annoying. Do you know why it’s annoying? Try to fade in a piece of UI with a few opaque layers and instead of seeing the entire piece fade in – you suddenly start seeing all its layers. Be careful about images overlaid on top of solid backgrounds! Any idea how to achieve the same result in Jupiter as in Silverlight?

This is the code I used in tests on all 3 platforms:

<Grid
        Background="Black">
        <Grid
            Opacity="0.5"
            Width="600"
            Height="600"
            VerticalAlignment="Top"
            HorizontalAlignment="Left"
            Margin="100">
            <Rectangle
                Margin="0"
                HorizontalAlignment="Left"
                VerticalAlignment="Top"
                Width="400"
                Height="400"
                Fill="Red" />
            <Rectangle
                Margin="100,100,0,0"
                HorizontalAlignment="Left"
                VerticalAlignment="Top"
                Width="400"
                Height="400"
                Fill="Green" />
            <Rectangle
                Margin="200,200,0,0"
                HorizontalAlignment="Left"
                VerticalAlignment="Top"
                Width="400"
                Height="400"
                Fill="Blue" />
        </Grid>
    </Grid>
Advertisements
Tagged , , , , ,

One thought on “WPF/Silverlight vs. Jupiter Quirks – Opacity

  1. […] Read original post by Filip Skakun at Xyzzer's Dev Blog […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: