 |
BOOK: WPF Programmer's Reference: Windows Presentation Foundation with C# 2010 and .NET 4
 | This is the forum to discuss the Wrox book WPF Programmer's Reference: Windows Presentation Foundation with C# 2010 and .NET 4 by ; ISBN: 9780470477229 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: WPF Programmer's Reference: Windows Presentation Foundation with C# 2010 and .NET 4 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|

May 23rd, 2010, 02:40 PM
|
Authorized User
|
|
Join Date: Apr 2006
Posts: 17
Thanks: 2
Thanked 0 Times in 0 Posts
|
|
Binding.ValidationRules namespace specification
Greetings,
I am getting "The tag 'Binding.ValidationRules' does not exist in XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentatio' error message. when I code a <Binding.ValidationRules> tag in my xaml for a TextBox. The VS 2010 help documentation indicates namespaces http://schemas.microsoft.com/winfx/2...l/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation. Visual Studio 2010 generated the first automatically. The help documentation is unclear to me, but I assume it means that both namespaces are required. If that is the case how do I code the second namespace and how do I refer to it in the Binding.ValidationRules tag?
Thanks!
__________________
Sam Stamport
|

May 28th, 2010, 11:00 AM
|
 |
Wrox Author
|
|
Join Date: Jan 2006
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts
|
|
Can you send me the program?
Hi Sam,
Sorry for the slow reply. I was hoping someone who had seen this before would jump in.
Offhand I don't know what's going on here. Can you send me a sample project? (RodStephens@ vb-helper.com) I'll take a look at it.
|

May 28th, 2010, 11:18 AM
|
Authorized User
|
|
Join Date: Apr 2006
Posts: 17
Thanks: 2
Thanked 0 Times in 0 Posts
|
|
Uh oh, I think I posted to the wrong forum. I'm writing C# not VB. Please excuse me.
__________________
Sam Stamport
|

May 28th, 2010, 12:44 PM
|
 |
Wrox Author
|
|
Join Date: Jan 2006
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts
|
|
C# or VB is okay
That's ok. The book uses C# in the text but the examples are available in C# or VB and I've written books for both. It could also be in the XAML code and have nothing to do with C# or VB.
So if you can send me an example I'll take a look at it.
Rod
|

May 28th, 2010, 01:11 PM
|
Authorized User
|
|
Join Date: Apr 2006
Posts: 17
Thanks: 2
Thanked 0 Times in 0 Posts
|
|
Thanks so much for you willingness to help.
I've made many, many modifications and lots and lots of trial and error since I made the original post. I do not have a program ready to share with you at this time.
Hopefully I'll figure this out. If not, I'll post again.
Thanks, again for your kind help.
__________________
Sam Stamport
|

May 28th, 2010, 02:38 PM
|
 |
Wrox Author
|
|
Join Date: Jan 2006
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts
|
|
No problem
No problem.
If you do figure it out, please post your solution so people can find it in case they have a similar problem.
|

May 28th, 2010, 04:05 PM
|
Authorized User
|
|
Join Date: Apr 2006
Posts: 17
Thanks: 2
Thanked 0 Times in 0 Posts
|
|
OK. Here's some code http://www.4shared.com/file/i5jqqW0_...mer_v_100.html. (Note: You do not need the 4shared Desktop to download from this link unless you want it.)
I am very new to WPF, but I don't understand why the ToolTip appears for my Alarm1TextBox, but the background does not turn red.
I'd appreciate some help.
__________________
Sam Stamport
|

May 28th, 2010, 04:28 PM
|
 |
Wrox Author
|
|
Join Date: Jan 2006
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts
|
|
Seems to work for me
Huh. It seems to work for me. When I type in the first text box, its background turns red and its tooltip changes to display an error message.
Which operating system are you using?
|

May 29th, 2010, 10:02 AM
|
Authorized User
|
|
Join Date: Apr 2006
Posts: 17
Thanks: 2
Thanked 0 Times in 0 Posts
|
|
I am using Windows 7. I compiled the program with .NET 4.0 using Visual Studio 2010.
Maybe I have a setting wrong in VS. When I ran it this morning (after having power-down my computer overnight) it worked as expected. As I was testing it yesterday I noticed that after making changes and running a build Debug/Start Without Debugging as well as Debug/Start Debugging appeared to run an old version of the compiled .exe rather than the latest version.
Got any ideas?
__________________
Sam Stamport
|

May 29th, 2010, 10:27 AM
|
 |
Wrox Author
|
|
Join Date: Jan 2006
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts
|
|
The only thing that comes to mind is that if there is a bug in the code so it won't run, Visual Studio asks if you want to run the last compiled version. If you say Yes, you get the older version without any changes that you have made lately. That's can be very confusing so you should always say No when it asks.
But if you just rebooted without making any new changes and it worked, that may not be it. I can't think of any other good reason it would do that.
You may just have to chalk it up to OS or VS flakiness.
|
|
 |
|