Tuesday, May 17, 2011

Writing into Visual Studio Output Window. Part 2


In Part 1 we set up OutputWindowWriter class which performs writing to the Visual Studio output window. What else can we add here?
It would be great if everything worked fine from the first attempt, but this not always happens, especially when dialing with someone’s else code. In our situation we have problem - when output window is initially hidden (by auto hide option at the top right corner of the window next to the cross) and we are writing something there we may get something like this
image

Sunday, May 1, 2011

Selecting first item in WPF ListView and keyboard navigation

I have been playing with WPF ListView recently and I’ve met its following not quite
comfortable behavior – when ListView is focused and I’m trying to navigate inside it using keyboard (in my case it was down arrow) I had to press down key twice to move to the second item and then once for each next item. My goal was to fix that twice pressing (and also enable correct navigation when some other item is selected, not the first one). I thought that it can be archieved by some simple property like SelectedIndex, but despite setting it to necessary value it still didn’t work.