Silverlight 3 Pixel Shader Effects

Silverlight 3 has given us some cool effects such as drop shadows and motion blur, these are available through the new Pixel Shader Effect property and are very easy to use.

Some Silverlight 3 Effects


We can achieve these effects in XAML with no C# required, here we show you some examples of using Drop Shadows and Motion Blur:

<UserControl x:Class="Effects.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Width="600" Height="300">
    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <StackPanel Margin="8" Grid.Column="0">
            <TextBlock Text="A Drop Shadow!" FontSize="20">
                <TextBlock.Effect>
                    <DropShadowEffect />
                </TextBlock.Effect>
            </TextBlock>
            <TextBlock Text="A Slight Drop Shadow!" FontSize="20">
                <TextBlock.Effect>
                    <DropShadowEffect ShadowDepth="2" />
                </TextBlock.Effect>
            </TextBlock>
            <TextBlock Text="Blur Effect!" FontSize="20">
                <TextBlock.Effect>
                    <BlurEffect />
                </TextBlock.Effect>
            </TextBlock>

        </StackPanel>
        <StackPanel Margin="8" Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Top">
            <Rectangle Width="100" Height="100" Fill="Red">
                <Rectangle.Effect>
                    <DropShadowEffect ShadowDepth="2" />
                </Rectangle.Effect>
            </Rectangle>
            <Ellipse Height="100" Width="100" Fill="Yellow" Margin="10 0 0 0">
                <Ellipse.Effect>
                    <DropShadowEffect ShadowDepth="2" />
                </Ellipse.Effect>
            </Ellipse>
        </StackPanel>
    </Grid>
</UserControl>


If anybody has had the chance to play with Pixel Shaders in XNA or Direct X you will be pleased to know the Silverlight 3 Pixel Shaders are just as powerful and customizable.

 
 
Latest Games
Zombie Escape
Apr 19, 2016
Plays: 2,799

Zombie Escape ScreenshotDrive fast before the crazy mutant zombies get you!

6 Ratings/4.1 Average
Car Parking
Jan 16, 2016
Plays: 2,667

Car Parking ScreenshotGuide the car to its parking space in this fun Car Parking game.

1 Rating/5 Average
Trash It
Jan 11, 2016
Plays: 2,509

Trash It ScreenshotAim for the Trash Can and get the various items of Trash in the bin.

4 Ratings/5 Average
Sky Fly
Jan 11, 2016
Plays: 2,713

Sky Fly ScreenshotFly your plane in this colorful vertical scrolling shoot-em-up. Blast the bad guys and collect any bonus's they leave behind.

1 Rating/5 Average
Professor Snappy
Jan 11, 2016
Plays: 2,175

Professor Snappy ScreenshotPop as many bubbles as possible in this fun and colorful bubble popping game. The levels start off easy enough but gradually get harder!

1 Rating/5 Average
Monster Match Saga
Jan 10, 2016
Plays: 2,502

Monster Match Saga ScreenshotHere we have a bunch of monsters that need to be matched up. Look out for the bomb and spinning monsters that will cause special damage!

3 Ratings/4.6 Average
Fly Bird Fly
Jan 10, 2016
Plays: 2,324

Fly Bird Fly ScreenshotGuide your friendly Bird through the maze of pipes and other obstacles collecting the Stars in this cool arcade game inspired by the legendary Flappy Bird.

1 Rating/5 Average
Life In One
Jan 10, 2016
Plays: 2,499

Life In One ScreenshotYou are stranded on an Alien planet. Your goal is to build a space rocket and escape. Start by building units to create power and mine the metal patches. Build defenses to defend your base from the advancing Aliens and Zombies!

2 Ratings/3 Average
X Pool
Jan 02, 2016
Plays: 3,142

X Pool ScreenshotPlay Pool against the computer or battle against your friends in the online mode!

3 Ratings/3 Average
Fruit Slicer
Jan 02, 2016
Plays: 2,211

Fruit Slicer ScreenshotSlice the fruit that is thrown up onto the screen. Slice the fruit into multiple pieces for maximum points!

1 Rating/5 Average