Custom cursors in Avalon

So, how do you create a custom cursor in Avalon? The most straightforward way is to reference it from a file, but there are also constructor overloads that a Stream argument and an IntPtr argument (in case you have a raw handle). MyWindow.Cursor = new Cursor(@”C:\WINDOWS\Cursors\stopwtch.ani”); What can you do with cursors? Well, a Cursor…

2

Some notes on Avalon TextBox properties

The Avalon TextBox is an interesting control. Its purpose in life is to edit a string, as opposed to the rich, formatted text editing capabilities of the RichTextBox. One aspect in which the difference can be clearly seen is in the type of objects that are used when programming each control – TextBox will use…

1

Assonant Announcement About Avalon Adorners Article

Henry has posted a sample on Adorners, showing how to create and use them, and how to leverage the power of Avalon styling to make them look good with a couple of XML lines. http://blogs.msdn.com/henryh/archive/2005/07/19/440854.aspx  

0

Finding matches in unsorted collections (or: how to find pairs of socks efficiently)

I was sorting through my clothes after taking them out of the drier today, and I realized that over time I’ve naturally come up with a strategy to optimize my work. The problem is as follows: given an unordered collection of elements (socks), find the pairs matched by a key (sock color / model). The…

3

Combining marks and interesting effects

I’m planning to blog about some of the challenges involved in creating a world-class text editor, but first I’d like to talk a bit about an interesting set of Unicode characters – combining marks.   These characters, like their name suggest, combine with others and modify their appearance. In this image, you can see my…

0

How many machines does it take to make a Microsoft employee happy?

It’s late, I’m sorry I can’t of anything more clever to play with ‘how many foo does it take for bar’-types of joke. Anyway, this was about machine setups. Typically we start out with three machines: there’s the “mail” machine, the “dev” machine and a “test” machine. The “mail” machine is the slow, stable one…

2

Table border and Avalon resources

So, do you want your table cell borders to be visible? Try the new and improved Resources, now available on all participating elements! Note that you can scope this at different levels – anywhere where Resources are available. <Window x:Class=”VancouverApp.Window1″ xmlns=”http://schemas.microsoft.com/winfx/avalon/2005″ xmlns:x=”http://schemas.microsoft.com/winfx/xaml/2005″ Text=”My Other Vancouver App” ><Window.Resources> <Style TargetType='{x:Type TableCell}’>  <Setter Property=’Background’ Value=’VerticalGradient SkyBlue LightBlue’ />  <Setter Property=’BorderBrush’ Value=’DarkBlue’ />  <Setter Property=’BorderThickness’…

0

Just some fun with Avalon

Did you know that the text editor in Avalon is currently implemented on the commanding architecture? Most of the keyboard stuff goes through commands – inserting text is a very interesting topic I’ll save for another post. Commands are typically exposed as entries on some class or another. In this case, we have commands on…

3

Hibernate is your friend

Last week I drove up to Vancouver to get a new visa. Lovely city. I staid in the downtown area, and was able to walk everywhere – which is a good thing, because finding a place to park is hard (although not impossible). There was a bit of waiting involved, and I made good use…

4

Did you know…? (using syntax in C#)

Most of the C# files I read are structured similarly to the following…   /*  * My fancy header du jour.  */   using System; using System.Data; using Other.Stuff;   namespace My.Namespace.Is.Better.Than.Yours {   // Code goes here. }   Personally, I’ve adopted the following convention. Note where the using statements were moved to.  …

3