Expression Blend Troubleshooting
Check out this article and learn how to handle known issues when using the Expression Blend tool.
Alarms Controls Error in Blend for Visual Studio 2012
Check out this article and learn how to handle the Alarm controls error in Blend for Visual Studio 2012 tool.
Description
When trying to use any of the WEBfactory 2010 Alarm controls in Blend for Visual Studio 2012, the Error HRESULT E_FAIL has be returned from a call to a COM component error will be displayed in the Results panel and the MainPage will be blank.
Error when using the Alarm controls in Blend for Visual Studio 2012
The usage of the following controls in Blend for Visual Studio 2012 will trigger the error:
WFAlarmDuration1
WFAlarmFrequency1
WFAlarmManager
WFAlarmOnline
WFAlarmStateManager
WFAlarmViewer
Solution
Follow the next steps to avoid this error in Blend for Visual Studio 2012 when using the WEBfactory 2010 Alarm controls:
Create a new WEBfactory 2010 Silverlight Application + Website project and make sure to select the Silverlight version 4.0.
Copy the Standard directory containing the Silverlight dlls to the project folder.
In the new Blend project, add the references to the dlls copied in the project folder.
Use the controls as usual. The WEBfactory 2010 Alarm controls will work as expected.
Alternative Solution 1
Create a new WEBfactory 2010 Silverlight Application + Website project and make sure to select the Silverlight version 4.0.
Create a new folder in the project and name it WFReferences (or any other name).
Add the Standard dlls to this new folder using the Add Existing Item... dialog.
This will automatically copy all the selected files inside the new folder from the project folder and will also add the dlls to the project. This will increase the size of the project and the build times. The original solution is recommended.
Browse to the Standard folder in the WEBfactory 2010 installation directory. Select all the dlls and click Open.
Add the references to the WEBfactory 2010 Standard dlls from the new folder inside the project folder. Use the controls as usual. The WEBfactory 2010 Alarm controls will work as expected.
Alternative Solution 2
Create a new WEBfactory 2010 Silverlight Application + Website project and make sure to select the Silverlight version 4.0.
Reference the Standard dlls from the WEBfactory 2010 installation directory.
Add the desired WEBfactory 2010 Alarm control on the MainPage. Ignore the error.
Build the project.
Close Blend after the build it complete.
Re-open the same project in Blend.
The controls will work as expected unless the project is cleaned. If so, build the project again, close it and re-open it.