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

learn more… | top users | synonyms

0
votes
0answers
12 views

WPF DateTimePicker user control

I've created a UserControl that should act as a control inside a Window: XAML: ...
2
votes
0answers
41 views

WPF MVVM Dialog with Prism, MahApps.Metro

I am building a Metro-themed WPF application with MVVM approach using Prism and MahApps.Metro. I have to show a custom dialog from view model. Currently, I am using ...
1
vote
2answers
53 views

FileSystemWatcher created event

I wrote a little function that monitors some directories. If a file gets created, it will check in the extension list for a match. Can you please tell me if I could make my function better in any way? ...
5
votes
2answers
45 views

Resx Translation Helper, V.2.0 Remove Files Window

Related to Resx Translation Helper, V.2.0 This is the code for the Remove Files window. I was able to keep code out of the code-behind here, but I have a feeling I botched something else. ...
7
votes
1answer
61 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. ...
10
votes
4answers
220 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 ...
5
votes
6answers
201 views

Speech Synthesis to showcase how various voices sound with System.Speech.Synthesis

I was wondering if you would be willing to give me some suggestions on shortening this code. I feel as if the amount of if statements I have is a bit much. ...
2
votes
1answer
79 views

WPF Data binding alternate datacontext inside Itemscontrol

What I'm trying to do is bind the controls generated by a ItemsControl.ItemTemplate to a new instance of my ContactInterface ...
11
votes
1answer
105 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 ...
3
votes
1answer
152 views

Swapping Tab Order

The code I have below swaps two tabs around. This is done through creating an array, deleting all tabs and then recreating them which seems very inefficient to me. ...
10
votes
2answers
177 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: ...
5
votes
2answers
128 views

Display nested objects through custom displayers in WPF

First off, I am very new to WPF. These are the objects I want to display: ...
6
votes
2answers
426 views

Writing an IRC Bot from scratch

I have been learning C# for a couple years now, and using small projects to help myself learn. My most recent project is a complete rewrite of my first C# project that just got out of hand (the old ...
2
votes
1answer
115 views

C# Async and DataContext access

I'm using a DataContext to insert an object. Currently it's working, but I'm feeling things could be done better. Method is called from UI (Using Caliburn Micro Binding). IsBusy is a property used by ...
5
votes
1answer
100 views

WPF application depending on large file

I've got a quite simple WPF application, trying to implement a correct MVVM pattern. The application in itself is simple: one listItem and one textbox + button for searching. On init, the entire ...
11
votes
2answers
571 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 ...
4
votes
1answer
531 views

Insert String array as label content in datagrid row through radio button

I have written some code for inserting a label at runtime that has its content set to a string array into a datagrid row. All of this will initiate when certain radio buttons are checked. The code is ...
3
votes
1answer
182 views

Controlling a Windows Service from a WPF app

I have a WPF Control Panel app, where I'm trying to stay close to an MVVM architecture. The control panel (the "the CP") is for a WCF service ("the Scheduler"), hosted in a Windows Service ("the ...
4
votes
2answers
77 views

TabController for handling opening and closing of tabs

I created a class TabController to handle opening and closing of tabs. It needs some data from my viewModel, so should I pass in ...
1
vote
1answer
112 views

Wrapper classes for objects returned by 3rd party APIs

I am building a WPF application which uses a third party library to fetch objects which I want to allow the user to interact with. The objects are returned as interface types. Am I right in thinking ...
3
votes
1answer
54 views

Convertors converting unconverted objects

In my app, I have several convertors, like these two: ...
0
votes
1answer
29 views

Prefered Style Container for the Components in the DataTemplate

The following XAML is a close (tidied up) version of what I have use in my WPF application. If you have noticed there are two Styles applied to the same component ...
4
votes
1answer
147 views

Show dialog only once. Other calls should bring dialog to front, but otherwise not have a result

This code works, as far as I can tell, but there's something that just feels wrong about it. The intended flow is like this: If no dialog is showing Show dialog, return result else Move dialog ...
1
vote
1answer
223 views

Asynchronous method and collection binding

I have a WPF application, in which I'd like to bind a collection to a combobox using an asynchronous method : ...
5
votes
2answers
64 views

The cycle continues - VM's part 4

So, this is my refactored VM: ...
3
votes
1answer
43 views

Reducing repetition of sequence-like properties

I have a class that is a wrapper for memory positions of a hardware device. I need to data-bind each of this positions, so I created a class with hardcoded properties, one for each position, so that ...
1
vote
1answer
63 views

Using a DependencyProperty ChangedCallback as a validation measure

I have an UserControl where I declare two DependencyProperties ...
6
votes
1answer
60 views

Go Back with More Detail

I have a Back function, and it is growing. I also think this is terrible, but I don't seem to get how it can be improved: ...
2
votes
2answers
132 views

Viewmodel has lots of properties which bind to view [closed]

I created a configuration View. so it binds a lot of properties in Viewmodel. But I have a another class People and I want to ...
2
votes
2answers
142 views

Finding the shortest path through a 2d space with a display

I decided to implement most of the reddit Daily Programmer space probe challenge. My program creates a 2D space that have asteroids and gravity wells distributed (the percentage of gravity wells and ...
2
votes
1answer
125 views

Creating automatic resizing of subelements in WPF

I currently have this code: ...
4
votes
1answer
521 views

From event handler to command: on my way to MVVM

I have a WPF C# application that I want to move to a MVVM pattern. My first step is to remove the button click handlers from the code behind of the UI. I've found some examples online and then ...
2
votes
1answer
46 views

Detecting the attachment of a DataContext

In our application the views and the viewmodels are created in parallel to increase the performance and when the viewmodel is created it is attached to the datacontext. While there is no datacontext ...
5
votes
1answer
81 views

Handle Settings in Windows App

So, I fixed my problem with a public ViewModel for my MainPage like this: MainPage.xaml.cs: ...
3
votes
2answers
369 views

Wiring CollectionView and grouping it without slowing it down

In my previous question, I got heaps of good advice BUT no solution for the problem apposed. I applied the valuable learnings from the past on this.question and am also hitting it from a different ...
1
vote
1answer
303 views

Image cache for lots of images using WeakReference on C#

I'm developing an application to manage a player card-library from an online game. Each card has an image that is stored on disk with a numeric code, for example, the card with ID=1234 has his image ...
6
votes
2answers
142 views

Is my Delegate defined the right way and does it need to transform to a pretty Event butterfly?

I have read so many bed time stories and ins and outs of how delegates work and why events are to be replaced with delegates (surely not all the time) and just couldn't get my head around it. I am ...
4
votes
2answers
106 views

MVVM, Navigation, and More - Part 3

This is actually a second follow-up to Correct MVVM format, but I have made different changes. This is my ViewModel.cs class for my MainPage.xaml: ...
4
votes
1answer
126 views

Correct MVVM format

I have a Windows-Runtime app (very similar to WPF), and I am using (at least I think I am!) the MVVM style. I want to make sure I am doing this the proper way, and not just a working way. This is my ...
4
votes
1answer
105 views

Reacting to Boolean state in reactive ViewModels

When this ViewModel loads we kick off the IsAuthenticatedCommand: If the result of ...
5
votes
1answer
1k views

MahApps login dialog in splash screen with Caliburn Micro

We are working on an application with a splash screen. After a few seconds/loading all the data, a login dialog appears inside the splash screen, asking you to enter username and password. Think of a ...
4
votes
1answer
810 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 ...
8
votes
2answers
1k 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 ...
6
votes
3answers
1k 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 ...
32
votes
2answers
2k 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 ...
3
votes
2answers
57 views

Creating list ViewModels in the correct way

I'm using Caliburn Micro to create a WPF application. So what I want to do here is a typical Master/Detail situation. I'm displaying a list of Users and you can can add/edit a User and save the ...
2
votes
1answer
601 views

Saving a collection of WPF user control layout into an XPS document

I am making an application to save a layout of user control into an .xps document. But, the export doesn't seem completed if the data is too many. I've tried to encapsulate each part with ...
4
votes
1answer
266 views

Checkbox binding to change the ListView's items source

I am using a checkbox to filter some components on my ListView by changing the variable's content which is bound to this ...
4
votes
1answer
264 views

Factory pattern with controls

I've created factory to create WPF controls. I have string with control name and I map it to enum. I think it's bad implementation of factory pattern. So please show me where I've made mistake. Main ...
5
votes
1answer
428 views

Implementing ShowDialog() style functionality without disabling any other windows

I need a simple prompt window to ask the user to do something with an OK/Cancel return. But I also need all Windows to remain functional, so a xx.ShowDialog isn't appropriate. This is my attempt. ...