|
Can you offload any of the work to a Background Worker thread?
|
|
|
|
|
My searches are coming back with limited results, so I thought I would ask the question directly.
What's best in terms of components (DataGrid) or even framework (WPF) to use to develop a Windows desktop application the UI of which is primarily going to consist of two read-only data grids which needs to be updated in real time with data coming in from serial ports at a 10Hz rate?
Thanks in advance.
Siraj.
Siraj Podikunju
SP Consulting, Inc.
sirajp@spconsult.com
|
|
|
|
|
Try WPF. The new .Net 3.5 SP1 improves WPF performance.
|
|
|
|
|
I'm trying to force the aero appearance in a wpf form. My app.xaml file looks like this:
<Application x:Class="AnagramsWPF.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="Window1.xaml">
<Application.Resources>
<ResourceDictionary Source="/PresentationFramework.Aero;component/themes/aero.normalcolor.xaml" />
</Application.Resources>
</Application>
When I run the app under the debugger, it runs fine, but if I run it without the debugger, it throws this exception:
'/PresentationFramework.Aero;component/themes/aero.normalcolor.xaml' value cannot be assigned to property 'Source' of object 'System.Windows.ResourceDictionary'. Could not load file or assembly 'PresentationFramework.Aero, Culture=neutral' or one of its dependencies. The system cannot find the file specified. Error at object 'System.Windows.ResourceDictionary' in markup file 'AnagramsWPF;component/app.xaml' Line 6 Position 29.
I have no earthly clue how to fix it. Can anyone help?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Change it to
<ResourceDictionary Source="/PresentationFramework.Aero,
Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35,
ProcessorArchitecture=MSIL;component/themes/aero.normalcolor.xaml" />
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
That makes it fail under debug as well.
'Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, ProcessorArchitecture=MSIL;component/themes/aero.normalcolor.xaml' value cannot be assigned to property 'Source' of object 'System.Windows.ResourceDictionary'. Cannot locate resource 'version=3.0.0.0,%20culture=neutral,%20publickeytoken=31bf3856ad364e35,%20processorarchitecture=msil;component/themes/aero.normalcolor.xaml'. Error at object 'System.Windows.ResourceDictionary' in markup file 'AnagramsWPF;component/app.xaml' Line 6 Position 29.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Sorry - I should have put it in as
<ResourceDictionary Source="/PresentationFramework.Luna;V3.0.0.0;31bf3856ad364e35;
component\themes/luna.normalcolor.xaml" />
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
That was it. Thanks.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
No bother. Glad to help.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Weren't you just ranting about how much you hate WPF and yet you are using it? What's up with that? Just wondering
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
Help humanity, join the CodeProject grid computing team here
|
|
|
|
|
WPF, in my opinion, is one of the greatest technologies in software development. Period! I am working on a project now that would have taken me eons with MFC. With C# and WPF, it is a breeze - and the power is amazing.
|
|
|
|
|
BlitzPackage wrote: WPF, in my opinion, is one of the greatest technologies in software development.
I'm willing to bet that you haven't even been a programmer for more than just a few years (if that)... The people that "don't get it" (like me) have been programming since long before Microsoft even existed.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Actually, my apologies if I offended.
Indeed, my comment is meant to communicate my effusive assessment of WPF.
However, you are right that I am new to programming. I actually started with C++, moved to Visual C++, then to C# and WPF. I am self-taught and have been toying around with all of this since around 1999 or so. I just started developing my own software app about a year ago in WPF.
At any rate, I hope you find solutions to your challenges.
Cheers,
Blitz
|
|
|
|
|
Since when do you have to like a given programming "technology" to code in it? I don't like .Net either, but I'm coding in it. I'm "using" WPF because my job requires it. Believe me - if it didn't, I certainly wouldn't.
In this particular case, the functionality I'm trying to implement was possible in WinForms in about a dozen lines of code, taking about 15 minutes, including the research into how to do it. In WPF, it has so far taken me two days and required four times as much code. Tell me how that's "better than WinForms".
In our particular project, there is simply *no need* for the added complexity and hassles imposed by WPF, and that annoys me to no end.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Is there any way to customize the look and feel of the IME candidate window with WPF? Can this be done without writing our own custom TextBox-like control? Any pointers would be extremely helpful!
|
|
|
|
|
Hi All,
I'm having a few trouble with Callbacks in this scenario. I have developed a prototype service that, in true time honored fashion, works on my machine!!! But now I'm running on my dev desktop at work and I get this error on startup of the service:
"A user callback threw an exception. Check the exception stack and inner exception to determine the callback that failed."
I do use a callback contract in the service but I think the real issue is the lack of credentials on the service host.
I'm creating the servicehost, behaviours and endpoints all in C# code, not in config.
Does anyone have any pointers as to how to provide these credentials to the service host to get this service functioning in a more secure environment?
Cheers,
|
|
|
|
|
Try just setting the credentials of the service to run under the account that you need.
|
|
|
|
|
You know what ... I drove home from the office just after posting that and had the exact same thought. I'd left out the credentials on the ServiceBase object ... it's got nothing to do with the Wcf component and everything to do with the ServiceBase it's running in.
Thanks chap.
|
|
|
|
|
Hi Ray,
I have now configured the Windows Service to run on my machine account (I am a local admin) so I should have full access.
Using these credentials the service now installs correctly but I'm still see this same error.
"A user callback threw an exception. Check the exception stack and inner exception to determine the callback that failed."
Should I be setting these credentials on the Wcf ServiceHost object as well as the host Windows ServiceProcessInstaller?
Cheers,
|
|
|
|
|
|
I can't actually see the exception stack at the moment as I've just knocked up a quick WinService to see how things work, never worked with Windows Services before so its all new territory, including how to properly debug in this scenario.
Do you have any tips on that front?
Off to read the article, many thanks.
|
|
|
|
|
Debugging a service usually involves you attaching to the service via Visual Studio (the key combo is Ctrl + Alt + K) then pick the service name from the list of processes.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Gotcha, thanks Pete ... will try this.
|
|
|
|
|
Debugging windows services can be trickey:
http://msdn.microsoft.com/en-us/library/7a50syb3(VS.80).aspx[^]
http://www.codeproject.com/KB/dotnet/DebugWinServices.aspx[^]
Remember that as a service you are running under a completely different user account so you need to watch the privileges on that account to ensure that it has access to everything you need. Most people, if they need different accesses, create a specific service account that gets created to run the service under rather than adjusting the default account privileges.
Start putting some try\catch blocks in your code to see what is happening where and work from there.
|
|
|
|
|
I'm going to play more with this, but my initial thought was to try running the Wcf service without any http endpoints or mex addresses ...
I did this and I still get the callback exception. Even though I'm no long registering an http endpoint (listener).
Or am I getting the wrong end of the stick and this is actually referring to my Contract Namespace ???
|
|
|
|