Design Time Support for Data in Blend and Visual Studio 2010

by Shawn January 13, 2010 10:36

Tags: , , , ,

Development

How to make an AJAX call from inside Silverlight

by Shawn November 17, 2009 08:05

Here is a little snippet that will let you make a remote AJAX call from inside Silverlight - the only catch is that you will get a "security warning" dialog for making a crossdomain call

ScriptObjectCollection scriptCollection = HtmlPage.Document.GetElementsByTagName("head");
HtmlElement head = (HtmlElement)scriptCollection[0];

HtmlElement script = HtmlPage.Document.GetElementById("dataAccess_js");
if (script == null)
{
	script = HtmlPage.Document.CreateElement("script");
	script.SetAttribute("type", "text/javascript");
	script.Id = "dataAccess_js";

	StringBuilder sbScript = new StringBuilder();

	sbScript.AppendLine("function createXMLHttpRequest() { var httprequest = false; if (window.XMLHttpRequest) { httprequest = new XMLHttpRequest(); if (httprequest.overrideMimeType) httprequest.overrideMimeType(\"text/xml\"); } else if (window.ActiveXObject) {  try { httprequest = new ActiveXObject(\"Msxml2.XMLHTTP\"); } catch (e) { try { httprequest = new ActiveXObject(\"Microsoft.XMLHTTP\"); } catch (e) { } } } return httprequest; }");
	sbScript.AppendLine("function retrieveContent(url) { var request = createXMLHttpRequest(); request.open(\"GET\", url, false); request.send(null); if (request.status == 200) { var text = request.responseText; return text; } else { alert(\"Error loading \" + url); } }");

	script.SetProperty("text", sbScript);

	head.AppendChild(script);
}

var result = HtmlPage.Window.Invoke("retrieveContent", sURL);

Tags:

Scripting

Generic Databinding with Silverlight

by Shawn June 01, 2009 10:22

This is one of those missing features that really makes you ask "what are they thinking" -- complex business systems that allow for on the fly customizations (something that is very common today) need to be able to be handled in Silverlight.

So if you are running into this and not sure how to proceed, here are some links that you might find useful

http://silverlight.net/forums/t/16733.aspx
http://silverlight.net/forums/t/63057.aspx
http://silverlight.net/forums/t/11570.aspx

http://silverlight.codeplex.com/WorkItem/View.aspx?WorkItemId=2810

Tags: ,

Development

Creating and Handling Faults in Silverlight

by Shawn April 28, 2009 10:52

Tags: , ,

Development

A fantastic example of what Silverlight 3 can do

by Shawn April 16, 2009 07:06

I highly encoruage everyone to check out Mike Harsh's sample application Slidentiy.  It does a great job of showing what is possible with Silverlight and best of all it comes with the source code in by C# and VB.NET

 http://silverlight.net/learn/appcorner/slidentity.aspx?pt=slidentity

Tags:

Development

Silverlight Crossdomain Access Workarounds

by Shawn March 24, 2009 10:04

Here is a great article discussing the issues and workarounds in Silverlight when you need to access data from a site that does not have a crossdomain or clientaccesspolicy xml file.

http://weblogs.asp.net/jgalloway/archive/2008/12/12/silverlight-crossdomain-access-workarounds.aspx

Tags:

Development

Scott H talking about live databinding in Silverlight

by Shawn March 03, 2009 09:58

Tags:

Development

A great article on some of the new free silverlight controls

by Shawn March 03, 2009 09:57

Tags:

Development

Xamal Power Toys

by Shawn March 03, 2009 09:56

Lately I have been doing a bunch of Silverlight work and in my wanderings I ran across these tool and thought I would share the wealth :)

 http://karlshifflett.wordpress.com/xaml-power-toys/

Tags:

Development

A starting point for Sharepoint and SilverLight

by Shawn February 04, 2009 14:00
Here is an article on getting started with SilverLight in SharePoint

Tags: ,

Development

Powered by BlogEngine.NET 1.6.1.0
Theme by Mads Kristensen | Modified by Mooglegiant