Archive

Posts Tagged ‘WPF’

Toying a little.. Extending the WPF Text Element

November 13th, 2008 Elze No comments

I had a busy week where I was a lot from home I didn’t have access to my .NET Micro Framework devices so I toyed a little with the new 3.0 version and the Emulator. I have an idea to make something like the Philips Wakeup light. It should be easy to construct, it’s just an micro controller board, light dimmer and a light bulb. But that project lies a litte in the future. When i’m developing my simple projects one of the hard parts is always the UI design. I’m a web developer so I’m used to keep the UI as far away from the business logic as posible. Ofcourse this is not realy posible with the small .NET Micro Framework.

Being obligated to think about the user interface and build it I want to make an UI class with elements that are missing from the standard WPF library. Things that should be easy to implement are Up/Down control, Select list, Text edit, Buttons and Alert dialogs. Also focus shifting with the [Tab] key is something I realy mis.

Read more…

Categories: Just Blog'ing Tags: , ,

WPF, Delegates and Threads

November 8th, 2008 Elze 10 comments

Introduction:
When I started programming for the .NET Micro Framework one of the things that where a bit difficult to grab was how to update WPF UI elements (Like a text control) from a thread.

It has all to do with thread safety. Threads run (semi) simultainus and so there is the change that you access the same variable at the same time. When you have you’re own variables that you want make "Thread-Safe" you can use the lock statement (MSDN). When you’re developing for WPF you can use the Dispatcher and DispatcherTimer to  "Thread-Safe" access UI controls.

Read more…