Wrox Programmer Forums
|
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
 
Old May 23rd, 2010, 02:40 PM
Authorized User
 
Join Date: Apr 2006
Posts: 17
Thanks: 2
Thanked 0 Times in 0 Posts
Default 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
 
Old May 28th, 2010, 11:00 AM
Rod Stephens's Avatar
Wrox Author
 
Join Date: Jan 2006
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts
Default 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.
__________________
Rod

Rod Stephens, Microsoft MVP

Essential Algorithms: A Practical Approach to Computer Algorithms

(Please post reviews at Amazon or wherever you shop!)
 
Old May 28th, 2010, 11:18 AM
Authorized User
 
Join Date: Apr 2006
Posts: 17
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Uh oh, I think I posted to the wrong forum. I'm writing C# not VB. Please excuse me.
__________________
Sam Stamport
 
Old May 28th, 2010, 12:44 PM
Rod Stephens's Avatar
Wrox Author
 
Join Date: Jan 2006
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts
Default 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
__________________
Rod

Rod Stephens, Microsoft MVP

Essential Algorithms: A Practical Approach to Computer Algorithms

(Please post reviews at Amazon or wherever you shop!)
 
Old May 28th, 2010, 01:11 PM
Authorized User
 
Join Date: Apr 2006
Posts: 17
Thanks: 2
Thanked 0 Times in 0 Posts
Default

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
 
Old May 28th, 2010, 02:38 PM
Rod Stephens's Avatar
Wrox Author
 
Join Date: Jan 2006
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts
Default 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.
__________________
Rod

Rod Stephens, Microsoft MVP

Essential Algorithms: A Practical Approach to Computer Algorithms

(Please post reviews at Amazon or wherever you shop!)
 
Old May 28th, 2010, 04:05 PM
Authorized User
 
Join Date: Apr 2006
Posts: 17
Thanks: 2
Thanked 0 Times in 0 Posts
Default

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
 
Old May 28th, 2010, 04:28 PM
Rod Stephens's Avatar
Wrox Author
 
Join Date: Jan 2006
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts
Default 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?
__________________
Rod

Rod Stephens, Microsoft MVP

Essential Algorithms: A Practical Approach to Computer Algorithms

(Please post reviews at Amazon or wherever you shop!)
 
Old May 29th, 2010, 10:02 AM
Authorized User
 
Join Date: Apr 2006
Posts: 17
Thanks: 2
Thanked 0 Times in 0 Posts
Default

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
 
Old May 29th, 2010, 10:27 AM
Rod Stephens's Avatar
Wrox Author
 
Join Date: Jan 2006
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts
Default

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.
__________________
Rod

Rod Stephens, Microsoft MVP

Essential Algorithms: A Practical Approach to Computer Algorithms

(Please post reviews at Amazon or wherever you shop!)





Similar Threads
Thread Thread Starter Forum Replies Last Post
error CS0234: The type or namespace name 'Xml' does not exist in the namespace 'Syste shailesh_kumar C# 2008 aka C# 3.0 8 August 20th, 2009 03:11 AM
Binding can't see BL method, even with Namespace rsearing ASP.NET 2.0 Basics 1 July 9th, 2007 08:26 AM
Computed Column Specification olisav ASP.NET 2.0 Basics 0 May 14th, 2007 04:00 PM
Invalid authorization specification rcatal01 JSP Basics 10 April 20th, 2005 09:02 AM
Bounce-path Specification pavanp .NET Web Services 0 February 1st, 2005 10:39 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.