Windows Presentation Foundation (WPF) is part of the Microsoft .NET framework used to create rich client user experiences for Windows application.
0
votes
1answer
40 views
First C#/WPF Application - Need review/critique [closed]
I have been a PHP/javascript developer for as long as I can remember, and having gotten a job recently in a corporate environment, I want to move some scripts I've written to a more widely supported ...
0
votes
1answer
37 views
WPF Localisation - using resx
I have a small WPF application which I'm not exactly localizing, but not hard-coding resources either. I know WPF doesn't use .resx files for that purpose, but I exposed the resource strings as public ...
1
vote
1answer
240 views
WPF circle and line drawer solution
I've created a WPF program which can draw lines and circles on a canvas. It works well, but I don't think it's the best solution. How can I make it work better? How would you create this program?
...
4
votes
1answer
174 views
Can this reactive code be improved?
I have a view model that I'm migrating to RxUI. It exposes a collection of brokers along with a bool indicating whether there is a market (ie. at least one broker). In addition, it has a property for ...
5
votes
1answer
296 views
WPF Single Instance Best Practices
This is the code I implemented so far to create a single instance WPF application:
#region Using Directives
using System;
using System.Globalization;
using System.Reflection;
using System.Threading;
...
0
votes
1answer
658 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 DataGridTemplateColumn to override the Images.
My Main Form ...
8
votes
1answer
277 views
Does my code conform to modern conventions?
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 ...
2
votes
2answers
297 views
MVVM notification messages
I have been looking at a couple of different approaches on how I can notify the UI about messages coming from the ViewModel, and wanted to see if this seemed appropriate or if it is too coupled. (We ...
3
votes
1answer
477 views
improve code for delayed dispatcher invoke
I knocked this up quickly to allow delayed Invoke on the dispacther, along with canceling the existing invocation and replacing with a new one, this allows throttling an action.
public static class ...
2
votes
1answer
287 views
C# based IRC application (with WPF as UI)
I would like to know how I could improve my C# project. I'm not really sure whether or not I'm allowed to just post a link to the Google Code project here, so sorry if it's not allowed, I'll edit my ...
4
votes
2answers
319 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 ...
2
votes
2answers
241 views
Continues If statements
I have a program where it takes the students name and last name and score and saves it. When checking to see if a textbox has information in it, I use ALOT of If statements. Is there a cleaner way to ...
1
vote
1answer
113 views
Putting items next to each other
So I want to put some text next to it's lable.
(both of which are text blocks - which are faster than lables as I understand it)
The best way i've found for doing this is a strack panel.
So I have, ...
2
votes
1answer
687 views
Image Proccessing Optmization?
I'm using Winforms C# .net 3.5.
I'm getting frames and this is hiwo i handle them:
delegate void videoStream_NewFrameDelegate(object sender, NewFrameEventArgs eventArgs);
public void ...
2
votes
1answer
1k views
Helper methods for working with the WPF Dispatcher
I've written the following small helper class for use in my WPF applications. It comes up from time to time that I need to display message boxes, or otherwise interact with the UI from a non UI ...
1
vote
1answer
227 views
How can I improve this code about categories and subcategories?
This is the the code what I'm using. I'm working on LINQ TO SQL and I'm using this model in my program:
...
1
vote
1answer
271 views
Can someone help me to improve this code?
Here is the project which currently I'm working.
http://www.megaupload.com/?d=NGJWS9C3
Sorry guys if the code is a mess. I'm a beginner, I'm still learning from you, and for that reason, I need a ...
-1
votes
2answers
199 views
Can you help to improve this code?
PLEASE, READ THE EDIT PART
I guess I might use delegates. But I'm not certain if I can apply for it.
private int[] Generate_Fraction(int li1, int ls1, int li2, int ls2)
{
int ...
4
votes
1answer
521 views
Trying to un-hack this DataTemplateSelector
I'm trying to emulate the default behavior of an ItemsControl in a ContentControl--Bind Content to an object property and use the correct DataTemplate based on that object's type.
I've tried to ...
5
votes
1answer
507 views
Request of Code Review of my first WPF MVVM attempt
I needed to write code in WPF for a client. The application is done with prism (not my decision, they already had people working on it), so I got a sparkling clean new module to work in. Since this ...
4
votes
2answers
924 views
WPF MVVM confusion
I have been trying to wrap my head around mvvm for the last week or more and still struggling a bit. I have watched Jason Dolingers MVVM video and gone through Reed Copsey lessons and still find ...
2
votes
1answer
368 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 wondering if there was anything wrong ...
5
votes
1answer
253 views
Refactor code for usability
I need help to refactor my code. I usually had a hard time figuring out how to make my code reusable.
I have an XML file that hold the data for each Tag element. Tag element should have child nodes ...
12
votes
5answers
6k 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 ...
6
votes
2answers
1k 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, ...