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
48 views

Fixing Medical Claim Files through Text File Read/Write v3

This is another review on a program I've asked about before, now translated from VBA into C#. I'm sure I've brought over a lot of bad habits with me, so I'm spotlighting some key areas I'd love open-...
4
votes
0answers
89 views

WPF/C# - Rock, Paper, Scissors Game

I have made my first little project using C#/WPF - a simple rock, paper, scissors game. I am happy with the functionality and look but I would love to know how a more experienced programmer would ...
0
votes
0answers
21 views

Style that Animates Button Opacity

I have a Style for a Button which: Animates the Opacity when the IsMouseOver property is <...
4
votes
0answers
31 views

WPF Custom Control with a Single ObservableCollection DependencyProperty

I'm learning how to write WPF custom controls. My example, NameLister, exposes a single DependencyProperty, Names, of type ...
3
votes
1answer
61 views

WPF Extension to directly inject dependencies in the Window constructor

I just finished writing the core for my WPF application and because I'm still a very beginner at software design I wanted to get some feedback about the design decisions I've made. I've uploaded ...
3
votes
3answers
4k views

Delayed dispatcher invoke

I knocked this up quickly to allow delayed Invoke on the dispatcher. Along with canceling the existing invocation and replacing with a new one, this allows ...
2
votes
0answers
47 views

Is this an acceptable MVVM Model with IEditableObject implementation?

I'm trying to follow MVVM pattern in a VB.net WPF application, and I would like to implement IEditableObject. Is this code acceptable for an MVVM application? In ...
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 ...
4
votes
1answer
78 views

More Efficient Way To Search On-Demand

I need better logic that would allow this search to perform quicker and more efficiently. In XAML, I have a DataGrid and a ...
6
votes
1answer
121 views

WPF MVVM ColorLister with navigation

By hashing together various online tutorials I've constructed my first MVVM application that lets users navigate between "tabs" and a "tab" (ColorList_Tab) that performs basic list functions such as ...
3
votes
2answers
63 views

Static global settings class with serializing

I have a class that is used for serializing and deserializing global application variables. I would like to know if there is anything that I can improve. I know I could inject a dependency to support ...
4
votes
2answers
871 views

Custom UIElement Animations

Having fancy animations in WPF is quite nice so I tried to implement a generic fading animation for UIElements which I use for the Popups in my application. I was ...
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 ...
2
votes
2answers
845 views

Handling FTP exceptions like no internet etc

I'm currently working in a project where the user needs to log in and after that I will check if the directory /cloud/user/Projects exists and if it doesn't, I will create them. The code works, ...
5
votes
1answer
159 views

TreeView class in WPF class

We are converting a WinForms application to WPF. so I need to accept the input like WinForms. As I don't want to change the logic of it. Ao I write the class for those its works. But the is not good ...
4
votes
2answers
86 views

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

My application needs to let the user select a folder from somewhere on their local machine. Below are the interface and model pair that I have written to let the user do so. ...
10
votes
2answers
968 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 ...
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'...
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 ...
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 ...
4
votes
1answer
104 views

Making Dependency Property registration strongly typed v2

This is my second attempt to create a strongly typed builder for the Dependency Property. I've improved the two main weaknesses of the previous version which were: Can specify only ...
5
votes
1answer
203 views

WPF Palindrome Checker Application

I made a WPF Application, called Palindrome Checker, which checks if what you input is a palindrome. Any and all tips on how to make this code better in all capacities are wanted and appreciated. <...
3
votes
0answers
176 views

Object pooling in WPF

In a WPF project I'm working on, often multiple objects reuse the same AnimationTimeline, to smooth that out I made an ...
4
votes
1answer
155 views

Factorial calculation UI freezes on loading many items in ListBox

I've been experiencing this performance issue for about 3 days and really need your help. I'm a novice at c# and cannot understand what I can do to optimize my application. The problem is that the UI ...
-1
votes
1answer
38 views

Is attempt like this, when using Application class, breaking MVVM pattern? [closed]

In my application I am using two view models. MainViewModel if fiered when MianWindow is initialized. And UpdateViewModel is fiered when UpdateWindow is initialized. The update VM is supposed to use ...
1
vote
1answer
118 views

Simple Desktop Calculator with WPF

I have developed this simple desktop calculator with WPF. Just wondering, what do you guys think of my coding style of this side project and any code refactoring needed to reduce repeat code? ...
1
vote
0answers
57 views

Chaining asynchronous calls to update UI [closed]

In an app the UI is updated from different threads. To queue this, I have created a utility class ...
5
votes
2answers
454 views

Simple calculator in C# WPF

I'm beginning to learn WPF and wanted to do a quick exercise. The code is as simple as it gets but I tried to evaluate each and every possible edge case. Any improvement is welcome, thanks. C#: <...
3
votes
1answer
2k views

Add controls to a canvas and scale their measures relative to it

I have some code which adds components to a canvas at runtime, WPF application. The user enters some values which translate to the amount of controls to be added and where. There is one canvas which ...
3
votes
2answers
5k views

Creating automatic resizing of subelements in WPF

I currently have this code: ...
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 ...
1
vote
0answers
31 views

Simple Data Entry Application in WPF xaml UI

I made a simple data entry application in WPF MVVM and was just hoping for some input as I am pretty new to WPF . I have done the same application using winforms. Now I have recreated the same ...
3
votes
2answers
161 views

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

I was searching for a long time how to write multi-page TIFFs with the JPEG encoding. TIFFs support JPEG encoded frames but the built-in encoder in .NET Framework does not have JPEG as a compression ...
2
votes
0answers
399 views

MVVM Databinding, Commands, Async - MVVM.Light [closed]

I'm new to C#, WPF and MVVM and I don't want to make common mistakes right from the beginning and get used to them. I already read some similar questions on best practices for WPF/MVVM but none of ...
1
vote
0answers
331 views

Setting the Owner property on a modal dialog in WPF/MVVM using a Func

I'm looking to solve the problem of setting the Owner property on modal dialogs in WPF, while using IoC and MVVM patterns. I've seen (and written) all sorts of ...
2
votes
1answer
376 views

Vertical WPF icon button that uses Segoe MDL2 font for icon

This is a button that changes text and icon according to a Boolean state. for example, a play / pause button or a connect / disconnect button. The icon uses Segoe MDL2 Assets as the default font, but ...
2
votes
1answer
206 views

WPF Content Navigation and Button management

I have been working on my first ever C# project and I'd love some feedback of the any and all aspects variety. I am building a game called Fleet Command. In the ...
2
votes
1answer
10k views

Performance of WPF datagrid when using DataGridTemplateColumn

I am using DataGrid to show storagehouse occupancy (Occupied-Show Image With a box, Not Occupied-Show Empty Image). In DataGrid I am using ...
4
votes
0answers
4k views

WPF CustomControl Image Button that changes with state and does not use ControlTemplate

Note: See Verticle WPF icon button that used Segoe MDL2 font for icon for an example using Segoe MDL2 for the icons. I need a button that changes appearance based on the state of a Boolean. A ...
3
votes
1answer
162 views

Processing a large list of strings

I am working on an application in C# WPF which reads a large file containing a number of HL7 formatted reports. My application takes in the file, reads and extracts any lines that starts with OBX and ...
1
vote
1answer
197 views

Addition Program using wpf through MVVM

I'm new to MVVM and WPF. Please suggest whether this is okay or I need to correct my understanding of MVVM which I confess is very limited as at the moment. I have created a simple addition ...
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 ...
1
vote
1answer
81 views

Parsing displayed month/year for calendar

I have a 6 x 7 grid for a calendar = 42 DateTimes. I'm trying to display the displayed month/year at the top of the calendar. If there are 3 months displayed, I ...
5
votes
2answers
9k views

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

Suppose you just want to set border radius for different controls: Button TextBox ComboBox ...
3
votes
1answer
197 views

Snake Game Library for WPF

Recently, I had a sick leave and to had some fun and improve coding skills I got a challenge to write a Snake Game for WPF. Desired RESULT 1) Game must be in separate .dll library; 2) Must have ...
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 ...
1
vote
1answer
295 views

MVVMLight Toolkit Data Binding Technique

I'm simulating my real-world application by using a really simple demo app here, but it has the same concept. The question is MVVM Light Toolkit specific, as the ...
5
votes
1answer
246 views

Accessing View from ViewModel

Having a view (grid control) that provides some functionallity via methods (primary SerializeView / DeserializeView) that should be called from the view model which is bound to the view. One point to ...
2
votes
1answer
88 views

Event based input files management system

I'm currently making a system that can accept different sorts of files and some classes are interested only in specific types of files, while some don't discriminate at all. Note Type of file isn't ...
-1
votes
1answer
68 views

Model Exposure with MVVM [closed]

I have been starting to learn MVVM to give my WPF projects better structure. I have to sample classes, DeviceModel and ...