Click here to Skip to main content
15,860,861 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Apply TextBlock Captions at Runtime Pin
Pete O'Hanlon14-May-21 23:51
subeditorPete O'Hanlon14-May-21 23:51 
AnswerRe: Apply TextBlock Captions at Runtime Pin
Mycroft Holmes15-May-21 12:25
professionalMycroft Holmes15-May-21 12:25 
GeneralRe: Apply TextBlock Captions at Runtime Pin
Gerry Schmitz16-May-21 11:17
mveGerry Schmitz16-May-21 11:17 
QuestionWPF TextBox Handle Data Pasted In Pin
Kevin Marois14-Apr-21 8:29
professionalKevin Marois14-Apr-21 8:29 
AnswerRe: WPF TextBox Handle Data Pasted In Pin
Richard Deeming14-Apr-21 22:50
mveRichard Deeming14-Apr-21 22:50 
GeneralRe: WPF TextBox Handle Data Pasted In Pin
Kevin Marois15-Apr-21 5:49
professionalKevin Marois15-Apr-21 5:49 
QuestionFormat Percentage Pin
Kevin Marois13-Apr-21 9:16
professionalKevin Marois13-Apr-21 9:16 
AnswerRe: Format Percentage Pin
Richard Deeming13-Apr-21 22:36
mveRichard Deeming13-Apr-21 22:36 
The UpdateSourceTrigger=PropertyChanged option means that your source property is updated every time you press a key in the TextBox.

When you type a . character, one of two things will happen:
  • The box is currently empty. "." on its own cannot be parsed as a decimal, so the property will not be updated.
  • The box contains an integer:
    • decimal.Parse("42.") returns 42.
    • The property is updated to 42, triggering the PropertyChanged event.
    • The binding on the box updates to reflect the new property value - the text is set to "42".

Depending on what you are trying to do, there may be ways around this - for example, manually updating the source value when the user presses Enter:
c# - Binding to a double with StringFormat on a TextBox - Stack Overflow[^]



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer

GeneralRe: Format Percentage Pin
Kevin Marois14-Apr-21 7:42
professionalKevin Marois14-Apr-21 7:42 
QuestionAvalonEdit Sytax Highlighting for XAML files? Pin
#realJSOP5-Apr-21 8:57
mve#realJSOP5-Apr-21 8:57 
AnswerRe: AvalonEdit Sytax Highlighting for XAML files? Pin
Richard Deeming6-Apr-21 0:22
mveRichard Deeming6-Apr-21 0:22 
QuestionRevert Property Change Pin
Kevin Marois5-Apr-21 7:20
professionalKevin Marois5-Apr-21 7:20 
AnswerRe: Revert Property Change Pin
#realJSOP5-Apr-21 8:55
mve#realJSOP5-Apr-21 8:55 
QuestionUI not updating Pin
#realJSOP28-Mar-21 3:52
mve#realJSOP28-Mar-21 3:52 
AnswerRe: UI not updating Pin
Pete O'Hanlon28-Mar-21 6:10
subeditorPete O'Hanlon28-Mar-21 6:10 
GeneralRe: UI not updating Pin
#realJSOP28-Mar-21 6:40
mve#realJSOP28-Mar-21 6:40 
AnswerRe: UI not updating Pin
Richard Deeming28-Mar-21 22:20
mveRichard Deeming28-Mar-21 22:20 
GeneralRe: UI not updating Pin
#realJSOP29-Mar-21 2:59
mve#realJSOP29-Mar-21 2:59 
AnswerRe: UI not updating Pin
Gerry Schmitz29-Mar-21 9:15
mveGerry Schmitz29-Mar-21 9:15 
GeneralRe: UI not updating Pin
#realJSOP29-Mar-21 10:38
mve#realJSOP29-Mar-21 10:38 
GeneralRe: UI not updating Pin
Gerry Schmitz29-Mar-21 11:24
mveGerry Schmitz29-Mar-21 11:24 
GeneralRe: UI not updating Pin
#realJSOP29-Mar-21 12:07
mve#realJSOP29-Mar-21 12:07 
GeneralRe: UI not updating Pin
Gerry Schmitz29-Mar-21 12:19
mveGerry Schmitz29-Mar-21 12:19 
GeneralRe: UI not updating Pin
#realJSOP29-Mar-21 23:33
mve#realJSOP29-Mar-21 23:33 
GeneralRe: UI not updating Pin
Richard Deeming29-Mar-21 21:36
mveRichard Deeming29-Mar-21 21: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.