Click here to Skip to main content
15,124,055 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: DispatcherTimer Pin
Mycroft Holmes14-Jan-21 13:15
professionalMycroft Holmes14-Jan-21 13:15 
GeneralRe: DispatcherTimer Pin
michaelbarb14-Jan-21 14:23
Membermichaelbarb14-Jan-21 14:23 
AnswerRe: DispatcherTimer Pin
Gerry Schmitz15-Jan-21 3:31
mveGerry Schmitz15-Jan-21 3:31 
QuestionBetter way to access ViewModels Pin
Mc_Topaz5-Jan-21 5:11
MemberMc_Topaz5-Jan-21 5:11 
AnswerRe: Better way to access ViewModels Pin
Gerry Schmitz5-Jan-21 22:01
mveGerry Schmitz5-Jan-21 22:01 
AnswerRe: Better way to access ViewModels Pin
#realJSOP9-Jan-21 2:03
mva#realJSOP9-Jan-21 2:03 
GeneralRe: Better way to access ViewModels Pin
michaelbarb10-Jan-21 9:20
Membermichaelbarb10-Jan-21 9:20 
GeneralRe: Better way to access ViewModels Pin
#realJSOP10-Jan-21 12:15
mva#realJSOP10-Jan-21 12:15 
AnswerRe: Better way to access ViewModels Pin
#realJSOP21-Feb-21 1:42
mva#realJSOP21-Feb-21 1:42 
QuestionIDataErrorInfo Pin
#realJSOP28-Dec-20 5:15
mva#realJSOP28-Dec-20 5:15 
Alright, I'm at a loss. I'm trying to get a TextBox to display WPF's default red border around the control. I know for a fact that the error condition is being detected, but the border color isn't changing. I think I'm just bench blind, but I've been playing with this for two days now with no success. Can anyone see/think of anything I'm doing wrong?

0) I've implemented IDataErrorInfo on my control (which already inherits INotifyPropertyChanged):
C#
public partial class WizPgQuery : WizardPageBase, IDataErrorInfo
{
    public string this[string columnName]
    {
        get
        {
            string value;
            switch (columnName)
            {
                case "ClassName": value = this.ValidateClassName(); break;
                case "QueryText": value = this.ValidateQueryText(); break;
                default         : value = string.Empty;             break;
            }
            return value;
        }
    }

    public string Error
    {
        get { throw new NotImplementedException(); }
    }

1) I have my property and validation routines implemented
C#
private string className;
public string ClassName
{
    get { return this.className; }
    set
    {
        if (value != this.className)
        {
            this.className = value;
            this.NotifyPropertyChanged();
        }
    }
}

private string ValidateClassName()
{
    string value = (this.ClassName.IsValidClassName())
                    ? ""
                    : "The class name must be a valid C# identifier.";
    // just to make sure it's getting called
    if (!string.IsNullOrEmpty(value)) { SystemSounds.Beep.Play(); }
    return value;
}

2) My XAML looks like this:
XAML
<TextBox x:Name="textboxClassName" Grid.Column="1" 
         Text="{Binding Path=ClassName, 
         Mode=TwoWay, 
         ValidatesOnDataErrors=True, 
         ValidatesOnExceptions=True, 
         NotifyOnValidationError=True,
         UdateSourceTrigger=PropertyChanged}"
         TextChanged="TextboxClassName_TextChanged" 
         ToolTip="Base tool tip" />

3) No dynamic/static resources defined that might override WPF's default presentation behavior
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

AnswerRe: IDataErrorInfo Pin
Gerry Schmitz28-Dec-20 7:24
mveGerry Schmitz28-Dec-20 7:24 
GeneralRe: IDataErrorInfo Pin
#realJSOP28-Dec-20 9:13
mva#realJSOP28-Dec-20 9:13 
GeneralRe: IDataErrorInfo Pin
#realJSOP29-Dec-20 2:56
mva#realJSOP29-Dec-20 2:56 
QuestionDesktop Push Notifications on multiple devices in WPF Desktop Application Pin
Member 1495324013-Dec-20 5:47
MemberMember 1495324013-Dec-20 5:47 
AnswerRe: Desktop Push Notifications on multiple devices in WPF Desktop Application Pin
Gerry Schmitz13-Dec-20 6:32
mveGerry Schmitz13-Dec-20 6:32 
GeneralRe: Desktop Push Notifications on multiple devices in WPF Desktop Application Pin
Member 1495324013-Dec-20 8:09
MemberMember 1495324013-Dec-20 8:09 
GeneralRe: Desktop Push Notifications on multiple devices in WPF Desktop Application Pin
Gerry Schmitz13-Dec-20 20:18
mveGerry Schmitz13-Dec-20 20:18 
AnswerRe: Desktop Push Notifications on multiple devices in WPF Desktop Application Pin
Dave Kreskowiak13-Dec-20 11:20
mveDave Kreskowiak13-Dec-20 11:20 
QuestionDispatcherTimer Pin
michaelbarb8-Dec-20 4:55
Membermichaelbarb8-Dec-20 4:55 
AnswerRe: DispatcherTimer Pin
michaelbarb8-Dec-20 5:12
Membermichaelbarb8-Dec-20 5:12 
AnswerRe: DispatcherTimer Pin
Dave Kreskowiak8-Dec-20 5:15
mveDave Kreskowiak8-Dec-20 5:15 
GeneralRe: DispatcherTimer Pin
michaelbarb8-Dec-20 5:24
Membermichaelbarb8-Dec-20 5:24 
AnswerRe: DispatcherTimer Pin
Gerry Schmitz8-Dec-20 7:30
mveGerry Schmitz8-Dec-20 7:30 
GeneralRe: DispatcherTimer Pin
michaelbarb8-Dec-20 7:37
Membermichaelbarb8-Dec-20 7:37 
QuestionDifferences Pin
michaelbarb30-Nov-20 7:36
Membermichaelbarb30-Nov-20 7:36 

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.