<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Silverlike &#187; BrowserIntegration</title>
	<atom:link href="http://silverlike.net/tag/browser-integration/feed/" rel="self" type="application/rss+xml" />
	<link>http://silverlike.net</link>
	<description>We Like Silverlight</description>
	<lastBuildDate>Mon, 07 Dec 2009 06:34:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Calling Mailto using JavaScript</title>
		<link>http://silverlike.net/calling-mailto-using-javascript/</link>
		<comments>http://silverlike.net/calling-mailto-using-javascript/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 12:45:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Common]]></category>
		<category><![CDATA[BrowserIntegration]]></category>

		<guid isPermaLink="false">http://silverlike.net/calling-mailto-using-javascript/</guid>
		<description><![CDATA[This is a code snippet showing how you may call the “mailto” to open your mail program.]]></description>
			<content:encoded><![CDATA[<p>This is a code snippet showing how you may call the “mailto” to open your mail program.</p>
<p class="image"><a href="http://www.damonpayne.com/2009/10/22/SilverlightAndMailto.aspx" target="_blank"><img style="display: inline" title="Calling Mailto using JavaScript" alt="Calling Mailto using JavaScript" src="http://silverlike.net/wp-content/uploads/2009/11/CallingMailtousingJavaScript.jpg" width="450" height="250" /></a> </p>
<div class="demo-area">Silverlight Demo: <a class="new-window" href="http://silverlike.net/silverlight/index.php?xap=%2Fwp-content%2Fuploads%2Fxap%2FCallingMailto.xap&TB_iframe=true&caption=Calling+Mailto+using+JavaScript&height=400&width=650" target="_blank">Click here to view</a></div>
<div class="csharp-area">Calling mailto via Javascript: </div>
<pre class="brush: c-sharp;">private void SendEmail(string email, string subject, string body)
{
     Uri uri = new Uri(String.Format(&quot;mailto:{0}?subject={1}&amp;body={2}&quot;, email, subject, body));
     System.Windows.Browser.HtmlPage.Window.Navigate(uri);
}</pre>
<div class="reference-info"><strong>Website:</strong> <a href="http://silverlike.net/calling-mailto-using-javascript/" title="http://silverlike.net/calling-mailto-using-javascript/" target="_blank">Click here</a></div>
<img src="http://silverlike.net/?ak_action=api_record_view&id=835&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://silverlike.net/calling-mailto-using-javascript/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Open/Navigate to an external link</title>
		<link>http://silverlike.net/opennavigate-to-an-external-link/</link>
		<comments>http://silverlike.net/opennavigate-to-an-external-link/#comments</comments>
		<pubDate>Sun, 27 Sep 2009 09:26:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Common]]></category>
		<category><![CDATA[BrowserIntegration]]></category>

		<guid isPermaLink="false">http://silverlike.net/open-external-linkwebsite/</guid>
		<description><![CDATA[The code helps to you navigate to an external link or website using code and HyperlinkButton. Please not that if you are running the application in out of browser mode, the C# will not work . In such case, you have to use HyperlinkButton to open an external link.]]></description>
			<content:encoded><![CDATA[<p>The code helps to you navigate to an external link or website using code and HyperlinkButton. Please not that if you are running the application in out of browser mode, the C# will not work . In such case, you have to use HyperlinkButton to open an external link.</p>
<p class="image"><a class="thickbox" href="http://www.shinedraw.com" target="_blank"><img style="display: inline" title="Open external link" alt="Open external link" src="http://silverlike.net/wp-content/uploads/2009/09/Openexternallink.jpg" width="400" height="250" /></a></p>
<div class="csharp-area">Open link in c#: </div>
<pre class="brush: c-sharp;">using System.Windows.Browser;
private void Button_Click(object sender, RoutedEventArgs e)
{
    Uri uri = new Uri(&quot;http://silverlike.net&quot;, UriKind.Absolute);
    HtmlPage.PopupWindow(uri, &quot;_blank&quot;, new HtmlPopupWindowOptions() { Width = 800, Height = 600};
    // or
    HtmlPage.Window.Navigate(uri, &quot;_blank&quot;);
}</pre>
<div class="xaml-area">Open link using HyperlinkButton: </div>
<pre class="brush: xml;">&lt;HyperlinkButton  Content=&quot;Silverlike&quot; NavigateUri=&quot;http://silverlike.net&quot; TargetName=&quot;_blank&quot;/&gt;</pre>
<div class="reference-info"><strong>Website:</strong> <a href="http://silverlike.net/opennavigate-to-an-external-link/" title="http://silverlike.net/opennavigate-to-an-external-link/" target="_blank">Click here</a></div>
<img src="http://silverlike.net/?ak_action=api_record_view&id=492&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://silverlike.net/opennavigate-to-an-external-link/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Integrate with Browser Cookie</title>
		<link>http://silverlike.net/integrate-with-browser-cookie/</link>
		<comments>http://silverlike.net/integrate-with-browser-cookie/#comments</comments>
		<pubDate>Sun, 27 Sep 2009 06:23:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Common]]></category>
		<category><![CDATA[BrowserIntegration]]></category>
		<category><![CDATA[Data]]></category>

		<guid isPermaLink="false">http://silverlike.net/integrate-with-browser-cookie/</guid>
		<description><![CDATA[Integrate with the browser cookie for saving and accessing data in the cookie.]]></description>
			<content:encoded><![CDATA[<p>Integrate with the browser cookie for saving and accessing data in the cookie. </p>
<p class="image"><a class="thickbox" href="http://www.shinedraw.com"><img style="display: inline" title="Integrate with Browser Cookie" alt="Integrate with Browser Cookie" src="http://silverlike.net/wp-content/uploads/2009/09/IntegratewithBrowserCookie_thumb.jpg" width="400" height="250" /></a></p>
<div class="csharp-area">Get and Set Cookie: </div>
<pre class="brush: c-sharp;">// sample usage
CookieManager.SetCookie(&quot;key&quot;, &quot;value&quot;, TimeSpan.FromSeconds(3600));
string value  = CookieManager.GetCookie(&quot;value&quot;);

// cookie manager class
public class CookieManager
    {

        public static void SetCookie(string key, string val, TimeSpan? expires)
        {

            SetCookie(key, val, expires, null, null, false);
        }

        public static void SetCookie(string key, string val, TimeSpan? expires, string path, string domain, bool secure)
        {

            StringBuilder fullCookie = new StringBuilder();
            fullCookie.Append(string.Concat(key, &quot;=&quot;, val));

            if (expires.HasValue)
            {

                DateTime expire = DateTime.UtcNow + expires.Value;
                fullCookie.Append(string.Concat(&quot;;expires=&quot;, expire.ToString(&quot;R&quot;)));
            }

            if (path != null)
            {

                fullCookie.Append(string.Concat(&quot;;path=&quot;, path));
            }

            if (domain != null)
            {

                fullCookie.Append(string.Concat(&quot;;domain=&quot;, domain));
            }

            if (secure)
            {

                fullCookie.Append(&quot;;secure&quot;);
            }

            HtmlPage.Document.SetProperty(&quot;cookie&quot;, fullCookie.ToString());
        }

        public static string GetCookie(String key)
        {
            String[] cookies = HtmlPage.Document.Cookies.Split(';');
            String result = (from c in cookies let keyValues = c.Split('=') where
                                 keyValues.Length == 2 &amp;&amp; keyValues[0].Trim() == key.Trim()
                             select keyValues[1]).FirstOrDefault();
            return result;
        }

        public static void DeleteCookie(String key){
            DateTime expir =DateTime.UtcNow -TimeSpan.FromDays(1);
            string cookie =String.Format(&quot;{0}=;expires={1}&quot;,
            key, expir.ToString(&quot;R&quot;));
            HtmlPage.Document.SetProperty(&quot;cookie&quot;, cookie);
        }

        public static bool Exists(String key, String value)
        {
            return HtmlPage.Document.Cookies.Contains(String.Format(&quot;{0}={1}&quot;, key, value));
        }
    }</pre>
<div class="reference-info"><strong>Website:</strong> <a href="http://silverlike.net/integrate-with-browser-cookie/" title="http://silverlike.net/integrate-with-browser-cookie/" target="_blank">Click here</a></div>
<img src="http://silverlike.net/?ak_action=api_record_view&id=427&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://silverlike.net/integrate-with-browser-cookie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!--
This site's performance optimized by W3 Total Cache:

W3 Total Cache improves the user experience of your blog by caching
frequent operations, reducing the weight of various files and providing
transparent content delivery network integration.

Learn more about our WordPress Plugins: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk

Served from: shareelements.silverlighteffect.com @ 2012-05-19 02:23:15 -->
