<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Creating a Windows Vista Sidebar Gadget</title>
	<atom:link href="http://www.lazarciuc.ro/ioan/2007/11/01/creating-a-windows-vista-sidebar-gadget/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lazarciuc.ro/ioan/2007/11/01/creating-a-windows-vista-sidebar-gadget/</link>
	<description>I program, therefore I exist.</description>
	<lastBuildDate>Sun, 08 Jan 2012 23:00:55 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Guru</title>
		<link>http://www.lazarciuc.ro/ioan/2007/11/01/creating-a-windows-vista-sidebar-gadget/comment-page-1/#comment-198</link>
		<dc:creator>Guru</dc:creator>
		<pubDate>Sun, 29 Aug 2010 03:58:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.lazarciuc.ro/ioan/2007/11/01/creating-a-windows-vista-sidebar-gadget/#comment-198</guid>
		<description>Good job... kudos...</description>
		<content:encoded><![CDATA[<p>Good job&#8230; kudos&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gary</title>
		<link>http://www.lazarciuc.ro/ioan/2007/11/01/creating-a-windows-vista-sidebar-gadget/comment-page-1/#comment-74</link>
		<dc:creator>Gary</dc:creator>
		<pubDate>Tue, 03 Mar 2009 23:05:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.lazarciuc.ro/ioan/2007/11/01/creating-a-windows-vista-sidebar-gadget/#comment-74</guid>
		<description>Thanks So much. I will give it a try :-)</description>
		<content:encoded><![CDATA[<p>Thanks So much. I will give it a try <img src='http://www.lazarciuc.ro/ioan/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cretz</title>
		<link>http://www.lazarciuc.ro/ioan/2007/11/01/creating-a-windows-vista-sidebar-gadget/comment-page-1/#comment-72</link>
		<dc:creator>cretz</dc:creator>
		<pubDate>Tue, 03 Mar 2009 19:03:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.lazarciuc.ro/ioan/2007/11/01/creating-a-windows-vista-sidebar-gadget/#comment-72</guid>
		<description>Sorry for the delay in responding. I&#039;m going to respond to your question in steps.
First step is to use the template i mentioned in my post. This would provide a common reference for names and such. I also asume you know basic HTML and JavaScript DOM. If not, read up on those from http://w3schools.com.
Next, i&#039;ll cover the setting which tells which gadget is shown. Since we only have 2 gadgets, only a boolean is needed. When it&#039;s true, Gadget1 should be show, when false, Gadget2.
In the settings.html file, somewhere in the body you should have a &lt;input type=&quot;checkbox&quot; id=&quot;chkFlag&quot;&gt;. in your javascript code for the onSettingsClosing event handler of the Gadget, you should have
var fg = document.getElementById(&quot;setFlag&quot;);
System.Gadget.Settings.write (&quot;GadgetFlag&quot;, fg.checked);
This saves the setting.
Next, in the onSettingsClosed event handler of the Gadget you should put the code that hides/unhides the corresponding div.
Lets asume that you have the following code in yout gadget.html file:
&lt;body&gt;
&lt;div id=&quot;Gadget1&quot;&gt;
&lt;!-- html code for Gadget1 goes here --&gt;
&lt;/div&gt;
&lt;div id=&quot;Gadget2&quot;&gt;
&lt;!-- html code for Gadget2 goes here --&gt;
&lt;/div&gt;
&lt;/body&gt;
In this case, the code for the onsSettingsClosed would be:
var flg = System.Gadget.Settings.read(&quot;GadgetFlag&quot;);
var div1 = document.getElementById(&quot;Gadget1&quot;);
var div2 = document.getElementById(&quot;Gadget2&quot;);
if (flg)
{
div1.style.visibility = &quot;visible&quot;;
div2.style.visibility = &quot;collapse&quot;;
}
else
{
div1.style.visibility = &quot;collapse&quot;;
div2.style.visibility = &quot;visible&quot;;
}
}
This code shows one div, and hides the other, according to the flag.

I hope this makes things a bit clearer. If it still does not make any sense, don&#039;t hesitate to ask for help.</description>
		<content:encoded><![CDATA[<p>Sorry for the delay in responding. I&#8217;m going to respond to your question in steps.<br />
First step is to use the template i mentioned in my post. This would provide a common reference for names and such. I also asume you know basic HTML and JavaScript DOM. If not, read up on those from <a href="http://w3schools.com" rel="nofollow">http://w3schools.com</a>.<br />
Next, i&#8217;ll cover the setting which tells which gadget is shown. Since we only have 2 gadgets, only a boolean is needed. When it&#8217;s true, Gadget1 should be show, when false, Gadget2.<br />
In the settings.html file, somewhere in the body you should have a<br />
<input type="checkbox" id="chkFlag"/>. in your javascript code for the onSettingsClosing event handler of the Gadget, you should have<br />
var fg = document.getElementById(&#8220;setFlag&#8221;);<br />
System.Gadget.Settings.write (&#8220;GadgetFlag&#8221;, fg.checked);<br />
This saves the setting.<br />
Next, in the onSettingsClosed event handler of the Gadget you should put the code that hides/unhides the corresponding div.<br />
Lets asume that you have the following code in yout gadget.html file:<br />
<body></p>
<div id="Gadget1">
<!-- html code for Gadget1 goes here -->
</div>
<div id="Gadget2">
<!-- html code for Gadget2 goes here -->
</div>
<p></body><br />
In this case, the code for the onsSettingsClosed would be:<br />
var flg = System.Gadget.Settings.read(&#8220;GadgetFlag&#8221;);<br />
var div1 = document.getElementById(&#8220;Gadget1&#8243;);<br />
var div2 = document.getElementById(&#8220;Gadget2&#8243;);<br />
if (flg)<br />
{<br />
div1.style.visibility = &#8220;visible&#8221;;<br />
div2.style.visibility = &#8220;collapse&#8221;;<br />
}<br />
else<br />
{<br />
div1.style.visibility = &#8220;collapse&#8221;;<br />
div2.style.visibility = &#8220;visible&#8221;;<br />
}<br />
}<br />
This code shows one div, and hides the other, according to the flag.</p>
<p>I hope this makes things a bit clearer. If it still does not make any sense, don&#8217;t hesitate to ask for help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gary</title>
		<link>http://www.lazarciuc.ro/ioan/2007/11/01/creating-a-windows-vista-sidebar-gadget/comment-page-1/#comment-71</link>
		<dc:creator>Gary</dc:creator>
		<pubDate>Tue, 03 Mar 2009 13:33:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.lazarciuc.ro/ioan/2007/11/01/creating-a-windows-vista-sidebar-gadget/#comment-71</guid>
		<description>Cretz, are you out there?</description>
		<content:encoded><![CDATA[<p>Cretz, are you out there?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gary</title>
		<link>http://www.lazarciuc.ro/ioan/2007/11/01/creating-a-windows-vista-sidebar-gadget/comment-page-1/#comment-70</link>
		<dc:creator>Gary</dc:creator>
		<pubDate>Mon, 02 Mar 2009 11:44:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.lazarciuc.ro/ioan/2007/11/01/creating-a-windows-vista-sidebar-gadget/#comment-70</guid>
		<description>Wow, thanks for the quick reply. Unfortunately, yes, I do need more help.
I&#039;m just kinda winging writing gadgets. Could you please be very specific as far as code goes and where and what file to place the code in.
Thank You so much....</description>
		<content:encoded><![CDATA[<p>Wow, thanks for the quick reply. Unfortunately, yes, I do need more help.<br />
I&#8217;m just kinda winging writing gadgets. Could you please be very specific as far as code goes and where and what file to place the code in.<br />
Thank You so much&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cretz</title>
		<link>http://www.lazarciuc.ro/ioan/2007/11/01/creating-a-windows-vista-sidebar-gadget/comment-page-1/#comment-69</link>
		<dc:creator>cretz</dc:creator>
		<pubDate>Mon, 02 Mar 2009 10:52:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.lazarciuc.ro/ioan/2007/11/01/creating-a-windows-vista-sidebar-gadget/#comment-69</guid>
		<description>Let&#039;s say you have 2 html files, each being the body of a gadget. You can place the contents of each gadget in a div, and hide one of the divs with css (display:none;).
In the settings html file, you can then put a flag to indicate that Gadget1 is visible or not.
In the new, combined gadget html file, add some javascript to show/hide the gadget divs according to the flag you set in the settings page.
This would be the idea, at a high level. If you need more details, please ask.</description>
		<content:encoded><![CDATA[<p>Let&#8217;s say you have 2 html files, each being the body of a gadget. You can place the contents of each gadget in a div, and hide one of the divs with css (display:none;).<br />
In the settings html file, you can then put a flag to indicate that Gadget1 is visible or not.<br />
In the new, combined gadget html file, add some javascript to show/hide the gadget divs according to the flag you set in the settings page.<br />
This would be the idea, at a high level. If you need more details, please ask.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gary</title>
		<link>http://www.lazarciuc.ro/ioan/2007/11/01/creating-a-windows-vista-sidebar-gadget/comment-page-1/#comment-67</link>
		<dc:creator>Gary</dc:creator>
		<pubDate>Mon, 02 Mar 2009 10:40:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.lazarciuc.ro/ioan/2007/11/01/creating-a-windows-vista-sidebar-gadget/#comment-67</guid>
		<description>Hi, 
I have written 2 gadgets and i want to combine the 2 and basically switch from 1 to the other using the settings file. Can that be done?</description>
		<content:encoded><![CDATA[<p>Hi,<br />
I have written 2 gadgets and i want to combine the 2 and basically switch from 1 to the other using the settings file. Can that be done?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rusty</title>
		<link>http://www.lazarciuc.ro/ioan/2007/11/01/creating-a-windows-vista-sidebar-gadget/comment-page-1/#comment-42</link>
		<dc:creator>Rusty</dc:creator>
		<pubDate>Fri, 14 Nov 2008 00:51:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.lazarciuc.ro/ioan/2007/11/01/creating-a-windows-vista-sidebar-gadget/#comment-42</guid>
		<description>PHP not a proper language?  Why do you use a blog written in PHP?</description>
		<content:encoded><![CDATA[<p>PHP not a proper language?  Why do you use a blog written in PHP?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cretz</title>
		<link>http://www.lazarciuc.ro/ioan/2007/11/01/creating-a-windows-vista-sidebar-gadget/comment-page-1/#comment-23</link>
		<dc:creator>cretz</dc:creator>
		<pubDate>Thu, 07 Feb 2008 10:39:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.lazarciuc.ro/ioan/2007/11/01/creating-a-windows-vista-sidebar-gadget/#comment-23</guid>
		<description>Since Silverlight does not allow you to do cross domain calls to a web service, this means that the page that contains the silverlight controls has to come from the same server as the web service.
Since gadgets are html pages stored on the hard disk of the client, and deplying the web service to all clients is not a good idea, you could try having iframes in the gadget and the flyout html pages, and have those iframes contain pages with silverlight that come from a web server that hosts both the silverlight app(s) and the web service(s).
More information about web services and silverlight, here:
http://weblogs.asp.net/jgalloway/archive/2007/06/14/calling-an-asmx-webservice-from-silverlight-use-a-static-port.aspx
http://weblogs.asp.net/jgalloway/archive/2007/07/03/silverlight-1-1-alpha-cross-domain-webservice-access-makes-mashups-tricky.aspx
http://msmvps.com/blogs/luisabreu/archive/2007/06/11/calling-web-services-from-your-silverlight-alpha-app.aspx</description>
		<content:encoded><![CDATA[<p>Since Silverlight does not allow you to do cross domain calls to a web service, this means that the page that contains the silverlight controls has to come from the same server as the web service.<br />
Since gadgets are html pages stored on the hard disk of the client, and deplying the web service to all clients is not a good idea, you could try having iframes in the gadget and the flyout html pages, and have those iframes contain pages with silverlight that come from a web server that hosts both the silverlight app(s) and the web service(s).<br />
More information about web services and silverlight, here:<br />
<a href="http://weblogs.asp.net/jgalloway/archive/2007/06/14/calling-an-asmx-webservice-from-silverlight-use-a-static-port.aspx" rel="nofollow">http://weblogs.asp.net/jgalloway/archive/2007/06/14/calling-an-asmx-webservice-from-silverlight-use-a-static-port.aspx</a><br />
<a href="http://weblogs.asp.net/jgalloway/archive/2007/07/03/silverlight-1-1-alpha-cross-domain-webservice-access-makes-mashups-tricky.aspx" rel="nofollow">http://weblogs.asp.net/jgalloway/archive/2007/07/03/silverlight-1-1-alpha-cross-domain-webservice-access-makes-mashups-tricky.aspx</a><br />
<a href="http://msmvps.com/blogs/luisabreu/archive/2007/06/11/calling-web-services-from-your-silverlight-alpha-app.aspx" rel="nofollow">http://msmvps.com/blogs/luisabreu/archive/2007/06/11/calling-web-services-from-your-silverlight-alpha-app.aspx</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Poonam</title>
		<link>http://www.lazarciuc.ro/ioan/2007/11/01/creating-a-windows-vista-sidebar-gadget/comment-page-1/#comment-22</link>
		<dc:creator>Poonam</dc:creator>
		<pubDate>Tue, 05 Feb 2008 07:39:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.lazarciuc.ro/ioan/2007/11/01/creating-a-windows-vista-sidebar-gadget/#comment-22</guid>
		<description>Hi my all database connectivity is in web service,what i do if i want to use web service in silverlight. i try it but it is giving me error.</description>
		<content:encoded><![CDATA[<p>Hi my all database connectivity is in web service,what i do if i want to use web service in silverlight. i try it but it is giving me error.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

