Sorry I'm late to this conversation; I had an early Friday and a long
weekend.
Here's some useful debugging tips for XAML newbies:
. Use the filter ComboBox in the top left corner of Snoop to
"Show only visuals with binding errors". This is sometimes easier than
inspecting the Output window.
. Use a debug converter to debug XAML. This effectively does
nothing but let you set a breakpoint in a binding so that you can see if
its been triggered and inspect the value (and it's type)
public class DebugConverter : IValueConverter
{
#region IValueConverter Members
public object Convert(object value, Type targetType, object
parameter, System.Globalization.CultureInfo culture)
{
return value;
}
public object ConvertBack(object value, Type targetType, object
parameter, System.Globalization.CultureInfo culture)
{
return value;
}
#endregion
}
. Check out Bea Stilnitz's article on other debugging tips
(http://bea.stollnitz.com/blog/?p=52).
o This includes the debug converter, but it's so useful I thought I'd
mention it twice.
Carl.
Carl Scarlett
Senior .NET/WPF Developer, UX Designer | Genesis
IT & Change Management | Bankwest
A: Level 5, 199 Hay Street | Perth | Western Australia | 6004
P: (08) 9449 8451
M: 0408 913 870
E: [email protected]
AFR Smart Investor Blue Ribbon Awards
2010 Bank of the Year
From: [email protected] [mailto:[email protected]]
On Behalf Of Matt Evans <[email protected]>
Sent: Monday, 7 March 2011 7:02 AM
To: [email protected]
Subject: RE: Adding ListBoxItems to a listbox programmatically
Peter
I recommend using Snoop, you can use it to examine the visual tree, you
can drill down and see what the data contexts are set to, and it also
shows binding errors.
It's an invaluable tool for wpf development.
http://snoopwpf.codeplex.com/
Matt
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
_______________________________________________
ozwpf mailing list
[email protected]
http://prdlxvm0001.codify.net/mailman/listinfo/ozwpf
________________________________________________________________________
_______
This email has been scanned by the Bankwest Email Security System.
________________________________________________________________________
_______
_______________________________________________________________________________
Unencrypted electronic mail is not secure and may not be authentic.
If you have any doubts as to the contents please telephone to confirm.
This electronic transmission including any attachments is intended only
for those to whom it is addressed. It may contain copyright material or
information that is confidential, privileged or exempt from disclosure by law.
Any claim to privilege is not waived or lost by reason of mistaken transmission
of this information. If you are not the intended recipient you must not
distribute or copy this transmission and should please notify the sender.
Your costs for doing this will be reimbursed by the sender.
We do not accept liability in connection with computer virus, data corruption,
delay, interruption, unauthorised access or unauthorised amendment.
_______________________________________________________________________________
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
_____________________________________________________________________________________________________________________
ozwpf mailing list
[email protected]
http://prdlxvm0001.codify.net/mailman/listinfo/ozwpf