Exceptions with icons image source
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mighty Box |
Fix Committed
|
Low
|
Dom ODierno |
Bug Description
Description:
Silent Exceptions are thrown while using MB, probably caused by the BezelListSelector WPF manifest file, where list items icon image source is asigned with a null value (probably). This happens when no icon is set for an item.
todo:
1. have default icons for items with no icon.
2. fix the code, and handle null references correctly with no exceptions
Exception:
A first chance exception of type 'System.
System.Windows.Data Error: 22 : Cannot convert '<null>' from type '<null>' to type 'System.
at System.
at System.
at MS.Internal.
Changed in mb: | |
importance: | Undecided → Low |
status: | New → Confirmed |
I fixed this by creating a ValueConverter class which handles the conversion of the Uri to an ImageSource. It first tries to do a straightup conversion of the Uri to an ImageSource (just like a standard databind). if the conversion fails its backup is to extract the icon from the physical location of the file. If this fails (Item is not a FileItem) a default icon is pulled from the IconManager.