Click here to Skip to main content
15,900,724 members
Home / Discussions / WPF
   

WPF

 
QuestionSimple Textbox validation Pin
Aslesh26-Sep-08 5:27
Aslesh26-Sep-08 5:27 
AnswerRe: Simple Textbox validation Pin
Pete O'Hanlon26-Sep-08 8:18
mvePete O'Hanlon26-Sep-08 8:18 
GeneralRe: Simple Textbox validation Pin
Aslesh26-Sep-08 9:57
Aslesh26-Sep-08 9:57 
GeneralRe: Simple Textbox validation Pin
Pete O'Hanlon26-Sep-08 10:14
mvePete O'Hanlon26-Sep-08 10:14 
GeneralRe: Simple Textbox validation Pin
Aslesh26-Sep-08 10:25
Aslesh26-Sep-08 10:25 
GeneralRe: Simple Textbox validation Pin
Pete O'Hanlon26-Sep-08 10:40
mvePete O'Hanlon26-Sep-08 10:40 
GeneralRe: Simple Textbox validation Pin
Aslesh26-Sep-08 11:18
Aslesh26-Sep-08 11:18 
GeneralRe: Simple Textbox validation Pin
Pete O'Hanlon26-Sep-08 23:28
mvePete O'Hanlon26-Sep-08 23:28 
The reason you are getting this error is because you haven't specified valid XAML code. Basically, you want to change your XAML so that you are binding your textbox to something, and set your validation rule on it like so:
<TextBox>
    <Binding Path="Name">
        <Binding.ValidationRules>
            <local:MatchRule MatchText="Hello" />
        </Binding.ValidationRules>
    </Binding>
</TextBox>
Take a look at this[^] article for a detailed example.

Deja View - the feeling that you've seen this post before.

My blog | My articles | MoXAML PowerToys



AnswerRe: Simple Textbox validation Pin
Wes Aday26-Sep-08 9:26
professionalWes Aday26-Sep-08 9:26 
QuestionHow to handle TabControl's Tab Index changing in WPF ? Pin
Mohammad Dayyan25-Sep-08 13:39
Mohammad Dayyan25-Sep-08 13:39 
AnswerRe: How to handle TabControl's Tab Index changing in WPF ? Pin
User 27100925-Sep-08 15:15
User 27100925-Sep-08 15:15 
GeneralSelected Tab index? Pin
Mohammad Dayyan25-Sep-08 15:27
Mohammad Dayyan25-Sep-08 15:27 
GeneralRe: Selected Tab index? Pin
User 27100925-Sep-08 15:30
User 27100925-Sep-08 15:30 
GeneralRe: Selected Tab index? Pin
Mohammad Dayyan25-Sep-08 15:43
Mohammad Dayyan25-Sep-08 15:43 
GeneralRe: Selected Tab index? Pin
User 27100925-Sep-08 15:44
User 27100925-Sep-08 15:44 
GeneralRe: Selected Tab index? Pin
Mohammad Dayyan25-Sep-08 15:51
Mohammad Dayyan25-Sep-08 15:51 
GeneralRe: Selected Tab index? Pin
User 27100925-Sep-08 15:58
User 27100925-Sep-08 15:58 
GeneralRe: Selected Tab index? Pin
Mohammad Dayyan25-Sep-08 16:13
Mohammad Dayyan25-Sep-08 16:13 
GeneralRe: Selected Tab index? Pin
User 27100925-Sep-08 16:16
User 27100925-Sep-08 16:16 
GeneralRe: Selected Tab index? Pin
Mohammad Dayyan25-Sep-08 16:25
Mohammad Dayyan25-Sep-08 16:25 
GeneralRe: Selected Tab index? Pin
User 27100925-Sep-08 16:26
User 27100925-Sep-08 16:26 
QuestionHow to create simple editable document under WPF? Pin
MikeKus25-Sep-08 9:40
MikeKus25-Sep-08 9:40 
AnswerRe: How to create simple editable document under WPF? Pin
User 27100925-Sep-08 15:16
User 27100925-Sep-08 15:16 
QuestionAnyone working with CAL - Commanding Issue Pin
Jammer25-Sep-08 9:01
Jammer25-Sep-08 9:01 
AnswerRe: Anyone working with CAL - Commanding Issue Pin
Jammer25-Sep-08 11:45
Jammer25-Sep-08 11:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.