Here I will post problems I and my colleagues met and solutions we found.

Saturday, October 20, 2007

GeometryModel3D, DrawingBrush and TextureCoordinates

I tried to use DrawingBrush for GeometryModel3D object.

First, I created very simple object (cube without one side) using simple Blue brush, and I could see it. But when I tried to use DrawingBrush, my object became invisible. Apparently, when DrawingBrush is used, TextureCoordinates property for MeshGeometry3D object have to have correct values, and cannot be empty.

Thursday, October 11, 2007

Timers

Experimenting with timers in WPF I found some interesting differences from Windows Forms.

  1. We cannot use timer from Windows.Forms namespace, which leaves us to Timer from System.Timers or System.Threading namespaces.
  2. Both these timers execute their events/delegates in separate thread, from ThreadPool, which means we cannot directly operate with controls now. Again this is opposite to Windows Forms timer.
  3. Timer from System.Timers object has SynchronizeObject property of ISynchronizeInvoke interface type. However, WPF controls do not support this interface so we cannot use it. Again, this is not the same as for Windows Forms.
  4. WPF controls do not have Invoke methods as Windows Forms controls.
  5. What we can and should use is Control.Dispatcher.Invoke method.

Friday, October 05, 2007

Books

Ok, I am in book reading mode.

1. WPF (Unleashed) by Adam Nathan.
Great book. The reason for this book being so good is the way it's organized. The "main course" of the book is the very well written guide to learn WPF without making it too complicated. And there are Notes and Tips that give you the direction where you should dig to know more. Highly recommend.

2. WCF (Unleashed) by Craig McMurtry.
I am struggling with this book. I am at the beginning of it and at this moment I still have determination to finish it. But it's hard. In opposite to WPF book where complex concepts explained simply, here simple concepts can be understood after reading paragraph two or three times. Disappointment, actually.

3. Expert C# 2005 Business Objects by Rockford Lhotka.
I am in chapter 2 yet, but I am in nirvana reading this book. The subject itself is very interesting to me. I am little bit obsessed with idea of "application frameworks". By this moment, I have no single point of disagreement with the book. And as WPF, the author really tries to explain his concepts and ideas in human language. Highly recommend.