Click here to Skip to main content
15,910,234 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Log4Net.dll what is ?? Pin
Ian Shlasko29-Apr-11 1:31
Ian Shlasko29-Apr-11 1:31 
GeneralRe: Log4Net.dll what is ?? Pin
jadughar29-Apr-11 2:05
jadughar29-Apr-11 2:05 
GeneralRe: Log4Net.dll what is ?? Pin
Ian Shlasko29-Apr-11 2:12
Ian Shlasko29-Apr-11 2:12 
GeneralRe: Log4Net.dll what is ?? Pin
jadughar2-May-11 3:58
jadughar2-May-11 3:58 
GeneralRe: Log4Net.dll what is ?? Pin
Keith Barrow29-Apr-11 7:08
professionalKeith Barrow29-Apr-11 7:08 
AnswerRe: Log4Net.dll what is ?? Pin
Abhinav S28-Apr-11 7:21
Abhinav S28-Apr-11 7:21 
GeneralRe: Log4Net.dll what is ?? Pin
jadughar28-Apr-11 21:02
jadughar28-Apr-11 21:02 
QuestionWPF decimal validation Pin
arkiboys28-Apr-11 2:49
arkiboys28-Apr-11 2:49 
In a textbox of my wpf application, I would like to only allow numbers i.e.:
21 or 19.50 or 12.75 or 10
Can you see how my code below can be corrected because it only allows numbers such as 21, 1950, 1275, 10, etc... ?

Thank you

private bool IsDecimal(string text)
        {
            bool blnValidDecimal = false;
            foreach (char c in text)
            {
                if (Char.IsNumber(c))
                {
                    blnValidDecimal = true;
                }
                if (char.IsDigit(c))
                {
                    blnValidDecimal = true;
                }
            }
            return blnValidDecimal;
        }

        private void txtAvgGrade_PreviewTextInput(object sender, TextCompositionEventArgs e)
        {
            e.Handled = !IsDecimal(e.Text);
        }

AnswerRe: WPF decimal validation Pin
Ian Shlasko28-Apr-11 3:10
Ian Shlasko28-Apr-11 3:10 
AnswerRe: WPF decimal validation Pin
Pete O'Hanlon28-Apr-11 3:47
mvePete O'Hanlon28-Apr-11 3:47 
GeneralRe: WPF decimal validation Pin
arkiboys28-Apr-11 4:15
arkiboys28-Apr-11 4:15 
GeneralRe: WPF decimal validation Pin
Pete O'Hanlon28-Apr-11 5:02
mvePete O'Hanlon28-Apr-11 5:02 
GeneralRe: WPF decimal validation Pin
arkiboys28-Apr-11 18:26
arkiboys28-Apr-11 18:26 
GeneralRe: WPF decimal validation Pin
Mycroft Holmes28-Apr-11 14:16
professionalMycroft Holmes28-Apr-11 14:16 
GeneralRe: WPF decimal validation Pin
Pete O'Hanlon2-May-11 6:29
mvePete O'Hanlon2-May-11 6:29 
QuestionWPF textbox email validation Pin
arkiboys27-Apr-11 22:09
arkiboys27-Apr-11 22:09 
AnswerRe: WPF textbox email validation Pin
Pete O'Hanlon27-Apr-11 22:15
mvePete O'Hanlon27-Apr-11 22:15 
GeneralRe: WPF textbox email validation Pin
arkiboys27-Apr-11 22:46
arkiboys27-Apr-11 22:46 
GeneralRe: WPF textbox email validation Pin
Wayne Gaylard27-Apr-11 23:46
professionalWayne Gaylard27-Apr-11 23:46 
GeneralRe: WPF textbox email validation Pin
arkiboys28-Apr-11 0:36
arkiboys28-Apr-11 0:36 
GeneralRe: WPF textbox email validation Pin
Pete O'Hanlon27-Apr-11 23:51
mvePete O'Hanlon27-Apr-11 23:51 
GeneralRe: WPF textbox email validation Pin
arkiboys28-Apr-11 0:36
arkiboys28-Apr-11 0:36 
GeneralRe: WPF textbox email validation Pin
Pete O'Hanlon28-Apr-11 0:46
mvePete O'Hanlon28-Apr-11 0:46 
QuestionHow to read data from listbox.Itemtemplate and pass it in xml format Pin
Rocky2327-Apr-11 20:58
Rocky2327-Apr-11 20:58 
AnswerRe: How to read data from listbox.Itemtemplate and pass it in xml format Pin
Abhinav S27-Apr-11 21:33
Abhinav S27-Apr-11 21:33 

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.