Sunday, August 02, 2009

SilverLight Organization Chart


There was an Organization Chart in the scope of one of the projects I’m managing, and it came to me the idea to make it in SilverLight the same way in http://svdemo02.ilog.com/SilverlightOrgChart/OrgChart.html


And here are the main points to make it out:

1. Working with Canvas
2. Drawing Lines and Boxes
3. Using ScrollViewer
4. Using Slider (for the scale)
5. Using SilverLight UserControls (the node element with the person information)
6. Reading data from XML files and web services
7. Some Calculations

And isA I’ll describe these main ideas in details during the coming days.

Update: for the source code go to http://silverorgchart.codeplex.com/

Clip a TextBlock in SilverLight

One of the things that you may need to do in SilverLight is to limit the display area of a TextBlock, and you can do that using the Clip property, there are two ways to do that.

1. From the XAML

<TextBlock x:Name="tbExtension" Width="130" Height="30" Foreground="Black" Canvas.Left="5">
<TextBlock.Clip>
<RectangleGeometry Rect="0, 0, 130, 30"/>
</TextBlock.Clip>
</TextBlock>

2. From the code behind

tbExtension.Clip = new RectangleGeometry() {
Rect = new Rect(0, 0, width, height)
};

How to Install and Use RTSP Simple Server

  How to Install and Use RTSP Simple Server   1.   Create a folder to store the app mkdir /etc/rtsp-server cd /etc/rtsp-server   2.  Downloa...