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,236
10 votes
Accepted

Using Mutex to prevent multiple WPF application launches

Thing that make me more unhappy is mixing UI logic of your MainWindow class with this single instance logic that really belongs to process (and then ...
Adriano Repetti's user avatar
10 votes

Countdown control with arc animation

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

Markdown Display in WPF

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

Find a value in a comma delimited String

This could be a better/cooler way: return (parameter as string)?.Split(',').Contains(value as string) ?? (object)false; Your example is so short that I don't ...
t3chb0t's user avatar
  • 44.3k
9 votes
Accepted

Simple pack Uri builder

Your code looks pretty got but there are some things that you can simplify, probably the switch cases are the most unwanted part of your code. Verbatim strings ...
Denis's user avatar
  • 8,458
8 votes
Accepted

MVVM - ObservableCollection & Entity Framework DbContext

An EF DbContext is an IDisposable object that should be as short-lived as possible. There are a number of problems with this: <...
Mathieu Guindon's user avatar
8 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
  • 13.9k
7 votes
Accepted

WPF Mvvm async function ViewModel

General Your model should not return an ObservableCollection because that collection should be used only if its change notification ability is needed (e.g. with ...
JanDotNet's user avatar
  • 8,538
7 votes

Shuffles male or females names based on Fisher Yates algorthim

The logic part of your code should definitely be re-written, but since it's one big mess I'm not going to touch that. See whether you really need that many options. You probably don't. I might expand ...
Mast's user avatar
  • 13.4k
7 votes
Accepted

WPF Multiscreen Media Application

A way to reduce the amount of code in initialize and allow it to be more flexible is by putting your MediaElements into an array: ...
Bruno Costa's user avatar
  • 5,566
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
  • 13k
6 votes

Euclidean distance between documents

Quick remarks: DO NOT use Hungarian notation: dblDistance. Is csPublicSettings a class name? If so, it should be PascalCase. (I'...
BCdotWEB's user avatar
  • 11.2k
6 votes

AsyncCommand using MVVM and WPF

You should avoid code duplication in constructors. For larger objects this practice can quickly spin out of control. Re-use existing constructors instead: ...
Nikita B's user avatar
  • 13k
6 votes

Another DataGrid (ObservableCollection) Filtering Method

You can refactor this into LINQ query for (arguably) better readability. ...
Nikita B's user avatar
  • 13k
6 votes
Accepted

Optimize WPF application (2 WPF Windows and a huge mess)

I won't suggest you any miraculous improvements because the code is extremely hard to read this is, currently the worst mess in your code are the meaningless names. ...
t3chb0t's user avatar
  • 44.3k
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 ...
Maxim's user avatar
  • 2,542
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

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
  • 13k
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,538
6 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

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
  • 13.9k
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
  • 13.9k
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.1k
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.2k
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
  • 16.9k
5 votes
Accepted

Code Explorer UI

I don't like this: ...
Mathieu Guindon's user avatar
5 votes

Shuffles male or females names based on Fisher Yates algorthim

Instead of two lists like @Mast proposed, you could use a Dictionary and a List like: ...
fernando.reyes's user avatar

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