Questions tagged [wpf]

Windows Presentation Foundation (WPF) is part of the Microsoft .NET framework used to create rich client user experiences for Windows application.

Filter by
Sorted by
Tagged with
42
votes
3answers
5k views

Simon Says: “Make me a pretty game”

In Memoriam Ralph H. Baer, co-inventor of the original "Simon" game, died Saturday December 6th 2014, at 92. With his passing, this friendly little challenge inadvertently became a memorial to ...
29
votes
1answer
25k views

Single-instance WPF application

This is the code I implemented so far to create a single instance WPF application: ...
26
votes
2answers
23k views

Is nesting grids a good idea?

I find myself nesting a lot of grids inside grids in WPF. I just found myself 3 Grids deep, and stopped to think: "Should I be doing this?" Is there some kind of performance cost? Is it unmaintainable?...
20
votes
5answers
12k views

MVVM, WPF Ribbon V4, with Prism

This weekend I've been having one heck of a time getting WPF Ribbon v4 working with MVVM and Prism (using unity). After much trial and error, I believe I have it working. I was hoping someone could ...
17
votes
1answer
39k views

Sort ObservableCollection after added new item

For a WPF application, I have to sort the items in ObservableCollection after Added new item. ...
17
votes
2answers
4k views

Understanding the MVVM concepts and validation of my code

I have been learning MVVM concepts and trying to implement it in my new project. I want to validate my work that I have been doing these past days. I want to know if I follow correctly the MVVM ...
14
votes
1answer
26k views

Is there a better way to get a child?

I have written the following code to get ImageColorPicker child: ...
13
votes
1answer
3k views

Detecting UI thread hanging and logging stacktrace

I have an application that needs to always be responsive. I've written a class that is designed to monitor the UI thread. The goal is to provide useful information in the logs to be able to understand ...
12
votes
2answers
952 views

MVVM data binding for a video encoding form

I am creating a C# WPF application. I am intending to bind all of the GUI controls via data binding to my ViewModel, rather than code behind - as per MVVM. I have ...
12
votes
1answer
1k views

Linq for ObservableCollection

Purpose ObservableCollection<T> is not strictly a WPF class, but its intended purpose seems to be for use in WPF. It's the standard implementation of ...
11
votes
4answers
2k views

Countdown control with arc animation

I've implemented countdown timer control with arc animation that looks like this Implementation notes: For arc visualization I've created class Arc derived from <...
11
votes
1answer
501 views

Grid UI layout for a database

I've spent a few days making the transition from WinForms to WPF, and do not have much time for tutorials as the work needs to be done quickly. I was wondering if anyone could take a look at a sample ...
11
votes
2answers
200 views

Markdown Markup Editor: MK2

Following on from this question I have added some more functionality to Markdown Markup, and made it more WPF idiomatic. It now supports saving data from any of the four boxes, and loading Markdown ...
11
votes
1answer
9k views

A ViewModel using ReactiveUI 6 that loads and sends data

Most of the Rx Compelling Examples™ load and store data locally, which I don't find that Compelling. I spent some time coming up with how to best perform the following actions but want to make sure I ...
11
votes
2answers
531 views

A Binary Editor with Live Text Preview

This is a tool I needed for some other things (it's incomplete, but almost done) which is essentially just a text-editor that has two text-boxes: the left being the binary view / raw bytes, the right ...
11
votes
1answer
1k views

Lots of Storyboards in XAML, huge file

After spending a few ages writing out every combination of triggers, bindings and storyboards, I finally managed to get my program working. First time working with WPF, so I made a big mess. Now it's ...
11
votes
1answer
146 views

Rubberduck “GoTo Anything” Navigation

The next version of rubberduck is going to include a pretty nifty "goto anything" / find symbol navigation tool that lets the user enter an identifier name in a combobox: UI To achieve the templated ...
11
votes
1answer
2k views

Simple Tic-Tac-Toe Application in WPF

I made a Tic-Tac-Toe game in WPF and was just hoping for some input as I am pretty new to WPF and I am still a student so I'm sure that my C# code in general may be lacking XAML: ...
10
votes
7answers
2k views

Overlap detection for laying out elements on a page

How would you simplify/improve the readability of this code? Because even after my attempt to improve the readability I think it still looks messy. ...
10
votes
4answers
1k views

Resx Editor in WPF

To aid in the localization of .resx files, I made a generic resx comparer that allows you to edit the values of the resx's. Also, this is my first proper adventure in WPF (I've just been using ...
10
votes
3answers
46k views

Best way of updating a list of unique items

I am wondering what the best practice for updating a list that only accepts unique items. Right now, I have a button that loads data from a database into a list. I can press this button numerous times ...
10
votes
2answers
238 views

Settings, setting settings, and settings handlers

So, back in this question, I built a set of settings. Now, I am trying to clean the entire system up. This is the abstract base class: ...
10
votes
3answers
10k views

Pong game in WPF

I would especially like to find out how this project should be constructed to be "fully MVVM". I did some reading about MVVM and I started to implement some ideas, but I don't fully understand it yet....
10
votes
5answers
1k views

Setting user permissions, where certain permissions imply other permissions

The purpose of the class is to set permissions for a user. These include delete, download, upload, view, etc. These properties often depend on other properties, and setting them has side effects. For ...
10
votes
1answer
1k views

Markdown Display in WPF

I wanted to display a markdown document in WPF sensibly without relying on an HTML rendering system. I wrote a control based on the RichTextBox, and used Microsoft'...
10
votes
1answer
133 views

Visual Studio exception visualizer for lengthy exception messages

I use Autofac a lot and for everything and when you make a mistake and forget to register a dependency etc. it'll tell you exaclty what's wrong. Although its ...
10
votes
1answer
234 views

Code Explorer 2.0: A folder hierarchy to organize VBA projects

Next release of Rubberduck will introduce a very cool @Folder annotation system that the Code Explorer will use to organize modules into - you guessed it - folders: ...
10
votes
1answer
226 views

TicTactics Presentation

This is my take at the current code-challenge, Ultimate Tic-Tac-Toe, at least the presentation part. As I chose to write a WPF application for my game, and this is my very first time fiddling with a <...
10
votes
2answers
963 views

CommandBinding refresh on parameter changed

I need the command I am executing on a datagrids context menu to know which column was clicked on. XAML ...
9
votes
4answers
4k views

C# WPF Simple Calculator

I've implemented simple +-*/ calculator in WPF. I know that here are few implementations of the same thing, but each is different, with different advantages or ...
9
votes
2answers
1k views

Am I handling “spot the missing DLL” right?

I have a .net 4.5 desktop script which has dependencies on some third party libraries (dll's). These libraries are used in my MainWindowViewModel. I need to check ...
9
votes
2answers
4k views

Animating the color of a line in WPF

I'm thinking about how to do a color transition for a line in WPF. I'm looking for this to be as simple and succinct as possible, and also the "correct" way in the WPF world. This is what I have, ...
9
votes
1answer
29k views

Navigation between pages in WPF MVVM application

I did a project in WPF MVVM. Just a single Window with single Frame control and few Pages. My problem was communication between ...
8
votes
2answers
4k views

Add or view pattern with MVVM

I have a model called WorkOrder which I want to be able to manage from a single window. The required operations (for now) are only Insert and view, so this is what ...
8
votes
3answers
2k views

Simple pack Uri builder

I want to make the creation of the pack Uri for WPF resources more verbose so they are easier to read and less error-prone and I thought I implement it using the builder pattern. The base class for ...
8
votes
2answers
142 views

Non-Entity framework database interaction model

A C# WPF user interface has been developed for the Book Inventory MySQL database previously shown in this question. Since the database had already been developed this was a database first ...
8
votes
2answers
12k views

Wiring CollectionView and updating itself without the need for Refresh()

I have been using your expertise developing my application using parts of WPF that I have never touched before. In this stage my View does all I need it to do, however, I am not sure if I've done my ...
8
votes
2answers
3k views

AsyncCommand using MVVM and WPF

Goals I want to be able to call async code using the MVVM pattern I want to be able to add loading animations/screens without having to add properties for each command on my viewmodels I may want to ...
8
votes
3answers
682 views

MIST - auto-implemented, attribute-driven .NET notification mechanism

I have a component that I've used myself for quite some time, the short story is that it automagically implements a property change notification mechanism (very useful for implementing ...
8
votes
2answers
1k views

Easly cancellable operations WPF

Several times we need to be able to revert the data the user is inserting to a previous state (cancel data update). In order to keep DRY and for the sake of separation of concerns I thought about a ...
8
votes
2answers
1k views

Concurrent observable collection

I'm working on a WPF 4.5 desktop application that has several nested collections with the following key aspects: writes mainly from UI thread, but also from worker threads writes are relatively ...
8
votes
1answer
964 views

Creating interactive tours for WPF applications

I am developing a WPF component that can be used to create interactive tours for WPF applications. To further improve the API in terms of usability and intuitiveness, the input of other developers is ...
7
votes
2answers
12k views

Task timer async

I had been still using BackGroundWorker and decided to learn async Task. My test project is a simple timer that can be canceled. The target project is to read instruments with a delay for sampling. ...
7
votes
2answers
3k views

Noughts and Crosses WPF app

I've been learning C# and was looking for some feedback on my latest project, which is a standard Noughts and Crosses game. Two people are required to play (no AI yet). MainWindow.xaml.cs ...
7
votes
3answers
855 views

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

Right now i have a WPF application supposed to display some media into a WPF Window, from actions in another WPF Window ( for example : you write text in a textbox, you click on a button, and the text ...
7
votes
5answers
2k views

Another DataGrid (ObservableCollection) Filtering Method

I have re-written my DataGrid filtering method to try to improve performance and I feel that although this is the fastest yet, there is still room for improvement ...
7
votes
1answer
57 views

Loading BitmapImages out of a Zip file

I'm working on a personal project to get better with C#, and as part of that I have a zip file with 20 or so images saved inside. I want to load those images out of the zip file and display them in my ...
7
votes
1answer
2k views

Active Directory Tool - WPF application to query active directory and display results

This is a Windows Presentation Foundation application that queries active directory and can display lists of users, users by group, groups, and users by manager (direct reports). It operates on ...
7
votes
1answer
356 views

MVVM: Am I doing it right?

I read a lot of articles recently concerning XAML, WPF, data binding and MVVM. I also watched some MVVM tutorials and downloaded some MVVM samples. I finally got my first MVVM sample to work, but ...
7
votes
1answer
167 views

Resx Translation Helper, V.2.0

Related to Resx Translation Helper, V.2.0 Remove Files Window First, I implemented the changes suggested in my last question, then I changed my entire code base to support editing 1-N Resx files. So,...