Archive for Silverlight

[Silverlight 2, C#] How to tell if a Storyboard is currently running?

Tags: ,

To do this you can check the current ClockState of the animation.

bool isRunning = (MyStoryboard.GetCurrentState() == ClockState.Active);

Continue reading » 2 Comments

[Silverlight 2, C#] Datagrid Not Sorting?

Tags: , , ,

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 [...]

Continue reading » 1 Comment

[Silverlight 2] Great FAQ Page

Tags:

I just bumped into this FAQ page on the Silverlight forums and I think it is an excellent read to become familiarized with some of the most common pitfalls people encounter when coding with Silverlight.
Silverlight.net FAQ Page
[This link posted 6/4/2009 and may change in the future. At time of posting this was based on [...]

Continue reading » No comments

[Silverlight 2, C#] Writing to and Reading from an IsoStorage File at the Same Time!

Tags:

As I’ve mentioned in past posts, I have augmented the Silverlight Unit Test Framework to log errors it finds into a file in IsoStorage. This file is then read by a python script and results are sent via email if need be.
I ran into a problem today where my python script was [...]

Continue reading » 2 Comments

[Silverlight 2, C#] Implementing an Observable Collection [on a custom class]

Tags: ,

In order to improve some performance issues we were having, I needed to make a custom class that we were using become observable so that when we changed an item in the class the datagrid that the class was bound to would update automatically.
The datasource we were using was a custom class of ours, so [...]

Continue reading » 3 Comments

[Silverlight 2, C#] Creating Custom Events

Tags:

I’d just like to say, that figuring out how to create custom events has completely opened my eyes. For awhile I was struggling with having multiple classes that seemed to need information from each other, but something seemed wrong with having to keep [or pass in reference to] the “other” class.
Enter events… by creating [...]

Continue reading » 3 Comments

[Silverlight 2, C#] Animating a GridLength

Tags: , ,

It’s been awhile I’m afraid and my topics to post on have been piling up!  My work hard drive crashed on me and I’ve spent a lot of time just getting things back up to speed.  Anyhoot… feels good to be back.
This last timebox at work I shifted onto a different project – but still [...]

Continue reading » No comments

[Silverlight 2] Chart Builder

Tags: ,

Today is the day of posting about handy code generators! Here’s one more to add to the list: ChartBuilder
This site will generate the code needed to create a Silverlight Chart element [which can be found in the System.Windows.Controls.DataVisualization [Charting] library].
Purdy!
See here for a Charting overview if you haven’t seen this toolkit item yet.

Continue reading » No comments

[Silverlight 2] Dependency Property Generator

Tags:

I bumped into this handy little code generator which will create code for setting up a Dependency Property written by Kirupa Chinnathambi: Dependency Property Generator
Creating a custom Dependency Property requires specific setup steps, so this little generator could be useful

Continue reading » No comments

[Silverlight 2, C#] Invoke a function after [blah] seconds

Tags: ,

First of all I would like to say that I love delegate functions. Madly and deeply. Alright, let me proceed…
Today, one of my tasks was to simulate random requests to our web services so that one of our user controls could be changed to be able to handle a situation where one request [...]

Continue reading » No comments