I got a good book on WPF but I want some code examples of programming the system without using a alot of XAML markup. In particular I want a rundown of individual text controls and events.
So I want a website or a book, not a snotty comment 😛
Please note: stay on the topic! I am not criticizing the system. Thanks.
Glen, unfortunately for you WPF is not built to be used through code. Though you may do some things through code, it’s much harder to do so. WPF is built as data based, so to manipulate UI you need to manipulate data, not controls. It’s a complicated subject, but lets say that controls may or may not exist in runtime based on their current visibility on screen and other properties.
If you still want to experiment with this you can check out controls in System.Windows.Controls namespace. Once you need to create ControlTemplate or DataTemplate you can use FrameworkElementFactory.
For example of how complicated this can be you can take a look at this question. For that reason, MS suggests that even when you need to manipulate WPF through code, you should place XAML in a string and load it using XamlReader.Load() method (this suggestion is in Remarks section of FrameworkElementFactory documentation).