Probably due to the last update 8/8/2010 I Get the following error
documents\visual studio 2010\Projects\SilverlightGadgetDebugger2\SilverlightGadgetDebugger2\SilverlightGadgetWeb\SilverlightGadgetWeb.csproj : error : A project with that name is already opened in the solution.
To the other reviewers, Silverlight is a 32bit environment. So, will not work unless you run 32bit Sidebar on your 64bit machine. Same thing that is required for Flash -- for gadget like Pandora. Look it up on Bing....
When the gadget default page loads from start it could not set the SilverlightGadget.Settings from that page (its supposedly to populate the setting from IsolatedStorage settings). How ever, this can ONLY be done in the settings page. I find it very impractical to always set the settings when the gadget was unloaded from the sidebar. Hope you can help us. Thanks.
have you done any testing of this on a 64 bit machine? I'm getting different results on 2 different computers with this package. 32 bit works fine, 64 bit doesnt work at all..
I have some settings set by using SilverlightGadget.Settings["PASS"] = something; I want to use this values in the state undock, but it does not work. Isn't there a way to achieve it?
It should work, as SilverlightGadget.Settings is only a wrapper over the Javascript settings API for gadgets. Can you check whether you can obtain the setting on the same page where you set it? (maybe on a button click)
I don't think there is a way to move the gadget around from code. Only users can do that.
The click thing is probably due to known issues with Silverlight buttons in sidebar gadgets. Try editing the template of the combobox (using Expression Blend or something to obtain the template) and change the Button.ClickMode to Press. Maybe that will fix it.
i added one more flyoutpage(FP) and i have 2 FPs right now..
Sure, i created one more silverlight project for second FP and .xap file has been added to clientbin folder(web project) automatically (no problem).
i also added FP2.html(initiated fp2.xap) to web project.
in code:
SilverlightGadget.FlyoutPage = "FP2.html";
SilverlightGadget.Flyout();
unfortunately, i can't view FP2... please help!!
Sorry for my english...
You can try debugging for Javascript and Silverlight exceptions, but I have an easier way to do this:
Use a single flyout Silverlight gadget, and just swap Silverlight user controls that you display on the "parent control" being shown on the flyout HTML page.
Love this template but i cant get image control to display image.Anyone got any idea why?
BitmapImage s = new BitmapImage(new Uri("http://images.craigslist.org/3nf3k63o55O25Z65X2b45bd3b2eb0eb161eb6.jpg", UriKind.Absolute));
//image1.Dispatcher.BeginInvoke((Action)(() => { image1.Source = s; }));
image1.Source = s;
This happens because the image is from a different domain than the gadget (obviously, since it's from the Internet) and the domain where the image is from does not allow Silverlight applications to use content from it. See http://msdn.microsoft.com/en-us/library/cc645032%28v=VS.95%29.aspx, the Basics of the Security Policy System section.
Hi,
I still have problem with abolut uri. I use crossdomain policy, when I run an OOB app it works correctly? Colud you please help, how can I solve this?
WCF project is working locally, but project is not working to transfered on the IIS server.
SilverlightGadgetUnDocked, Properties, "Enable running application out of browser" is checked, "Set as StartUp Project", Run(F5). Project is working without problems. Run as "SilverlightGadget1\SilverlightGadget1\SilverlightGadgetWeb\bin\Publish\SilverlightSidebarGadget.gadget", I meet up with cross-domain error.
For solving the cross-domain issues in Silverlight when you have control over the domain that hosts the resource (web service, image), then provide a Silverlight/Flash policy file on the domain. See http://msdn.microsoft.com/en-us/library/cc645032%28v=VS.95%29.aspx.
How can i use the RIA services in gadget.. i have try something but always gets 100% pink circle :(.. the same RIA services are working fine in other silverlight business application.
Please help me out.
I've added service reference to SilverlightGadgetSettings and create service client but I've got an error - KeyNotFoundException on client object. I mean
void evHelper_SettingsClosing(object sender, SettingsClosingEventArgs e)
{
if (e.Action == CloseAction.Commit)
{
GetWeatherXmlDocumentClient client = new GetWeatherXmlDocumentClient();
I've got KeyNotFoundException on GetWeatherXmlDocumentClient client = new GetWeatherXmlDocumentClient();.
The same error if I create object in other projects. What's the problem?
I'm a newbie on silverlight, so forgive me if my question is stupid.
As I understood it's necessary to allow http access from within the gadget. So I placed the file clientaccesspolicy.xml with the content:
<?xml version="1.0" encoding="utf-8"?>
<access-policy>
<cross-domain-access>
<policy>
<allow-from http-request-headers="SOAPAction">
<domain uri="*"/>
</allow-from>
<grant-to>
<resource path="/" include-subpaths="true"/>
</grant-to>
</policy>
</cross-domain-access>
</access-policy>
in the project SilverlightGadgetWeb with BuildAction "Content" and Copy to Output Directory "Copy always". This should allow all http access from within the gadget for test purposes, but I'm still receiving a SecurityException when I'm trying to read a Web page with WebClient.
The xml must be placed in the place where the web resource is hosted. For instance, if you want to access www.bing.com/image.jpg, then the hoster of bing.com needs to have the policy xml in the same place.
I have Windows 7 x64, Visual studio 2010 ultimate.
Getting these erros when creating Silverlight Sidebar Gadget (C#) project:
A problem was encountered creating the sub project 'SilverlightGadgetDocked'. The project file 'C:\Users\xxx\AppData\Local\Temp\2u5wbhxw.lls\Temp\SilverlightGadgetDocked.csproj' cannot be oppened.
The project type is not supported by this installation.
The same error repeats for:
'SilverlightGadgetFlyout'
'C:\Users\xxx\AppData\Local\Temp\yicpf21e.kxi\Temp\SilverlightGadgetFlyout.csproj'
'SilverlightGadgetSettings'
'C:\Users\xxx\AppData\Local\Temp\kehyacf5.u3p\Temp\SilverlightGadgetSettings.csproj'
'SilverlightGadgetUnDocked'
'C:\Users\xxx\AppData\Local\Temp\fgjso545.sqi\Temp\SilverlightGadgetUnDocked.csproj'
'SilverlightGadgetUtilities'
'C:\Users\xxx\AppData\Local\Temp\ictxngnk.yyx\Temp\SilverlightGadgetUtilities.csproj'
'SilverlightGadgetWeb'
'C:\Users\xxx\AppData\Local\Temp\ftm2g3xl.3ke\Temp\SilverlightGadgetWeb.csproj'
After these errors I have warning:
The following template is requesting to open one or more documents in a manner that could pose a security risk.
Template: "C:\Users\xxx\AppData\Local\Microsoft\VisualStudio\10.0\Extensions\Ioan Lazarciuc\Silverlight Sidebar Gadget (C#)\1.8\~PC\t\SilGadget.zip\SilverlightSidebarGadget.vstemplate"
If you choose to trust the template, the documents will be opened in the requested editors, and you will not be prompted again for this template
...
I press trust.
When I try to build I get error:
Error 1 The command "if not exist "c:\users\xxx\documents\visual studio 2010\Projects\SilverlightGadget1\SilverlightGadgetDebugger\bin\Debug\Gadgets" md "c:\users\xxx\documents\visual studio 2010\Projects\SilverlightGadget1\SilverlightGadgetDebugger\bin\Debug\Gadgets"
if not exist "c:\users\xxx\documents\visual studio 2010\Projects\SilverlightGadget1\SilverlightGadgetDebugger\bin\Debug\Gadgets\SilverlightSidebarGadget" md "c:\users\xxx\documents\visual studio 2010\Projects\SilverlightGadget1\