|
Great stuff Karl. Just commented on it.
|
|
|
|
|
Hi again!
I created a usercontrol with a view virtual methods so I could derive from them and use the standard behaviour where needed.
Now XAML tells me
"Error 1 Partial declarations of 'xxx.View.UserControl1' must not specify different base classes ...\View\UserControl1.xaml.cs 20 26"
Isn't it possible to do it this way? I do use interfaces but wanted to have a predifined behaviour which can be overwritten where needed.
Help would be appreciated!
Thank you in advance
|
|
|
|
|
Oh dear - you've hit a fairly common problem here, and it's to do with the way WPF generates a backing class to actually map your controls in (it's called xxxx.g.cs where xxx is your class). You need to do a bit of work to get round this, and here's[^] a link to an entry you might find useful.
|
|
|
|
|
An answer as fast as lightning!
Thank you for the tip!
|
|
|
|
|
Anybody knows a better way of displaying a 2D text using ModelVisual3D in WPF?
I have used TextBlock, Glyphs and FormattedText but wanted to see if there is a better way to do the same task.
Thanks,
|
|
|
|
|
I normally use a TextBlock inside a <Viewport2DVisual3D.Visual> . For instance:
<Viewport2DVisual3D ...>
<Viewport2DVisual3D.Visual>
<TextBlock Text="This is my text" />
</Viewport2DVisual3D.Visual>
</Viewport2DVisual3D>
|
|
|
|
|
I have 30-40 TextBlocks to display in a grid. When I rotate the grid I need to update the position of these TextBlocks. It takes almost 98-100% CPU time to render 30-40 TextBlocks.
|
|
|
|
|
A rant:
I have been learning WPF and seem to be getting on OK with it other than its extremely steep learning curve and its let's have 30 lines of code where 1 used to do but one thing which is stopping me actually using it in anger is what sort of PCs does it need to run?
On my development PC (dual core / 2GB of RAM) everything runs extremely slowly - I can't run a lot of the more whizzy samples on here (they run but take an age to render and I have to kill them)
Most of my clients have machines which are well below the spec of my dev machine so why would I write WPF apps if they are unable to run it - I certainly couldn't use WPF for anything other than the most basic apps so why bother using it all?
I know if I scrap it and continue with Windows Forms I will soon forget the little WPF I have managed to scrape together but without a good reason for using WPF (ie people can run the apps) then there doesn't seem much point continuing with it.
|
|
|
|
|
Something does not sound right. What sort of applications are you referring to?
I've been doing WPF development since April of 2007 on many computers and laptops with various hardware and have never had an issue.
I have run and developed WPF on XP with 1 GB memory and Pent4 processor with no issues at all.
Granted, rendering 10 spinning bouncing balls in 3D, may start to slow things down a bit, but other than that no performance issues at all.
Also, Visual Studio 2008 SP1, .NET 3.5 SP1 provides very good performance gains in a lot of areas.
Keep at this. WPF is fantastic (yes, a huge learning curve). You'll be glad you did.
modified 27-Feb-21 21:01pm.
|
|
|
|
|
A lot of the whizzier samples on here don't run (or run extremely slowly) on my PC - I hate to pick on Sacha because I have learned a huge amount from his work but my PC really struggles showing some of his WPF samples - the screensaver and the post it notes samples for example.
However, I have noticed just putting together some WPF versions of part of the apps I work on shows a huge performance slowdown.
Here's a link to a small description of my main app
http://www.divelements.com/net/corporate/casestudies/logicbox.aspx[^]
The grid you see in the screen shot is from Xceed - trying to replicate it using the WPF Xceed grid (admittedly the free version for now) means the grid is at least 10 times slower to display and sort etc.
I don't even know how to start putting together a WPF version of the logic screen you see in that screenshot.
I probably will keep trying with WPF I think I just needed to vent. I am the sole developer here and people are getting fed up of me talking what they consider gibberish to them
|
|
|
|
|
Hmmm - sounds like you are having rendering issues, and this is based on the graphics processor. What type of graphics card have you got in there?
|
|
|
|
|
Graphics card is a NVIDIA Qaudro NVS 285 with 1GB of RAM
|
|
|
|
|
Hokay = that should be more than powerful enough. You might want to look at these[^] tools.
|
|
|
|
|
Hi,
This sounds really odd ... the graphics card you mention is totally up to the job. If your finding problems with running some of the demo apps I really don't understand why your seeing problems. Currently I'm running a 7600GS video card with half the RAM you have on a machine with 2GB Fast RAM and a single core 2.6Ghz Athlon and its 100% ok. Before this video card I had a 64Mb ATI powering a 21" CRT at 1600 x 1200 whilst developing WPF ... I had no problems there either!
Are you sure you have the video card setup correctly? Maybe even some BIOS settings need adjusting ... Your video card is probably up to handing HD video editing so WPF should be flying on that card.
I'm currently working on two WPF apps, one is a Client/Server type app for my employer (very much LOB!) and one is a personal project. In my personal app I'm using the Infragistics grid with record sets of over 100,000 ... no performance issues. I've also had this app out to Beta Testers and none of them have reported performance issues either. Obviously, my employer will be stipulating a minimum spec machine for running our app and that only states a 256Mb Video Card is required.
If you give WPF a chance you'll propbably find yourself wondering how you ever did that logic screen in WinForms! Believe!!
|
|
|
|
|
Hi Jammer,
thanks for your reply. It is an odd one - I have checked the graphics card setting and got one of the hardware bods here to look at the settings etc and he seems to believe its set up correctly although I will seek a second opinion. One intersting thing is that Visual Studio 2008 also sometimes crawls to a halt (which 2005 never does) sometimes scrolling through the intellisense lists are like wading through treacle so maybe that's a sign of a more significant malaise.
I will stick with WPF - it would be a shame to slide back down that learning curve, as I said I think I just needed to vent and the people around me at work were getting fed up with me cursing at the screen
It's reassuring to hear that others are having no problems running WPF apps although it does rob me of an excuse
|
|
|
|
|
No problem fella.
I don't see VS2008 doing this either ... it does other weird things tho!
I hazard a guess that you possibly need to refresh that machine. At least uninstalling/reinstalling all VS2008 / .NET 3.5 / Silverlight Betas etc ... and starting again. Although really my vote usually goes with starting at the OS level.
Check video card drivers and make sure you have the latest. With the best will in the world business machine hardware bods don't always know the ins and outs of things like setting up video cards etc ... have a read online and see if anyone is having problems with that card. That said, it doesn't sound like its the card at fault here. It may also get as drastic as needing firmware updates ... there maybe a new motherboard BIOS for instance. Does the video glitch with anything else?
What order did you install things btw? That can make a difference.
|
|
|
|
|
Hmmm, I might just get a new PC - I will have a look at the Video Card settings though and clear down a few things and see what happens. Thanks for your help.
|
|
|
|
|
Hello World!
I want to learning wpf, what I do for this? ...
Tanx World ...
if(Human.live)
{
Human.peaceful = false;
while(true)
{
Human.love(Human girl, Human Boy);
}
}
|
|
|
|
|
Read Google!
Cheers,
World
|
|
|
|
|
You will need the right version of the .NET framework, a suitable version of Visual Studio or one of the express editions and to buy some books.
|
|
|
|
|
If youre already familiar with .NET, it's enough to read some articles here on CP.. It just takes a bit longer then.
|
|
|
|
|
I would really get some books. They are a big help (as long as they are the right ones).
|
|
|
|
|
In the code of a WPF custom control, I am updating Property1 in the Set{}
of another Property2(i.e. when another property changes). the Property1 is updated properly, but the updated value is not diaplayed in the Property Dialog Box of Visual studio. How can I get the updated value diaplyed in Property dialog box.
<br />
public string ControlID<br />
{<br />
get<br />
{<br />
return controlid;<br />
}<br />
set<br />
{<br />
controlid = value;<br />
Propertytoupdate = value;
<br />
}<br />
}<br />
|
|
|
|
|
One thing you need to do is implement INotifyPropertyChanged, and have the change notification raised when the property changes.
|
|
|
|
|
help to create a seprate dlls ?
|
|
|
|