Jul
10
awarded Popular Question
Jun
22
awarded Famous Question
Jun
14
comment WPF window border acting weird with Ribbon Control
Which ruins the quick links of the ribbon window. It's not a complete solution.
Jun
13
comment How to open second window from first window in wpf?
Except that's wrong. You don't need a new whole application. Just a new window.
Jun
11
comment Replace RichTextBox Text but keep formatting
Wait UTF32Encoding gives some issues on unicode text. Even UTF8Encoding. Hm..
Jun
7
awarded Popular Question
Jun
6
comment Why do I get KeyEventArgs from XAML but RoutedEventArgs from C# when I refer to the exact same KeyDown event?
And now it just worked. I'll just file it under "some typo messed it up for a while". :D Nothing to see here move along.
Jun
6
accepted Why do I get KeyEventArgs from XAML but RoutedEventArgs from C# when I refer to the exact same KeyDown event?
Jun
6
comment Why do I get KeyEventArgs from XAML but RoutedEventArgs from C# when I refer to the exact same KeyDown event?
OK, apparently, if I use a single and unused variable name for eventargs, it still gives a code-behind warning/error that it can not convert from routedeventargs to keyeventargs. Your method though with the plain assignment works perfectly! So I'll just accept the answer. If anyone has a bonus of guessing why the code doesn't like it explictly, that'd be fine.
Jun
6
comment Why do I get KeyEventArgs from XAML but RoutedEventArgs from C# when I refer to the exact same KeyDown event?
Thanks. I haven't tested it yet to confirm it's related because I found it a better solution to do it in styles for all elements related. The 'e' was there because 'r' was used for a for loop :P I know, silly reason. I like the plain assignment.
Jun
6
asked Why do I get KeyEventArgs from XAML but RoutedEventArgs from C# when I refer to the exact same KeyDown event?
Jun
5
comment Bind TextBox on Enter-key press
Something tells me this is an underrated post. A lot of answers are popular because they are "XAML-y". But this one appears to save space in most occasions.
Jun
5
comment WPF how to make textbox lose focus after hitting enter
To be honest, I'm suspicious with the huge amount of points such suggestions get just because they are more "XAML-y". The other answer is a single small function and a line for each key. This one needs a huge spam of <i:/> xaml for each box or at least an extra different solution to avoid that.
Jun
5
comment StringFormat, ConverterCulture, and a textbox's decimal mark
I think I'll just use a good middle ground at the moment. I'll use a good established method for focusing the boxes and maybe clearing the fancy formatting before editing, and then just save/bind only when focus is lost, not every single char change (because that was the original purpose, to autosave changes on every char change). I still suspect that this thing can't be really done "fully" or gracefully (updating and typing at the same time without disrupting the intuitive intentions of the user) so, I think it's approximately the same to just make it clean and update info when focus is lost.
Jun
5
accepted StringFormat, ConverterCulture, and a textbox's decimal mark
Jun
5
comment StringFormat, ConverterCulture, and a textbox's decimal mark
I will accept this answer since it's the best one.
Jun
4
comment StringFormat, ConverterCulture, and a textbox's decimal mark
I don't think you get what I said.I appreciate your help but I suspect there is a logical conflict in that PARTICULAR problem, not your method, your method is fine. Namely, it seems that if you want to BOTH have a 100% bidirectional binding between a box and a source like a grid but at the same time have a user type in data, there might be a conflict of autoformatting and not leaving him be to do his job of typing freely.Therefore, there might be a reason 99% of programs out there appear to just make you unfocus to save/update a particular word,not before(including MSWord come to think of it).
Jun
4
revised StringFormat, ConverterCulture, and a textbox's decimal mark
added 204 characters in body
Jun
4
comment WPF how to make textbox lose focus after hitting enter
I'm with the OP. Pressing Enter on a box is a perfectly intuitive thing. This isn't about pure logic, but what the intuition of the common user does. And most of them WILL press enter, until in some occasions.
Jun
4
comment StringFormat, ConverterCulture, and a textbox's decimal mark
As I hinted in a comment on the first (and currently only) answer, I suspect this might be something that can't be easily done if I want BOTH to update source and destination automatically and auto-format them at the same time. At least maybe not in a very straightforward way. The reason might be a logical dead end that is not a limitation of the language but a limitation of a "conflict" of wanting both autoformatting and 100% bidirectional updating based on new input.
1 2 3 4 5