WPF Reflections:

December, 2007

December 21, 2007  2:57 PM


Mark Shurmer Profile: MarkWPF

Have you discovered InputBindings?

They allow you to specify a connection between an input device and a command. Examples of input devices are keyboard and mouse, and examples of commands being anything implemented with ICommand.

Therefore, you can add an InputBinding to take...

December 19, 2007  10:45 AM

Textbox with dynamic inlines

Mark Shurmer Profile: MarkWPF

Have you, like me recently, discovered that you need to create specialised textblocks and add them to an existing TextBlock? One example would be adding hyperlinks into a block of text. The TextBlock element has the Inlines property to allow you do that. You can add as many Inline derived...

December 13, 2007  4:46 PM

ListView views – part 1

Mark Shurmer Profile: MarkWPF

What seems to be forgotten about the ListView control in WPF, at least by some people, is that it's more than just a replacement for the DataGridView. The point behind it is that it separates the data from the way it is presented, so you can have the same data presented in different ways, ie...

December 12, 2007  3:14 PM

ListView – scrollbars gone?

Mark Shurmer Profile: MarkWPF

Have you ever lost the scrollbars in a ListView? What I mean is, there lots of rows in the ListView, but it's not displaying any scrollbar, even if you set the ScrollViewer.VerticalScrollBarVisibility property? An example of this is:

<StackPanel> <ListView...

December 11, 2007  12:37 PM

WPF and Silverlight

Mark Shurmer Profile: MarkWPF

Just how do WPF and Silverlight fit together, if indeed at all? Well, version 1.0 of Silverlight was released a little while, and to be honest left me cold. Support was lacking for LOB applications, and also developing the code behind in c# - therefore no great interest. Version 2.0 (aka 1.1...

December 7, 2007  11:30 AM

Template bindings

Mark Shurmer Profile: MarkWPF

If you want to, for example, to override a control template for a control in WPF, it is quite easy and very powerful.

One great thing is that you can specify a templatebinding instead of a (slightly) convoluted syntax to specify the property you are binding to. An example:

December 6, 2007  3:42 PM

Current item in binding

Mark Shurmer Profile: MarkWPF

The question i was faced with was how to bind to a current item in an array. Why? I wanted to display the result of the ToString() method on the whole object - it should display something like 'buy 100 abc.o @ 50' I had an array (of Equities, but it could have been anything), and some xaml...

December 3, 2007  11:40 AM

Attached events

Mark Shurmer Profile: MarkWPF

Firstly, what are they? I say they are custom events that you can place into the tree in WPF to add extra functionality without subclassing controls. The pure MSDN definition is: "An attached event allows you to attach a handler for a particular event to some child element rather than to the...

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: