Alrighty, today is a learning day! On my local machine all of my Silverlight apps have been building fine, but for some reason today on our build machine [which is running the same IDE, SDK etc...] the build kept failing with the error:
The “ValidateXaml” task failed unexpectedly.
System.ArgumentNullException: Parameter “message” cannot be null.
[...]
[Silverlight 3, C#] “ValidateXaml” task failed unexpectedly… say what?
Category: Silverlight, c#, technical difficulties, testing[IE8, Javascript] Iframe not loading my web service src???
Category: javascript, technical difficultiesUnrelated to Silverlight, but related to my project… figured I’d post this since it took me a few hours to nail down.
I setup an iframe in my script, and then on page load [given some php variables] I create the iframe source.
Worked In FF, NOT in IE8:
var mySrc = "/myServer/myService/myAction/myVariable%withPercents%.asp"
var myFrame = document.getElementById("MyFrameId");
myFrame.src = mySrc;
Now [...]
[C#] Convert List to CSV
Category: c#
We can easily convert a List object into a CSV list via the string.Join function. The only catch is we need to convert the list to an array to use this functionality!
function GetCSV(List<string> myList)
{
return string.Join(",", myList.ToArray());
}
NOTE: This does not do any “escaping” of quotations in the list, further string manipulation may need [...]
[Silverlight 3, C#] Chart Control – Upgrade to Nov2009 toolkit
Category: Silverlight, c#One of our SL applications uses the Chart control provided by Microsoft in their toolkit, and if you are upgrading this from SL2 to SL3 there are some breaking changes that may occur. A few of these stumped me, so I thought I’d mention them here.
1. There was a root namespace from Microsoft.Windows.Controls.* namespace [...]
[Silverlight 3] Updating my test framework!
Category: Silverlight, testingAlrighty, so we finally bit the bullet and updated our dev environment to Silverlight 3, and so far it is nowhere near as bad as I have expected. The major breaking thing for me was actually my test framework [which uses the Silverlight Unit Test Framework], but a quick search turned up Jeff’s easy [...]
[Silverlight 2, C#] How to tell if a Storyboard is currently running?
Category: Silverlight, c#To do this you can check the current ClockState of the animation.
bool isRunning = (MyStoryboard.GetCurrentState() == ClockState.Active);
[C# 3.0+] Annonymous Types
Category: c#What Does it do?
Annonymous Types
var annon = new { name1 = var1, name2 = var2, … };
// or
obj annon = new { name1 = var1, name2 = var2, … };
// Example
obj results = new { OriginalRequest = myRequest, Data = foundData, Status = dataStatus };
// Now you can see results.Data!
Limitations
I had originally wanted to use [...]
[Javascript] Time, timers and time differences
Category: javascriptThis should be easy, and perhaps I’m making it harder then it should be… I’m used to using the DateTime object, which confuses me when I have to switch back to javascript.
Anyhoot… here is how I have created a pseudo-timer that will spit out the time difference in seconds from when the timer is started [...]
Lack of updates :(
Category: UncategorizedSorry for my lack of updates… I’ve been pulled off my Silverlight projects for the time and have been moved onto other tasks which involve jquery and Ext. Hopefully I’ll be back on C# track again soon!
[Silverlight 2, C#] Datagrid Not Sorting?
Category: Silverlight, c#So I’ve been playing around with Siverlight datagrids. I have an xml page stuffed with data which I read into a custom class I made to store an xml node and it’s properties… I then databind a List of myClass to the datagrid itemsource and everything works fine – sorting worked fine right out [...]
