08
Nov

Flip Clock

Post a comment » Popularity: 1%

A nice piece of clock control shared by Fons Sonnemans

Flip Clock

View Demo: New Window
08
Nov

WriteableBitmap Extensions: Drawing Shapes

Post a comment » Popularity: 1%

René Schulte extended his WriteableBitmap libraries whereas you can apply more drawing methods: DrawLine, DrawTriangle, DrawQuad, DrawRectangle, DrawPolyline, DrawEllipse, etc..

WriteableBitmap Extensions - Drawing Shapes

View Demo: New Window
06
Nov

Traffic Jam Game

Post a comment » Popularity: 1%

 Tess implemented an interesting game called “Traffic Jam”. You target is get your car out of the traffic jam.

Traffic Jam Game

View Demo: New Window
06
Nov

CodeFx – All in one package

3 Comments » Popularity: 1%

 CodeFx is an all in one package which contains a lot of useful source codes for different development platform. There are over 25 Silverlight samples inside which covered most of the basic techniques you probably don’t wanna miss.

CodeFx – All in one package

04
Nov

Animated Dotted Text Outlines

Post a comment » Popularity: 1%

An interesting animation effect created by  Charles Petzold. He attempted to convert the outline of a text into dotted lines and applied a simple animation.

Animated Dotted Text Outlines

View Demo: New Window
04
Nov

Embed rich font in title

Post a comment » Popularity: 1%

Sistr, which stand for SIFR (Shaun Inman Flash Replacement) for Microsoft Silverlight, is a rich font replacement technology without having to create multiple jpegs or other files.

All you have to do is just to embed the js files and create your rich font title with some simple js.

Embed rich font in title

Sample Usage:
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="jquery.sistr.js"></script>

$(document).ready(function() {
    $("h1").sistr({
        font: "Arial",
        size: 22,
        color: "#FFCC00"
    });
});
04
Nov

Countdown Badge

Post a comment » Popularity: 1%

 Josh Holmes created a very nice countdown badge control in which you are able to specific the target end date in the init parameters.

Countdown Badge

View Demo: New Window
04
Nov

Leaving some space for HTML header

Post a comment » Popularity: 1%

Silverlight works well by getting all the space of your browser. However, sometimes, you may want to leave some space (let say 60px) for your header in HTML format.

Here is any solution using JavaScript to allocate space for the Silverlight dynamically.

Leaving some space for HTML header

Leaving 60px on top of silverlight:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <style type="text/css">
      html, body { height: 100%; overflow: auto; }
      body { padding: 0; margin: 0; overflow:hidden; }
      #header{ height: 60px; }
      #silverlightControlHost { height: 100%; text-align:center; }
    </style>
    <script type="text/javascript" src="Silverlight.js"></script>
    <script type="text/javascript">
        var headerHeight = 60;
    function getWindowHeight() {
        var windowHeight = 0;
        if (typeof(window.innerHeight) == 'number') {
            windowHeight = window.innerHeight;
        }else{
            if (document.documentElement && document.documentElement.clientHeight) {
                windowHeight = document.documentElement.clientHeight;
            }else {
                if (document.body && document.body.clientHeight) {
                    windowHeight = document.body.clientHeight;
                }
            }
        }
        return windowHeight;
    }

    function updateSilverlightSize(){
        var windowHeight = getWindowHeight();
        document.getElementById('form1').style.height = (windowHeight - headerHeight)  + "px";
        document.getElementById('silverlightControlHost').style.height = (windowHeight - headerHeight) + "px";
    }
    </script>
</head>
<body onload="updateSilverlightSize();" onResize="updateSilverlightSize();">
    <div id="header">You header</div>
    <form id="form1" runat="server" style="height:100%">
        <div id="silverlightControlHost">
            <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
          <param name="source" value="silverlight.xap"/>
        </object><iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe>
    </div>
    </form>
</body>
</html>
02
Nov

Magnifying glass effect

Post a comment » Popularity: 1%
Jeff Prosise shared a reusable Magnifying Glass effect behavior. Click on the screen and you are able to magnify your view.

Magnifying glass effect

View Demo: New Window
02
Nov

Creating random globules

Post a comment » Popularity: 1%

Charles Petzold demonstrated the use of WriteableBitmap in drawing random globules (with random color) on the stage.

 Creating random globules

View Demo: New Window