Geeks With Blogs
Nat Luengnaruemitchai Geek Blog WPF
WPF: Transform trigger into event
Yesterday, I had a problem where I need to hook up an event to a certain data condition. I first thought about EventTrigger. However, it does the other way around. This class is responsible for convert event into trigger. So I digged around WPF architecture to see what I can do and bingo. I found that I can create an attached property with the following construct and then in XAML, you can register for this event by <TextBox Text="Try me"> <TextBox.Style> <Style TargetType="{x:Type ......

Posted On Thursday, September 20, 2007 7:55 AM

Free WPF DataGrid from Infragistics
Andrew Flick announced that Infragistics WPF Express Edition will be free as well. Before this release, xamDataGrid suffered a lot of performance problem. It seems that they have fixed various performance problem. So I think I will give it a try again later. To try it out visit http://blogs.infragistics.com/blogs/andrew_flick/archive/2007/09/13/infragistics-netadvantage-for-wpf-express-aka-free-grid.aspx for more information.

Posted On Tuesday, September 18, 2007 9:25 PM

WPF ComboBox with LimitToList feature: Part I
Sometimes, you would like to get a combobox where a user can type. This can be done by turning on IsEditable property to true. However, it opens another can of worm, it means the user can type anything in the combobox even text that is not in the ItemsSource. To provide LimitToList feature, you can hook up an event to PreviewLostKeyboardFocus as follows: private void ComboBox_PreviewLostKeyboar... sender, KeyboardFocusChangedEventArgs e) { if (!e.Handled) { TextBox textBox = e.OldFocus ......

Posted On Tuesday, August 7, 2007 8:37 PM

WPF Nested Template Bug
I posted in MSDN Forum a while ago that I ran into a WPF bug that occurs when you put one template inside another template like <ListBox HorizontalContentAlignment=... VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="Honeydew" ItemsSource="{Binding}"> <ListBox.ItemTemplate> <DataTemplate> <ListBox ItemsSource="{Binding}"> <ListBox.ItemTemplate> <DataTemplate> <etc.............. </DataTemplate> </ListBox.ItemTemplate> </ListBox> ......

Posted On Sunday, July 29, 2007 8:17 AM

Copyright © Nat Luengnaruemitchai | Powered by: GeeksWithBlogs.net | Join free