Click here to Skip to main content
15,915,807 members
Home / Discussions / WPF
   

WPF

 
QuestionWPF Data binding Pin
koleraba27-Sep-08 8:21
koleraba27-Sep-08 8:21 
AnswerRe: WPF Data binding Pin
User 27100928-Sep-08 6:12
User 27100928-Sep-08 6:12 
GeneralRe: WPF Data binding Pin
koleraba29-Sep-08 6:01
koleraba29-Sep-08 6:01 
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 
Here is what i have tried..

<Window x:Class="TextBoxValidation.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:y="http://schemas.microsoft.com/winfx/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="300" Width="300">
<Grid>
<TextBox>
<TextBox.Text>
<Binding.ValidationRules>
<local:MatchRule MatchText="Hello" />
</Binding.ValidationRules>
</TextBox.Text>
</TextBox>
</Grid>
</Window>

namespace TextBoxValidation
{
class validatetextbox : ValidationRule
{
public string MatchText { get; set; }

public override ValidationResult Validate(object value,
CultureInfo info)
{
if ((string)value == MatchText)
return new ValidationResult(true, null);
return new ValidationResult(false, "This is not a match");
}
}
}

Here are my results..
http://schemas.microsoft.com/winfx/2006/xaml/presentation'. Line 9 Position 18
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 
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 

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.