Archive for June, 2008

[Silverlight, C#] User Controls and Namespaces

In working with my user controls I started creating elements dynamically which were then moved back and forth from user control to user control depending on the actions the user was taking. I then ran into some naming problems: I had a function that would check for the existence of a name before I [...]

Continue reading » No comments

[C#, Silverlight] Access to Resources

A little background… I want to be able to load up a XAML element from a file that may or may not contain an animation associated with its resources, and then start the animation when I mouseover this newly created element.
Here is exactly what I *want* to do:

Load up a snippet of XAML code [read [...]

Continue reading » No comments

[C#] Custom User Control Constructors [No Arguments]

So I was playing around with the new custom user controls I created for my ProgressBar etc… and I noticed that when I was trying to inject them into another XAML page that is in my project that the intellisense wasn’t picking it up. It was like the control was not valid even though [...]

Continue reading » No comments

[Silverlight B2, C#] Custom User Controls "Overlap" in StackPanel…???

Ok, so I’m going to put money on the fact that I am doing something wrong… but I have no clue what. Here’s the run down:

I created a User Control for a ProgressBar

XAML consists of a Canvas, border Rectangle, fill Rectangle, and a TextBlock.
C# code simply allows for the “percentComplete” which will change the [...]

Continue reading » No comments

[Silverlight B2] No more "MouseLeftButtonDown" event on Button?

Whee! More problems!
I have been using the “MouseLeftButtonDown” event to register all of my events that may pertain to a click. I’ve been doing this in practice because some of my objects differentiate between clicking down and clicking up [like for drag/drop]… so I just always extended this into my other object’s event handlers… [...]

Continue reading » No comments

Converting from Silverlight Beta 1 to Beta 2

As usual, the transition from one beta to the next brings breaking changes… just going to list the ones I had here, and how I got around them:
SetValue Only Accepts the Correct Types (No Conversions)Before I was passing in Strings for colors when manually creating my xaml elements, or I was using strings for some [...]

Continue reading » No comments

Silverlight 2 Beta 2 is out!

Get it here.
1. Uninstall your old SDK and VS2008 toolkit.2. Install Beta 2 via the silverlight_chainer file.3. Checkout the Breaking changes from Beta 1 to Beta 2:Download: Beta 2 DocumentationorOnline: On MSDN
BAM

Continue reading » No comments

[C#] Creating Custom Attached Properties

I’d been looking into creating custom attached properties to xaml elements so that I could store relative information regarding our “Object Linking” that will need to be implemented in my project. The concept was a little muddled to me, and I came close to getting it working last Friday, I was just missing a [...]

Continue reading » No comments

[WPF] Preview vs. Non-Preview Events

So in my reading travels today I started looking up animations, which took me to triggers, which took me to event handling, and I then bumped into the concept of preview vs. non-preview events [the mind is a wonderful thing]. This is particularly interesting to me since I have been using event handling in [...]

Continue reading » No comments

[VS2008, Silverlight] "The project type is not supported by this installation"

So I spent the last 5 hours trying to get my VS2008 [which I had to do a re installation on] to recognize and open my silverlight projects. After uninstalling and reinstalling I was faced with the error message when trying to open my Silverlight project:
“The project type is not supported by this installation”
I figured [...]

Continue reading » No comments