Top 10 WPF resources

As a minor intermission while I put a bit more effort into the WPF article series, I thought I’d list my top 10 favourite WPF and .NET tools.

Ok, here goes!

  1. The amazing free resource that is MSDN
    For top quality articles and all the WPF information you can eat, there is no better place than MSDN (Except of course this blog ;))
  2. A List WPF Bloggers
    There’s always tons of useful WPF and .Net goodies on the WPF Blogosphere – Check out big names like Rob Relyea , Karl Shifflett, Andrew Smith, Josh Smith, Tim Sneath, Ashish Shetty, Adam Nathan, Chris Anderson, Greg Schechter, Nathan Dunlap and Bea Costa are but a few of my favourites. Many of these guys have great WPF books out on the shelves, and their blogrolls are well worth checking out.
  3. Direct access to the SDK team
    Yes, the WPF SDK team are online, and you can comment on the articles and entries directly on the SDK teams blog!
  4. Expression Blend
    Ok, you can use VisualStudio to edit your UX, but seriously, VS can’t compete with Blend. Download, Learn It, USE IT.
  5. Visual Studio 2008
    By the same token, you can edit code in blend, but you’d have to be a serious masochist. Get hold of VS2008, nothing else comes close. Be amazed at the new feature sets this coding powerhouse gives you. Buy It, Learn It, USE IT with BLEND!
  6. Content Presenters free video resources
    They’re big, they’re excellent quality, and best of all, they’re free!
    Download them and watch them now!
  7. Snoop, Mole and XamlPadX, Kaxaml
    Four absolutely must have tools for helping with the WPF coding experience. While Devstudio does most things, you just cant do without these fantastic four.
  8. The WPF Forums on MSDN
    Absolutely the best place to get your questions answered, and a huge archive of previously solved problems. Before posting remember to search the forum.. most questions have been well covered before!
  9. The Daddy of all WPF sites, WindowsClient.Net
    what doesn’t this site contain. Nothing that’s what. If its not here, you probably don’t need it. ( Even my blog’s on here. Ok, I lied.)
  10. Finally, Nukeation
    Great content (although sometimes corny dialog!) but plenty to digest, and available as podcasts too. Nice job!

 

Well, that filled a little gap for me, while i think about the amount of content i’m going to have to come up with for the next WPF article! <sigh>!

 

Enjoy!

Rob

Posted in General | 2 Comments

FREE WPF Tutorials – Starting with how to restyle the default WPF controls

I thought I’d posted enough light-weight topics lately, so to create a bit of solid tutorial content I though I’d start a series of tutorials / articles on how to re-style the standard controls available with WPF, using expression blend. I’ve been asked a couple of times to do a starter tutorial, but never really had the time. So, with a bit of effort, here’s the first tutorial using Expression Blend and whilst you can create controls in Visual studio, it doesn’t offer anywhere near the same visual experience that blend does.

I know there are tutorials for these subjects available elsewhere, such as codeproject.com but the ones I’ve seen only show a rough outline of the process used to create a button, and then they don’t really cover the details in any depth to give the creator an understanding of what they’ve just done, or how to best use the tools available.

While I’ll repeat the Vista button, I’ll also include details of how to organise your project, keep your styles and templates organised, and other useful tips that you don’t usually get on trivial demonstration projects. It’s always easy to organise your work when there are only 3 files involved! I’ll also explain some of the WPF terminology as we come across it, so if you’re not a complete n00b at WPF, please bear with me. I won’t repeat any of the initial explanations after this first piece.

Here’s A brief outline of where I’m heading with this series.

    1. Button styling
    2. Simple animations,and triggers
    3. Checkbox styling
    4. Expander styling
    5. ListView re-styling
    6. Data Templates and bindings
    7. Skinning

I’ll approach the button first since its a pretty simple control with few options, and creating the templates for buttons is well supported in blend. This will give a good grounding in how blend operates, some of its shortcuts and features, and some gotcha’s that caught me out when I was figuring this stuff out for the first time.

Although these articles can be used in isolation I do have to assume that the reader does have some background in C# and the .Net framework, but for the first few articles, we’ll barely touch the code behind files, or the XAML source we’ll be creating.

So, lets crack on with the good old vista style glass look button.

I’ll break the template creation down step by step into a follow along guide for creating a generic style & template to give you the standard glass look buttons found in Windows. We’ll dive straight in and create some content, then pause and explain some of what we’ve just done.

First steps.

If you haven’t already, hop over to the Microsoft site and download the latest version of Blend. As of writing, the June Beta 2.5 preview is available here.Β  I also assume that you’ve got the .Net framework 3 or above installed, and a version of VisualStudio. The Express edition will work just fine for most of these tutorials.

Once you’ve installed all that, fire up Blend and we’re ready to begin.

A quick introduction to Blend’s workspace

Before we get into full swing making the button template, we should have a quick tour of the important bit of Blend’s standard workspace.

blendworkspace

Continue reading

Posted in General | Leave a comment

Cure for slow Bitttorrent downloaded with Synology DS106e

 

I’ve had the slow download problem for over 2 years now, and finally managed to fix it tonight. Fair enough, the upgrade to the latest firmware may have helped, but i was still getting less than 2Kbytes a second with the defaults.

After fiddling with port forwarding on my router, I ended up putting upload and download limits into the boxes that state that 0 means unlimited.

since I’m still on Virgin Media’s extortionate £25 a month for 4Mbit connections, i entered 4096 in the download box, and 128 in the upload box.

I’m aware that the boxes state KB/s , note the upper case KB , so it should mean Kilo Bytes per second, but if i put 512 in there, the download rates didn’t increase.

I put 4096 in there, and suddenly I’m getting over 100KB/s on the download. Go figure.

Anyway, I think the best thing to do is port forward the standard ports from your router to the Synology Box using TCP only. Then start entering ever increasing numbers into those connection speed boxes, until you hit a number that lets your torrents take off.

here’s the evidence :

SynSpeed

that’s over 100KB a second, and it peaked at almost 200KB/s too. uTorrent manages about 10KB/s more, but I can live with that now I can turn off my PC πŸ™‚

Happy torrent-ing!

Technorati Tags: ,,
Posted in General, Hackery | Leave a comment

Synology Subversion Update

Technorati Tags: ,,,

When I originally installed my Subversion server on the Synology box way back in March 07 the firmware on the box was pretty much OEM. I’d tweaked the firmware to allow telnet, but that was about the only upgrade I’d got.

Well, since my I received my winning iPod I hadn’t really considered using the full capability of the Synology box, including it’s iTunes server.

So, I’ve bit the bullet, and upgraded the firmware!

Braving the WHOPPING 300 version number difference, i downloaded the latest firmware from the Synology site, and installed it, after making sure my SVN repository was backed up of course!

Anyway, the update went without a hitch, and , WOW, what a difference on the front end. First of all they’ve gone all Ajax-y – there are lots of interactive panels and controls now compared with the old static pages.

After i’d finished playing with all the sliding panels, I booted up Putty to check the telnet access. Yep,  still there. I referred back to the old article on installing SVN on the Synology box, and upgraded the packages using IPKG.

However, when i came to boot up the svnserve daemon I started getting missing lib errors. I’ve seen some of those in the original article comments, and lots of people had mailed me saying that the instructions don’t work. So, I poked around, and found that IPKG hadn’t actually upgraded all of the packages successfully. Scrolling back up the window there were two errors downloading some of the package updates. So, I re-ran IPKG upgrading again, and this time the packages did download ok.

I ran svnserve, and it fired up immediately. Going back to my PC, straight into TortoiseSVN’s repository browser, and we’re back in business.

So, if you’ve followed the original Synology Subversion article, and are having problems – make sure you don’t have any errors when running IPKG. If you do , re-run it and let it re-try download the missing dependent packages, or alternatively download them by hand and copy them to the Synology box by hand.

So, I can confirm that the original Synology Subversion Hack & Install does still work on the DS106e with the very latest firmware.

And, now I can get to my music via iTunes too. Synology you guys ROCK.

Posted in Hackery | Leave a comment

Pixel Shader Effects in WPF using .Net3.5sp1 Beta

Technorati Tags: ,,

Well, I finally managed to get round to whipping up a pixel shader today, and a reasonable workflow with skeleton projects to enable quick(ish) turnaround during development.

Since Pixel Shaders were introduced on Greg Shechters blog I’d taken a quick look and one thing was immediately apparent, that using just VS2008 to develop shaders could be a bit of a drag – we lose the visual feedback we normally have when developing normal applications, and we’re back to the good old days of build-run-suck-it-and-see-modify-build again loop. Not ideal, and not quick.

I’ll adapt the process a little using other tools but hopefully this development workflow wont change too much post beta.

Anyway, before we start pixel shading, we’ll need a software few pre-requisites and a bit of prior knowledge.

Software pre-requisites

First of all, if you haven’t installed it, you’ll need the DirectX SDK. This contains the all important compiler tools for compiling your HLSL files into the byte code that the runtime requires. We’ll be linking this tool into the devstudio environment, but not with a custom build step. If you read Greg’s comments, the MS guys are busy fixing up a nice MSBuild target just for this purpose, so I wont spend too much time shoe-horning this into the environment.

Next, we’ll need a tool to help visualise our shaders as we develop them. For this we need to go back to the video card manufacturers developer’s pages.

Since I’m running on an nVidia 8800GTX, I use nVidia’s FX Composer 2.5. FX Composert 2.5 is the latest version of their shader development tool, (also currently in beta – heh, can you tell I’m a sucker for this beta software?! lol!) and is a free download from their developer site.

I’ve been using nVidia hardware for quite a while, hence I’ve always used FX Composer to explore their hardware, but if you’re an ATI fan they also have a tool to perform similar functions – Render Monkey.

Next you’ll need to download the .Net3.5sp1 and Visual Studio Service Pack 1 Beta.

Beware, this is BETA software and as happened to me may completely hose your setup. However, I managed to solve my problem, but don’t install this lot on a production machine! YOU HAVE BEEN WARNED!

Ok, that about covers it for the software.

Continue reading

Posted in General | 6 Comments

Rob Relyea links To RunToTheHills!

OMG! At the risk of sounding like a fanatical Fan-Boy, I’ve been linked to from Rob Relyea’s WPF blog under the CTP section!

Rob’s blog entry is HERE, and as always contains mountains of useful WPF and .NET related material that you really should be reading.

Rob’s been on my blog-roll for ever since I started this blog, as the material on his pages is always straight to the point, and pre-filtered of any gunk (probably why my pages hadn’t appeared before now LOL!)

If you’re doing anything that uses WPF, you should be subscribed to Rob’s blog. If you’re not doing anything with WPF, you should be reading his blog to see why you SHOULD be doing things with WPF!

Anyway, after some excessive graft on my day job work (which is in WPF otherwise i wouldn’t be working on it at night ;), I though I’d take a break and create a couple of pixel shaders as a bit of a treat, using the .Net3.5sp1 Beta. I’ve been promising myself this for a while now, and with the bank holiday , I might just get time to sort out actually doing some work on them!

Treat? Did I actually use that for describing writing Pixel Shaders? Damn, that’s sad geeki-ness at its worst. Or best depending on your viewpoint πŸ˜‰ Another definition of treat would be Scarlett Johansson smothered in butterscotch sauce.Β  But I guess you’d really, really have to like butterscotch.

Anyway, I’d had a cursory look at what’s involved in the pixel shaders API, and it looks like there are some restrictions with what you can do with Pixel Shaders for WPF (like the lack of vertex shaders, or more than one texture source) but this *is* only a beta, and maybe we’ll get more features as the beta matures.

so, I guess.. watch this space!

Posted in General | Leave a comment

MyGeneration and Referencing External Assemblies…

After spending about and hour trying to get MyGeneration to reference the FileHelpers Dll’s, I thought it would be worth pointing something out..

QUIT MYGENERATION AND RE-RUN IT AFTER YOU HAVE COPIED THE ASSEMBLIES INTO THE MYGENERATION FOLDER.

Damn. I’ve just spent a frustrating hour looking at "Couldn’t load assembly or one of its dependants" exceptions – only to discover that quiting MyGeneration and re-running it solves the problem.

I guess it must scan its folder for available assemblies at run time πŸ™

<sigh>

If I get this out of the way, I may *actually* get to start on those pixel shaders I keep promising myself.

Posted in General | Leave a comment

.Net3.5 SP1 problem solved!

 

Just thought I’d let anyone having the same problems as me know how I ended up solving them!

Basically it appears that there are a couple of updates available on Windows update that are marked as optional, but which turn out to be not-so-optional…

the cuplrits are :

updates

Just in case you can’t read that – the numbers are :

KB943729 – Group Policy preference Client Side Extension for windows Vista x64 , and

KB937286 – Update for windows Vista for x64 based systems.

I dont know whether the KB937286 had anything to do with the problem, but since it was a general update I installed it anyway.

The exception I was getting referenced Group Policy, so i suspect the KB943729 was the clincher.

anyway! I’m happy again, My system appears to be back in one piece, and I’m just about to start on those pixel shaders!

see y’all in a jiffy!

 

Posted in General | Leave a comment

.Net 3.5 Disaster & Pixel shaders!

Oh No! i’ve just installed the .Net3.5 SP1 Beta  + the VS2008 SP1 Beta, and it’s completely hosed my setup πŸ™

When I open VS2008 and try to open a project, when the XAML/WPF view opens, i get the dreaded designer error window, with an exception i’ve not seen before πŸ™

Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401)

Unfortunately the only reference I can see for this regarding the 3.5SP1 beta is in the comments on ScottGU’s blog, and the response is "send me an email" . Thing is none of the possibles apply to me. I’m on Vista SP1, didn’t install the Silverlight betas, or anything else to do with Silverlight, nor did I install the update.

I’m just re-installing VS2008 now as nothing else seems to work.

In short, beware!

πŸ™

Posted in General | 5 Comments

I’m A WINNER – free iPod!

Well, not how I’d have phrased it but still. Sounds more like a Nigerian 419.

But still……..

 I’VE WON AN iPod!

Yup. Really. An iPod!! I submitted an idea into a program we have here @ EDS, and the best ideas are chosen and then awarded a prize! How cool, a FREE iPod!

My idea didn’t  really start out as an idea at all. More of a complaint really, but I guess what made it a special complaint was I placed a price on how much cash we were wasting because of the problem. Whilst I can’t go into details, I think it may have been attaching a real monetary figure to the whole thing that clinched it. Anyway, it appears that not only did I win an iPod (did I mention that I’ve won an iPod already?) but that they’d like me to do a white-paper on changing things too! Awesome, free iPod’s and I get a good shot at changing  our internal processes too. Double bonus!

I guess it’s nice to feel like your thoughts are worth something after all!

Anyway, because, well, I’ve won an iPod, here’s a picture.

Not only do I get a congratulations card in an Apple envelope…

But the back is engraved with my award and name! Cool!

I’ve never had an Apple product, after working for a year on a Quadra 840av (doing a conversion onto a 3DO console ) , I swore I’d never ever touch an apple product again. Back in those days, as a users machine it may have warranted the almost maniacal cult following, as a developer machine nothing short of vacuous.

Anyway, I’ve been resisting the temptation to fiddle with the latest & greatest jobs spawn, and seriously resisting purchasing an iPhone (after using that touch screen – all other phones are obsolete..), I have to admit, the old nano is pretty good. The only downside is having to use suffer iTunes to load the music. I’m sure there must be other tools available, that’s tonight’s task πŸ™‚

If anyone’s got any good suggestions , please, comment!

(PS. did I mention I’ve won an iPod?)

Posted in General, Personal | 3 Comments