Comment by Sinatr on How to discard property being written from json converter?
Interesting idea to run converter in resolver. That would call converter twice for each valid non-null value. Hmm.. Converter vs resolver. Not sure if I need just a resolver then. I have multiple...
View ArticleComment by Sinatr on Clipboard.SetDataObject() COM exception DV_E_FORMATETC...
Remarks of GetDataObject() method: "A list of predefined formats is defined by the DataFormats class". I guess you can only deal with those types. How do you find out the current data is "bitmapsource"?
View ArticleComment by Sinatr on Optimizing For Loop by adding Parallel in my...
Do not use sourceBitmap in other threads. Save bitmap width and height in local variables and use them instead.
View ArticleComment by Sinatr on Error IndexOutOfRangeException: Array index is out of range
You need to learn to debug, namely inspecting variables to see their values at time when exception occurs.
View ArticleComment by Sinatr on Check if system time was changed before opening an...
Check if time was changed sounds like XY problem to me. What is X problem?
View ArticleComment by Sinatr on Operator Statistics
Is your question how to make some data available even after restart of application?
View ArticleComment by Sinatr on ContextMenu doesn't open when I use right click from...
AFAIK, you can open context menu control.ContextMenu.IsOpen = true, this require control to be at least FrameworkElement though.
View ArticleComment by Sinatr on WPF ListBox ContentControl Animation Works Only Once...
Try using x:Shared="false" for resource.
View ArticleComment by Sinatr on How do i fetch the process id of a TCP connection...
It basically boils down to this question. Is using netstat considered to be "native API call"? And why this limitation?
View ArticleComment by Sinatr on DateTime.ParseExact returns today if date string and...
Well any text repeated twice as s and format will be accepted and return current date, try DateTime.ParseExact("123", "123", null).
View ArticleComment by Sinatr on How to show junk character in textbox from string c#
It's basically this question, but I guess you may need to add an extra bit to show \u0002 and \u0005, not sure how VS debugger does it, but it seems to be something with Unicode.
View ArticleComment by Sinatr on DateTime.ParseExact returns today if date string and...
@Wyck, fix your unit test with DateTimeStyles.NoCurrentDateDefault ^^
View ArticleComment by Sinatr on In C#: #13 is "\r", "\n", or "\r\n"
I would read specification literally, #13 is representation of byte (in some other languages?) with decimal value 13 (0xD in hex), correspond to \rescape sequence. Insert only that.
View ArticleComment by Sinatr on In C#: #13 is "\r", "\n", or "\r\n"
I asked ChatGPT and he told me following: "#13 in Pascal or Delphi represents the carriage return character": WriteLn('Hello'#13'World');. We need pascal/delphi expert to understand #13 before we...
View ArticleComment by Sinatr on Sending custom event to WPF window from code-behind
If you write code in the view, then you can directly run storyboard. No need to define some event in the view itself. In your case perhaps a better idea is simply repeat animation. And every time I see...
View ArticleComment by Sinatr on C# Graph Auto Height from Maximum Value
y_i = value_i / value_max * graph_height
View ArticleComment by Sinatr on MAUI, how to managed culture in converter?
Don't know about maui, but in wpf you'll either need to refresh the binding, which forces convertion or to use multibinding converter to monitor for language changes as well.
View ArticleComment by Sinatr on WPF ComboBox with CheckBoxes - Wrong header text binded
Similar question. See if my workaround works for you.
View ArticleComment by Sinatr on Why doesn't the operator preferences "work" with ++/-- i...
I don't understand "why does it save the ++ to the end on the second line?". What result do you get and what you expect?
View ArticleComment by Sinatr on Why doesn't the operator preferences "work" with ++/-- i...
I wonder what question do you answer, can you perhaps put it in the beginning of answer? I feel dumb.
View Article