Skip to main content
11 votes
Accepted

Task timer async

Initial observation is that you should avoid async void like private async void start() { //... } except for event ...
Nkosi's user avatar
  • 3,296
10 votes

Countdown control with arc animation

There are a couple of things which could be more consistent. ...
Peter Taylor's user avatar
  • 24.5k
10 votes
Accepted

Markdown Display in WPF

...
Peter Taylor's user avatar
  • 24.5k
9 votes
Accepted

Non-Entity framework database interaction model

Application Architecture The architecture of the application is divided into models and views to separate the data and business model from the user interface. Within the models there is an ...
dfhwze's user avatar
  • 14.2k
7 votes

Countdown control with arc animation

1) DispatcherTimer is good for periodic UI updates, but it should not be used to measure time, because it is just not accurate enough. For precise time measurement ...
Nikita B's user avatar
  • 13.1k
7 votes

Non-Entity framework database interaction model

I won't read this code beginning to end. Some basic advice: Namespaces ExperimentSimpleBkLibInvTool.ModelInMVC.DictionaryTabelBaseModel doesn't follow naming ...
abuzittin gillifirca's user avatar
6 votes

Task timer async

You're doing all your work in the 'code-behind' rather than a seperate viewmodel class, but for a project this small doing that 'right' would double the amount of code 😀 ...
Kelson Ball's user avatar
6 votes
Accepted

Xaml Wpf Snake game

I'm going to review only the code in your post. You don't use WPF as you have to. In WPF you don't need to perform clear/draw sequence. The right way is to use MVVM and update coordinates of the snake'...
Maxim's user avatar
  • 2,542
6 votes
Accepted

Loading a XAML file related to a control programmatically?

The conventional way of attaching default template to custom control is to specify default style inside a special resource dictionary. For this approach to work three conditions should be met: 1) ...
Nikita B's user avatar
  • 13.1k
6 votes
Accepted

Simple calculator in C# WPF

It's common to write down access modifier for fields Defining one field per line makes the code more readable because you dont have to scan each declaration line for multiple variables Initialization ...
JanDotNet's user avatar
  • 8,608
6 votes

WPF Palindrome Checker Application

Specification Palindrome From wikipedia: A palindrome is a word, number, phrase, or other sequence of characters which reads the same backward as forward, such as madam or racecar or the ...
dfhwze's user avatar
  • 14.2k
6 votes
Accepted

TreeView class in WPF class

Review I see no reason to have 3 constructors, each invoking the other, when two of them are private and only called by another constructor. Keep it simple. You check for ...
dfhwze's user avatar
  • 14.2k
6 votes

Loading BitmapImages out of a Zip file

var zipFile = ZipFile.OpenRead(ChapterLocation); ... zipFile.Dispose(); One word: using. ...
Peter Taylor's user avatar
  • 24.5k
6 votes
Accepted

WPF login screen and share username and access id across other forms

Some quick remarks: If you're doing WPF, you should be using MVVM. There is a learning curve, but your code will be vastly easier to maintain once you add more and more features. Much of the code ...
BCdotWEB's user avatar
  • 11.4k
6 votes

Using default implementations to superpower flags enums with C#

What are you getting that you couldn't get with properties? ...
RobH's user avatar
  • 17.1k
5 votes
Accepted

Sorting ListView Columns

You do not need three methods for sorting because the only difference between them is the property that you use for sorting. You might as well have only one method that takes a ...
t3chb0t's user avatar
  • 44.7k
5 votes
Accepted

Visual Studio exception visualizer for lengthy exception messages

...
Peter Taylor's user avatar
  • 24.5k
5 votes

Concurrent observable collection

Raising events inside of a lock is a code smell. Locks should be short lived as possible. Plus since, maybe today, you know what the events will do that doesn't mean in the future they won't change....
CharlesNRice's user avatar
  • 4,438
5 votes

MVVM model letting the user select a directory in a testable manner

Review You always instantiate inner dialogs for both platforms, even though one will never be called. Your platform will not change at runtime. Use the Lazy pattern to only instantiate the required ...
dfhwze's user avatar
  • 14.2k
5 votes
Accepted

Right way to handle, log and display exceptions

The main reason for exceptions (from a developer point of view) is to detect malfunctioning code. Because once this malfunctioning code is executed, the result of an operation and therefore the state ...
BionicCode's user avatar
4 votes

AsyncCommand using MVVM and WPF

I realized that the question is quite old, but still seems to have some relevance. I guess people feel attracted, because they expect to find a usable asynchronous ...
BionicCode's user avatar
4 votes

CommandBinding refresh on parameter changed

OK several years later and looking back I now know what I was doing wrong this is a misuse of the command parameter the command parameter is not a variable that you pass into the command on ...
MikeT's user avatar
  • 330
4 votes

Rounded borders for different controls (Button, TextBox, ComboBox) via Attached Property

Holy crap. All that just to get Rounded corners? Yes, I wholeheartedly agree with that comment. It is astonishing, how some things that sound trivial - are extremely complicated in WPF. But there is ...
Nikita B's user avatar
  • 13.1k
4 votes
Accepted

Snake Game Library for WPF

Mixing responsibilities ...
Flater's user avatar
  • 5,720
4 votes

Addition Program using wpf through MVVM

Some quick remarks: Give things proper names. "Model.cs" is a bad name for a class, and in your case it is even the name of a namespace. Microsoft has Naming Guidelines; please follow them. Same for ...
BCdotWEB's user avatar
  • 11.4k
4 votes

WPF Bitmap / BitmapFrame to multi-page / multi-frame TIFF with JPEG encoding

Henrik covered a number of points which I would have raised, so I won't repeat those. namespace TIFF { public class Jpeg seems inconsistent to me. The ...
Peter Taylor's user avatar
  • 24.5k
4 votes
Accepted

MVVM model letting the user select a directory in a testable manner

Additionally to the great answer of dfhwze, I'll provide an alternative implementation that includes some of the suggestions. Primary, I would implement each case separatly and create / dispose the ...
JanDotNet's user avatar
  • 8,608

Only top scored, non community-wiki answers of a minimum length are eligible