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
3
votes
1answer
638 views

Making Dependency Property registration strongly typed

I've been working on another builder, this time for the DependencyProperty because it's object-based. This means that every ...
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 ...
1
vote
2answers
623 views

WPF wizard-like app

I'm designing and developing wizard-like app for populating the database I created with data from different sources. It's my first attempt to design and develop well-structured object-oriented ...
6
votes
1answer
1k views

Composable custom control that supports binding and property inheritance

This is an experiment to investigate how to wire up binding and inheritance in a composable, custom control complex. Custom Control Structure There is a custom parent (...
2
votes
1answer
159 views

Popup message queueing

I have a WPF application where I have a function for generating an overlaying info grid. I have written some code for queueing the messages(IpopupMessage) so that each displays a certain amount of ...
2
votes
2answers
222 views

Automatic redrawing in WPF

I would like to re-render my WPF chart control when data source is changed. My minimum requirement for a data source is IEnumerable<Point> but it could be ...
3
votes
2answers
3k views

Window Factory and Manager using MVVM pattern

I am fairly new to Factories and Dependency Injection in MVVM. I've build my View(Window) factory with help from SO, and I would like to know if I had implemented everything properly(code works just ...
4
votes
1answer
1k views

Managing inherited dependency properties in WPF

Exposing Inherited Members I have a WPF Custom Control library (ContentToggleButton) and an app (spec) to test it. The Custom ...
0
votes
1answer
589 views

WPF async ObservableTaskQueue class

I'm currently working on a WPF application, making calls to various web APIs. Thus, I'm looking after a special observable tasks queue: Progress value must be available Tasks (API calls)/seconds must ...
3
votes
1answer
169 views

Managing documents with manager class

So I have a program that visualizes data from files (csv,txt,etc.). These files are saved to database as individual tables. In my application I have DocumentExplorer...
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 ...
6
votes
1answer
108 views

MP3 tag Project in MVVM style

After reading the books "Clean Code" from Robert C. Martin and the "Head First Design Patterns" book from Elisabeth Robson I decided to make a mp3 tag application. I tried to do it in the MVVM style ...
3
votes
1answer
727 views

Trying MVVM on timer app

Check me: Model should do everything. That's where all functionalities and features are accommodated. It has some properties, that I can access and use. ...
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 ...
2
votes
1answer
80 views

Synesthesia for the rest of us (i.e. algorithm for unique string colorization)

I'd like to form an algorithmic connections between a particular string and and a particular color, in such that each unique string is always the same color. My particular use case is for a kiosk ...
4
votes
2answers
698 views

Catching exception inside model

Is it normal to catch exception in concept of MVVM inside model? Or how should it be? How to improve this code? This is simple application that allows user to drop .pfx certificate on the label. <...
6
votes
1answer
11k views

MVVM - ObservableCollection & Entity Framework DbContext

I'm trying to catch WPF using MVVM pattern, where my set of models is implementing ObservableCollection as well as Entity Framework's ...
2
votes
1answer
4k views

WPF controls visibility throught IMultiValueConverter

I have control with RadioButtons. Each RadioButton represent some state of document. Each document have a lot of labels, buttons and another trash. I need to ...
2
votes
2answers
2k views

A list of students using MVVM

Is this a proper MVVM implementation? I copied it off a sample but the source would not open so I have to put stuff in spots? Should I call in different files? My first MVVM and have trouble with the ...
5
votes
5answers
682 views

Shuffles male or females names based on Fisher Yates algorthim

The code below has many Lists<> but I'm not sure how to modify it. The only thing here that is an algorithm is the Fisher Yates shuffle algorithm. I am trying ...
2
votes
0answers
162 views

Keep clean SimpleIoc initialization when reusing UserControl

Originally I had ChildUserControl inside ParentUserControl inside MainWindow with this view-...
5
votes
1answer
4k views

Using Mutex to prevent multiple WPF application launches

I've inherited an existing application which is a WPF implementation of toast notifications. This application is installed to multiple client PCs across the estate and, once installed, runs in the ...
2
votes
1answer
2k views

Invoke model logic in one UserControl from view-model in another UserControl without violating MVVM

I am developing WPF application keeping MVVM and using Prism. Here is simplified scheme: I need to invoke model logic in UserControlResult when executing command ...
2
votes
1answer
329 views

PDF conversion and timestamp tool

Since the last post, I have ported it to WPF (semi-MVVM) and added support for Excel and PowerPoint files, and custom fields and scripts. The conversion is done by interop with office. Apparently ...
3
votes
1answer
376 views

WPF object model control with singleton and static messenger? ConditionalWeakTable?

As always first I have to say that I'm an amateur and not native English speaker, so please have a little patience if I write nonsense ;) I've worked as an accountant for more than 10 years and since ...
4
votes
1answer
275 views

ViewModel base class supporting property notification, error notification and property value history

I've created a general purpose ViewModel base class in what I believe it's purest behaviour. It features property notification, error notification and property value history. Please take a look at it ...
6
votes
2answers
2k views

ListBox with a dynamic number of TextBox elements

I am making a kind of form, and I want the user to be able to enter a dynamic number of string inputs. The idea is that a single TextBox will be displayed, and once ...
2
votes
1answer
1k views

WPF Mvvm async function ViewModel

I worried about this code in a ViewModel. ViewModel should not contain any code except binding's. But without async update the ui would freeze. How do I improve it? I'm restricted to using .net 3.5 or ...
3
votes
0answers
349 views

WPF Prism DelegateCommand Setup

I am currently in the process of learning WPF Prism and I have four buttons that I want to all go to the same place but with a different value being passed depending on which button has been pressed. ...
5
votes
1answer
5k views

Find a value in a comma delimited String

Here is a simple WPF converter method designed, where the object is a string, and the parameters are a string, which contain a set of comma separated values. The program return true if the list has ...
2
votes
1answer
3k views

WPF: Model to View Model data binding to implement Two Step View

I am trying to use Two Step View pattern in WPF. The problem is about keeping things in sync – I need a way to data-bind models to view models. Are there any good existing solutions? My approach is to ...
4
votes
1answer
96 views

Many similar ViewModel methods to fetch and prepare model data

I have a MVVM application that fetches data from active directory and displays it in a DataGrid. The exact data displayed is determined by which query a user runs, ...
4
votes
1answer
1k views

Active Directory Tool - Wpf application to query active directory and display results 2 (UI)

This is an update from here. I have made some changes, and have decided to only include the UI side of things in this particular question. I wanted to make the application follow the MVVM pattern, but ...
3
votes
1answer
1k views

CollectionViewSource Filter trigger for multiple controls

I have some markup: ...
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 ...
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 ...
4
votes
2answers
126 views

Code Explorer UI

The third post in the Code Explorer series is about the UI and main VM. This is the XAML, except a few hundred lines of styling: ...
2
votes
1answer
126 views

Weaving through the MIST

Original post here: MIST - auto-implemented, attribute-driven .NET notification mechanism I've developed (and use) an IL "weaving" solution for auto-implementing property change notification in ....
8
votes
3answers
683 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 ...
1
vote
1answer
347 views

Slow Filtering Method on DataGrid

Sometime ago I asked a question regarding a slow Filtering method for my DataGrid. Months later and I have a relatively quick method, though I am still looking to ...
2
votes
2answers
5k views

C# SerialPort implementation

I'm writing a C# WPF project built with a MVVM pattern. This software is written to use a medical diagnostic device, so in our planning it will be certified IEC 62304. Since I've been mainly writing ...
2
votes
1answer
7k views

WPF/MVVM with Entity Framework, Repository and Unit of Work pattern

I'm building WPF/MVVM application and I'm struggling implementing Unit of work pattern. The part, about which I'm not sure is UnitOfWork class. Here is my thought: ...
8
votes
1answer
989 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 ...
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 ...
3
votes
2answers
949 views

Loading sub items of TreeView in background

I am working with a TreeView (default control from .Net Framework) that displays hierachical data. Data are bound to the view using MVVM pattern with the ...
1
vote
2answers
1k views

Simple Tic Tac Toe

I have written a simple Tic Tac Toe game in WPC C#. I am just a beginner and learning. Could you tell me if there is something wrong with my code / could be done better? I am pretty much satisfied ...
2
votes
0answers
190 views

Extension for BindableBase that can dispose the old value of a property if that property implements IDisposable and is not null

I am interested in hearing opinions on this. I need a way to dispose the old value of a property in a way that's compatible with BindableBase. Specifically, I have ...
6
votes
1answer
233 views

Eraser tool for GIF editor

I am making a GIF editor in C#, and I am currently working on the eraser tool. I am not sure what I can do to make it more efficient, because when I make the thickness (diameter) more than 30 (pixels) ...
3
votes
1answer
1k views

Implementing a filter

I have implemented a filter for filtering a IEnumerable of a specific type. To accomblish this goal i have created three classes: ...
7
votes
1answer
360 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 ...