Came across this error when placing a where clause on linq query against an IEnumerable menuitem list to get a menuitem.
Unable to cast object of type 'WhereEnumerableIterator`1[System.Windows.Controls.MenuItem]' to type 'System.Windows.Controls.MenuItem'
Was quite confusing and no real answers on the web. Worked out that my where clause could probable return more than one menuitem entry (even though I know there is only one result) and therefore I needed to add the .first on the end of the linq query and it solved the issue.
Putting this out there in case others need a hint.
|
|
To be able to print test pages in the new HP printers you need to have full control access to the temp and tmp folders.
|
|
When creating a "New" tcpClient after upgrading from .Net 1.0 to 2.0 in a console application I got the error message "configuration system failed to initialize". It was related to the config file I was using.
|
|
When RDP'ing into a server or another machine and the mouse is very sluggish, lagging or slow there is a setting in the Mouse Control Panel that may fix the issue.
|
|
Although this is not my solution it is one that I have needed quite a few times, especially when moving Virtual Machines and reconfiguring the network cards. Also handy if you install new network adapters.
How to remove hidden network adapters
|
|
Having continual wireless drop outs with my Netgear D6000 router which just started to occur over the past few weeks, before that it was pretty stable. When connecting wireless devices the router would hang and at times the IP values given by the DHCP were not correct. It appeared the DHCP was broken or the leases got corrupted. Found a bug with the DHCP Server.
|
|
I came across an issue the other day when on my Iphone 5.1 the twitter application could not save a picture to the photo library. Kept prompting me to give access to twitter to the photo library.
Many forums and blogs said to change the privacy in settings, but there is no such setting on 5.1.
Turns out I had to set the Location Services within the Settings and turn on the Twitter option. Somehow I had turned this off earlier. Seems strange that location services needs to be on to save the picture but I believe that when the picture is saved the photo library uses the location as meta data and it couldn't do this.
Now fixed. For those that have the same issue.
|
|
After setting up a resource dictionary file I recieved the following error.
The designer does not support loading dictionaries that mix 'ResourceDictionary' items without a key and other items in the same collection. Please ensure that the 'Resources' property does not contain 'ResourceDictionary' items without a key, or that the 'ResourceDictionary' item is the only element in the collection.
Turns out that I had styles defined outside the ResourceDictionary, which was causing the issue.
The fix was to have the local Style tag within the ResourceDictionary tag as such:
Hope this is useful for people. Couldn't find this error anywhere else. ...
|
|
Having endured a power outage my PC's had shutdown. When trying to start up one of my PC's running the D865PERL motherboard nothing seemed to boot up.
The motherboard's fan and board's green light came up Ok and the hard disks seemed to fire up, but nothing was coming up on the screen. Interesting the anticipated startup beep didn't occur. This is what through me.
After taking out all the memory and disconnecting components the mother board gave the traditional 3 beeps for no ram and so I thought the board might be OK. I got a new battery and this made no difference. Inspected the board for any blown capacitors and couldn't see anything.
Finally I found a spare graphics and swapped this out and the board came up good. The single start beep didn't exist so this is what through me initially thinking it was the board, but no it was the graphics card.
Information for anyone that might encounter a similiar issue.
|
|
I came across the issue of where I was using a CheckBox within a DataGridTemplateColumn. I would click the checkbox of the first row and then page to the next page and the first row of the next page was also checked. The behaviour wasn't consistent.
Initially I had the column not bound to anything, then I included a IsChecked boolean to my collection type record and still got the same behaviour described when paging.
Then used the DataGridCheckBoxColumn and this gave the proper behaviour when paging, but the double click to select the checkbox was annoying. So I came across the following article which when I applied the binding syntax the checkbox selection and paging worked perfectly.
Just wanted to share for those that might get the same issue but not sure how to handle it. I have seen some convoluted approaches and this was easy.
Sourced from Guru's .Net Blog here...
|