| Perfil de PaulioIT BytesBlogListasScraps | Ajuda |
|
31 de março Silly gotcha when using sample data in BlendI was working on a list box project and wanted to use Blend to edit my container styles when I was faced with the age old problem of providing Blend with some useful data. So I created a nice little collection class wrapping my target object and asked Blend to use it as a datasource, ensuring that the collection would initialise itself in its constructor. Hurray I had a nice design view with sample data. However, when I switched back to Visual Studio it complained that the resource xaml containing my datasource definition was invalid, the dreaded AEG error. After a great deal of head scratching I realised that somehow Blend had successfully added an x:Name attribute to the resource but my collection class does not derive from any Element and therefore does not have an x:Name. Once I realised that I (ahem) hacked a quick derive-from-user control onto the collection class and we're up and running again. So watch out, just cause Blend doesn't complain doesn't mean it hasn't generated some dodgy xaml. 26 de março Great talk about ADO Data ServicesJust finished watching a really could talk from Mix09 about ADO.NET Data Services. I've been wondering about where the business rules really fit with ADO.NET DataServices and the Entity Framework. This has gone a long way to helping me understand it, I really recommend it.
24 de março Problems with Win Mobile GPS Sample freezing?It's been a while since I last used the GPS Sample for managed code provided in the mobile SDK. So I compiled it and added a reference to it in my project confident I'd have GPS data very soon. I added the gps class to a second form, launched the form and yah I had GPS data. However, when I closed the form the application froze/hung. After examing the code I could see where it was going wrong but I wasn't sure why. Essentially the sample create a basic message loop by taking out a lock on itself and going into a loop where is uses Wait For Multiple Objects to get the notifications from the GPS driver. One of the notifications it waits for includes "close". However, the code that issus the close notification then takes out another lock. This should be a good idea because it waits for the lock the loop has got to be given up before it continue cleaning up the component. The problem is that the loop never seems to get the close notification so the application is now stuck waiting for a lock it will never get. Now I'm not a 100% what the problem is but it would seem that it's probably something to do with threads. Therefore I moved the GPS class into the main form and exposed the data to the secondary form. This seems to have done the trick. As I say I don't understand why this is since the loop certainly recieves the notifications about GPS changes so why not the close? Hopefully I'll realise what the problem is soon, but in the meantime at least I seem to have a workaround.
20 de março How to read Car number plates in Google Street Maps Just had a quick play with Google Street Maps and was interested to see how peoples faces and car number plates are automatically blurred. However, what I also noticed is that the blurring only detects such features in the "current" frame. E.g. you see a car and then move towards it, the car is now at a good resolution and the plate is blurred. However, if you move back a step and then use the zoom button you can easily read the plate. So if your car in visible I would recommend you try this trick and then use the report a problem button to ask for it to be blurred (or removed). 11 de março Tip: Virtual PC slow?I just discovered that when I remote desktop to a machine that is hosting a Virtual PC and try to use the VM from the "player" then the user performance is terrible. You try to move the mouse pointer and it stutters which results in you spending 10mins just to trying to get the mouse-pointer to click a button! Don't despair there is a workaround. Simply enable remote desktop access to the VM and remote desktop directly to the VM. The UI performance is fine, in fact you wouldn't know it was a VM.
08 de março Using IIS in Vista to access your Visual Studio web site projectDeveloping in Vista certainly presents the odd challenge. Recently I've started to develop applications using Live Mesh and I wanted to test out Delegated Authentication which involves running a web site under IIS. Now I'm not used to IIS 7 so after the initial shock of a new UI I setup the required virtual directory and ran my web site. However, I kept getting a rather strange error message; The requested page cannot be accessed because the related configuration data for the page is invalid. At first I took that to mean I'd corrupted my web.config file but no that all seemed fine. I eventually tracked down a Test Settings button in IIS. This showed a big warning triangle saying that it couldn’t ensure the site identity would be authorised to access the disk folder. Once I’d set an appropriate user to access the folder everything worked fine. To access the Test Settings button; Open IIS->Navigate to your site->Basic Settings (in the right pane)->Test Settings->Click on any line with a warning triangle and read the explanation. |
|
|