Comment by Sinatr on Visual Studio 2022 doesn't indent multi-line method...
How do you produce first snippet? Is it copy/pasted? Did you invoke formatting function? And it does nothing? I expect auto-indent as you type the code and hit enter-key to appear, but there is none.
View ArticleComment by Sinatr on Why doesn't the operator precedence "work" with ++/-- i C#?
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 precedence "work" with ++/-- i C#?
I wonder what question do you answer, can you perhaps put it in the beginning of answer? I feel dumb.
View ArticleComment by Sinatr on How to replace a string placeholder with array of...
What is inside Ids? Is "123-a-123" a property value, generated value, method result or what? dynamic is often wrongly used by beginners to put any type inside and call its methods by name....
View ArticleComment by Sinatr on Binding different DataContexts to a combo box in a list...
You don't need ListView for just 3 ComboBoxes. Just add 3 of them to the Grid, each with own ItemSource. Otherwise you will need to create extra type (to act as an ListBoxItem.DataContext), add to it...
View ArticleComment by Sinatr on Is there a way to read from an actively written log file...
"The file gets rotated periodically" - what does it means? A new file is created? Then you can monitor for new file and stop (interrupt) current reading.
View ArticleComment by Sinatr on How can I understand why I got an exit code 3221226356...
AFAIK Begin../End.. is the old async API, why not using await webRequest.GetResponseAsync() inside try/catch? And without minimal reproducible example it would be hard to help.
View ArticleComment by Sinatr on Button inside datagrid inside itemscontrol - How to bind...
With tree like this "ItemsControl / DataGrid / Button" the button won't find command on highest level if you just search for DataGrid. You have to search for ItemsControl at least. If ViewModel belons...
View ArticleComment by Sinatr on WPF loading animation with video
Instead of toggling visibility consider adding to/removing from visual tree. Make behavior which adds control to ContentControl.Content or sets it back to null.
View ArticleComment by Sinatr on How to get a primary constructor from type in c#
I don't see Main method. minimal reproducible example to get primary constructor doesn't require so much, right? Show what you call and how.
View ArticleComment by Sinatr on Read weight from a weighing scale: is it possibile to...
Sounds like XY problem. What is double weighing exactly?
View ArticleComment by Sinatr on How to change visibility for some TreeDataGrid rows?
I expected mine TreeDataGrid and TreeDataGridRow.IsVisible has set with LocalValuepriority. I guess it is set by TreeDataGridRowPresenter. Means you can't simply change its value from style selector.
View ArticleComment by Sinatr on Change picture size in winforms
I don't see where you assign btnProfile.Image = resizedImage.
View ArticleComment by Sinatr on Set size of WPF dialog in Loaded causes flickering and...
Why using Loaded if you can call SetDialogWidthBasedOnContent directly after InitializeComponent()?
View ArticleComment by Sinatr on Set size of WPF dialog in Loaded causes flickering and...
" using the ContentRendered event ensures that the size adjustment happens after the content is fully rendered. This should reduce flickering, but if it still occurs, you might need to explore other...
View ArticleComment by Sinatr on Run once in loop
State machine with adjustable steps time. Synchronously called method, which performs animation . -> .. -> ... at the end of given string. Better with async/await.
View ArticleComment by Sinatr on Set size of WPF dialog in Loaded causes flickering and...
Initialized event - too early, Loaded - too late. In between there is a SourceInitialized event. Try it. Use mine approach to measure container, rather than going yourself through its children.
View ArticleComment by Sinatr on Is there a simple way to describe a list of equal...
Subclassing in wpf is rarely required. Rather make an attached behavior (either a normal attached property or with Interaction.Behaviors), which sets column definition. As a bonus it will be supporting...
View ArticleAnswer by Sinatr for How to change visibility for some TreeDataGrid rows?
You will not be able to set TreeDataGridRow.IsVisible from Selector, because (as of now) it is set to true with LocalValuepriority. In the future pay attention to "Priority" column in Avalonia...
View ArticleAnswer by Sinatr for Is there a simple way to describe a list of equal...
How about using attached properties and syntax like this:<!-- Define xmlns:b="clr-namespace:Behaviors" --><!-- Create 5 columns: 1/3 width, 2/3 width, auto, auto and 50 pixels --><Grid...
View Article