Moving objects around interactively

I was playing around with Blend today, and decided that I wanted to write a function to allow my user to drag the shapes around on my artboard. Granted, this could use a bit of polish, since there are some tweaks that would make it a bit better, but the overall sense should work. For…

3

Calligraphy In Ink! (Part 2)

Ok, see this is what happens when I have some time to ‘play’ with Blend. My previous post showed how to modify the stylus tip to get something akin to a calligraphy pen. But, the pen that I got most recently got is called a scroll point. The tip itself looks like a fairly broad…

1

Calligraphy in Ink!

Ok, this is something I think is kinda cool… one of my side hobbies is calligraphy. I’ve been doing it since I was in early high school, and there’s something graceful in the old style of writing. Well, as far as I knew, an InkCanvas only allows either a single rectangle or ellipse tip, which…

1

Command line arguments

Ok, this was really bugging me… I needed to figure out how to create a Window application, and parse in the command line arguments. I know how to do it with a Console application, but not a Window app. So, how do you do it? Well, it’s a little tricky, but it can be done….

1

Creating an alternate layout panel

Ok, this is neat. This is the first time I’ve worked with layout panels and actually creating one of my own. Here’s the code: class OverlapStackPanel : StackPanel {       protected override Size ArrangeOverride(Size arrangeSize)       {             UIElementCollection children = this.InternalChildren;             int childrenResolved = 0;             foreach (UIElement child in children)             {…

0

Using a Timer

Ok, most C# developers can probably do this in their sleep, but I needed to hook up a timer that would do something every N milliseconds. And every time, I have to decide if I need a System.Threads.Timer or a System.Timers.Timer and so on. So… This is using the System.Threads.Timer class, since Timers had a lot…

1

Databinding to CLR Objects

I’m sure everyone else runs into these issues all the time, but every time I have to do this, I end up pulling up MSDN and looking all of this up. It’s not too efficient, so I’m going to drop a few points here for reference. First: Binding a basic type (String, Int, etc…) For…

3

Updating an Image control

I had a coworker as me how to update an Image control in code. Specifically, he wanted to create a quick file browser that had a Next and Previous button to scroll through a preset list of Images. Creating the list and iterating through directories is pretty easy, so I’ll omit that (Although, if someone…

2

Saving and retrieving Ink

Well, we had another Application Bash for Expression Interactive Designer this week, and my application did something I hadn’t messed with before. I wanted to work with ink in Expression, and specifically, I wanted to be able to mark up a picture, and save that markup alongside the picture to view later. It was actually…

1

Integer to Roman Numeral Value Converter

Databinding uses Value Converters to bind a value in one component’s “Language” to another. For instance, there’s a converter that converts a boolean to a “Visibility” in WPF. So, True is mapped to Visible, False is mapped to Hidden, etc… By using it, we can virtually databind any two elements together however we like. I…

1