Home » Silverlight

In some situation, you may need to know if the mouse has hit a specific polygon drawn in a canvas. This can be easily done with Silverlight using the VisualTreeHelper. First of all, you need to have a listener to the mouse even. void myCanvas_MouseRightButtonDown(object sender, MouseButtonEventArgs e) { e.Handled = true; Point currentMousePosition...
Filed in: Silverlight
The event log file is full error This is what I was getting the day I had to install Silverlight 2 on a Visual Studio 2008 software. I have Visual Studio 2010 working with Silverlight 4 but this project is older and required to have a previous version of C# and Silverlight. I got told to install the Silverlight 2 Tool for Visual Studio 2008. This tool...
Filed in: Silverlight
Let say that you want to have your application in multiple language. In Asp.Net, the choice is obvious to go with resource file. Since I am coming from the web side, I did the same thing with Silverlight. Visual Studio Resource Editor In Silverlight, you can still use Resource File. They are available in the New Item dialog. How to add a Resource file...
Filed in: Silverlight
If you want to make glowing a shape with Silverlight without having to use Xaml it’s possible. At first, I thought it was impossible because I were using a third-party object that use their own type of Shape. After reading the property I figured out that the Effect property was exposed. This let us use System.Windows.Media.Effects. To make it...
Filed in: Silverlight
Silverlight can interact with the Javascript that reside in the page that this one is hold. We have seen in the Silverlight Communication post that it’s possible with the use of System.Windows.Browser.HtmlPage.Window.Invoke. Sometime, an exception can be thrown with the title “InvalidOperationException was unhandled by user code”....
Having your Silverlight application in multiple language is pretty the same as ASP.NET localization mechanism. The first step is to create a new Resources File for your default language (English is the default one). You will find the Resources File template in the “Add New Item” under General tab. Add a Resources File in Visual Studio 2010 Once...
Filed in: Silverlight
You may have some situation that you need to communicate with the page that your Silverlight reside. This can be done by three methods: Passing parameter to Silverlight Silverlight call a Javascript method of your page The Javascript call a Silverlight method Silverlight parameter All Silverlight application contain a startup method that has a StartupEventArgs....
Filed in: Silverlight
Sometime, when the application is deployed to IIS server you may still need to do some debugging. Debugging a Silverlight application is in fact very easy, and pretty much the same when you are working inside Visual Studio but change when you need to debug it on the server. The first step is to be sure that you .xap file deployed on IIS is the same...
The .Net Framework allow to clone ICloneable interface. This interface has a single method that is Clone. This interface is not available in Silverlight. The reason is that Microsoft have found that since it does not provide specification between deep copy or shallow copy that it was useless to port this interface into the Silverlight SDK. In fact,...
Filed in: C#, Silverlight
The Slider is a component that let you slide a small rectangle from one side to the other. You have to put a minimum value and a maximum value and from there, the user can select a value between these two values. Example of a Slider control One interesting thing to do is to rely on the business logic to handle all values of this control. This can be...
Filed in: Silverlight
wordpress themplates