<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Bunjeeb&#039;s Blog</title>
	<atom:link href="http://bunjeeb.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://bunjeeb.com</link>
	<description>Everything I learned...</description>
	<lastBuildDate>Thu, 18 Apr 2013 14:19:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='bunjeeb.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Bunjeeb&#039;s Blog</title>
		<link>http://bunjeeb.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://bunjeeb.com/osd.xml" title="Bunjeeb&#039;s Blog" />
	<atom:link rel='hub' href='http://bunjeeb.com/?pushpress=hub'/>
		<item>
		<title>JayData Makes Web Phenomenal !</title>
		<link>http://bunjeeb.com/2012/07/31/jaydata-makes-web-phenomenal/</link>
		<comments>http://bunjeeb.com/2012/07/31/jaydata-makes-web-phenomenal/#comments</comments>
		<pubDate>Tue, 31 Jul 2012 03:20:36 +0000</pubDate>
		<dc:creator>bunjeeb</dc:creator>
				<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[knockout]]></category>
		<category><![CDATA[Single Page Application]]></category>
		<category><![CDATA[SPA]]></category>
		<category><![CDATA[WCF]]></category>

		<guid isPermaLink="false">https://bunjeeb.wordpress.com/?p=202</guid>
		<description><![CDATA[&#160; Creating Single Page Application, Web API, Upshot, An Exposed Service bring your data from Json Endpoints (maybe WEB API) … all of this is the new nueva moda. This is nice till now. But the catastrophy started when you want to map your JSON with your EF Objects. Serializing stuff! Not Serializble! What the <a href="http://bunjeeb.com/2012/07/31/jaydata-makes-web-phenomenal/" class="excerpt-more-link">[&#8230;]</a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bunjeeb.com&#038;blog=16554110&#038;post=202&#038;subd=bunjeeb&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>&#160;</p>
<p>Creating Single Page Application, Web API, Upshot, An Exposed Service bring your data from Json Endpoints (maybe WEB API) … all of this is the new nueva moda.</p>
<p>This is nice till now. But the catastrophy started when you want to map your JSON with your EF Objects. Serializing stuff! Not Serializble! What the Hell! so change return type to &#8216;dynamic&#8217; and bring &#8216;anonymous object&#8217; &#8230; upshot is not documented!! And the Single Page Architecture Template (which is provided by Microsoft) .. Not mature enough! So simply they removed it from VS 12.</p>
<p>And Finally God guide me to JayData! Its amazing and phenomenal.</p>
<p><a href="http://www.youtube.com/watch?v=P3ALwKeSEYs">That’s what happened to me when I saw the first video for JayData</a></p>
<p>Imagine, Silverlight RIA can be used in Web. This “Framework” .. not just library</p>
<p>Solve this things in Previous Microsoft Single Page Architecture:</p>
<ul>
<li>Generating the whole EF Model + Metadata automatically using <strong><u>JaySvcUtil.exe</u></strong> (You can see this in video)</li>
<li> Do not bother your self by creating many Web API controllers and doing all that mapping stuff between C# and JavaScript.</li>
<li>Getting optimized Data (Just needed data):</li>
</ul>
<p><a href="http://bunjeeb.files.wordpress.com/2012/07/7-31-2012-6-02-35-am.png"><img style="background-image:none;border-bottom:0;border-left:0;padding-left:0;padding-right:0;display:inline;border-top:0;border-right:0;padding-top:0;" title="7-31-2012 6-02-35 AM" border="0" alt="7-31-2012 6-02-35 AM" src="http://bunjeeb.files.wordpress.com/2012/07/7-31-2012-6-02-35-am_thumb.png?w=495&#038;h=150" width="495" height="150" /></a></p>
<p>In this image you can see how I’m getting the Whole users from the WCF Data Service.</p>
<p>map ==&gt; Used to get a specific properties from the object (That’s will minimize the size of the requested data; which means some KBs instead getting the whooole object).</p>
<p>Also I’m using Knockout to bind UI Elements with <strong>self.users</strong> observable array</p>
<p><a href="http://bunjeeb.files.wordpress.com/2012/07/7-31-2012-6-08-34-am.png"><img style="background-image:none;border-bottom:0;border-left:0;padding-left:0;padding-right:0;display:inline;border-top:0;border-right:0;padding-top:0;" title="7-31-2012 6-08-34 AM" border="0" alt="7-31-2012 6-08-34 AM" src="http://bunjeeb.files.wordpress.com/2012/07/7-31-2012-6-08-34-am_thumb.png?w=472&#038;h=105" width="472" height="105" /></a></p>
<ul>
<li>You can use LINQ in JavaScript. Haha, Brilliant! For example if you have a users table and People table. And Each User is a Person. Lets see how to get Person Data if you clicked on a User.</li>
</ul>
<p><a href="http://bunjeeb.files.wordpress.com/2012/07/7-31-2012-5-52-38-am.png"><img style="background-image:none;border-bottom:0;border-left:0;padding-left:0;padding-right:0;display:inline;border-top:0;border-right:0;padding-top:0;" title="7-31-2012 5-52-38 AM" border="0" alt="7-31-2012 5-52-38 AM" src="http://bunjeeb.files.wordpress.com/2012/07/7-31-2012-5-52-38-am_thumb.png?w=333&#038;h=223" width="333" height="223" /></a></p>
<p>First Param is a predicate that brings a person by Id.</p>
<p>this.Id ==&gt; Passed in Second param as you see.</p>
<p>And Third one; is the callbacks from the operation. Awesome!</p>
<p><strong><u>showPerson </u></strong>binded with list of users using Knockout JS (2nd image shows how I binded Div Element with <strong><u>showPerson</u></strong> function).</p>
<p>What else, See this video </p>
<p>
<div style="margin:0;display:inline;float:none;padding:0;" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:ec532b9c-243c-4802-b1da-03ed241ba120" class="wlWriterEditableSmartContent">
<div><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='471' height='264' src='http://www.youtube.com/embed/LlJHgj1y0CU?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;hd=1&#038;wmode=transparent' frameborder='0'></iframe></span></div>
</div>
<p><a href="http://nuget.org/packages/JayData">http://nuget.org/packages/JayData</a></p>
<p><a href="http://jaydata.org/">http://jaydata.org/</a></p>
<p><a href="http://jaydata.org/api">http://jaydata.org/api</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bunjeeb.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bunjeeb.wordpress.com/202/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bunjeeb.com&#038;blog=16554110&#038;post=202&#038;subd=bunjeeb&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bunjeeb.com/2012/07/31/jaydata-makes-web-phenomenal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/133f4fec9498509525f897faa8d4e7d9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">aburakab</media:title>
		</media:content>

		<media:content url="http://bunjeeb.files.wordpress.com/2012/07/7-31-2012-6-02-35-am_thumb.png" medium="image">
			<media:title type="html">7-31-2012 6-02-35 AM</media:title>
		</media:content>

		<media:content url="http://bunjeeb.files.wordpress.com/2012/07/7-31-2012-6-08-34-am_thumb.png" medium="image">
			<media:title type="html">7-31-2012 6-08-34 AM</media:title>
		</media:content>

		<media:content url="http://bunjeeb.files.wordpress.com/2012/07/7-31-2012-5-52-38-am_thumb.png" medium="image">
			<media:title type="html">7-31-2012 5-52-38 AM</media:title>
		</media:content>
	</item>
		<item>
		<title>Silverlight Tags Control Using RichTextBox, Popup and ListBox.</title>
		<link>http://bunjeeb.com/2012/04/02/silverlight-tags-control-using-richtextbox-popup-and-listbox/</link>
		<comments>http://bunjeeb.com/2012/04/02/silverlight-tags-control-using-richtextbox-popup-and-listbox/#comments</comments>
		<pubDate>Mon, 02 Apr 2012 06:58:59 +0000</pubDate>
		<dc:creator>bunjeeb</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[XAML]]></category>

		<guid isPermaLink="false">https://bunjeeb.wordpress.com/?p=183</guid>
		<description><![CDATA[&#160; Download Sample &#160; &#160; Before couple of days I created a an editable tagging control with autocomplete list. I decided to create one “some how” similar to Live mail application “To” field. That&#8217;s exactly what I need; RichTextBox, Popup Control, and a ListBox inside that popup, and SL Cinch MVVM Framework. And one more <a href="http://bunjeeb.com/2012/04/02/silverlight-tags-control-using-richtextbox-popup-and-listbox/" class="excerpt-more-link">[&#8230;]</a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bunjeeb.com&#038;blog=16554110&#038;post=183&#038;subd=bunjeeb&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>&#160;</p>
<p><a href="https://skydrive.live.com/redir.aspx?cid=b31cd3cf1281f501&amp;resid=B31CD3CF1281F501!405&amp;parid=B31CD3CF1281F501!167&amp;authkey=!AIHQar4jUM47Zac">Download Sample</a></p>
<p>&#160;</p>
<div style="margin:0;display:inline;float:none;padding:0;" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:7912c93b-451b-4116-9f95-dce5bab9cf57" class="wlWriterEditableSmartContent">
<div><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='448' height='252' src='http://www.youtube.com/embed/UIjFSERUsYc?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;hd=1&#038;wmode=transparent' frameborder='0'></iframe></span></div>
</div>
<p>&#160;</p>
<p>Before couple of days I created a an editable tagging control with autocomplete list.    <br />I decided to create one “some how” <img style="border-style:none;" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://bunjeeb.files.wordpress.com/2012/04/wlemoticon-smile.png?w=500" /> similar to Live mail application “To” field.     </p>
<p><a href="http://bunjeeb.files.wordpress.com/2012/04/to.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="to" border="0" alt="to" src="http://bunjeeb.files.wordpress.com/2012/04/to_thumb.png?w=471&#038;h=212" width="471" height="212" /></a>     </p>
<p>That&#8217;s exactly what I need; <strong>RichTextBox</strong>, <strong>Popup</strong> Control, and a <strong>ListBox</strong> inside that popup, and <a href="http://cinch.codeplex.com/">SL Cinch MVVM Framework</a>.</p>
<p>And one more thing <strong>InlineUIContainer</strong> that contains my Tag Item control.</p>
<p><strong>InlineUIContainer </strong>object used to wrap <strong>FrameworkElement</strong> controls inside RichTextBox; so the only way to add (border, StackPanel, or even buttons) is by using this object.</p>
<table border="0" cellspacing="0" cellpadding="2" width="455">
<tbody>
<tr>
<td valign="top" width="453">
<p><strong><u>Note</u></strong>: </p>
<p>Buttons will be disabled if RichTextBox ReadOnly property equal false.           <br />So if you want to add delete button to your Tag Item; I think that you should to make your RichTextBox works in modes (Editable, ReadOnly).            <br />Editable: to add inline tag items.            <br />RedOnly: to click on delete buttons for each tag Item.</p>
<p>I did not like this kind of user experience. So I just delete delete button from tag item. Make things simpler that better <img style="border-style:none;" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://bunjeeb.files.wordpress.com/2012/04/wlemoticon-smile.png?w=500" />. You can just delete it using backspace or by highlighting some item then delete “As you saw in Video”.</p>
</td>
</tr>
</tbody>
</table>
<p>&#160;</p>
<p>When you download the sample, you will find a Silverlight library project called <strong>bunjeeb.SL.Controls</strong></p>
<p>Three DLLs added to this project:</p>
<ul>
<li>Microsoft.Expression.Interactions </li>
<li>System.Windows.Interactivity </li>
<li>Cinch.SL </li>
</ul>
<p>You can find these three DLLs in dependencies folder with the sample.</p>
<p>As you see below TagTextBox is very simple:</p>
<table border="0" cellspacing="0" cellpadding="2" width="326">
<tbody>
<tr>
<td valign="top" width="324">
<pre class="code"><span style="color:blue;">&lt;</span><span style="color:#a31515;">Grid </span><span style="color:red;">x</span><span style="color:blue;">:</span><span style="color:red;">Name</span><span style="color:blue;">=&quot;LayoutRoot&quot;&gt;

&lt;</span><span style="color:#a31515;">Popup </span><span style="color:red;">x</span><span style="color:blue;">:</span><span style="color:red;">Name</span><span style="color:blue;">=&quot;PopupTags&quot; </span><span style="color:red;">IsOpen</span><span style="color:blue;">=&quot;False&quot;&gt;
&lt;</span><span style="color:#a31515;">Grid</span><span style="color:blue;">&gt;
&lt;</span><span style="color:#a31515;">ListBox </span><span style="color:red;">x</span><span style="color:blue;">:</span><span style="color:red;">Name</span><span style="color:blue;">=&quot;PopupTagsList&quot; </span><span style="color:red;">Height</span><span style="color:blue;">=&quot;Auto&quot; 
</span><span style="color:red;">    MinWidth</span><span style="color:blue;">=&quot;200&quot; </span><span style="color:red;">MaxHeight</span><span style="color:blue;">=&quot;250&quot;
    </span><span style="color:red;">Background</span><span style="color:blue;">=&quot;White&quot; 
    </span><span style="color:red;">BorderBrush</span><span style="color:blue;">=&quot;Black&quot; 
    </span><span style="color:red;">KeyDown</span><span style="color:blue;">=&quot;PopupListBox_KeyDown&quot;
    </span><span style="color:red;">ItemContainerStyle</span><span style="color:blue;">=&quot;{</span><span style="color:#a31515;">StaticResource </span></pre>
<pre class="code"><span style="color:#a31515;">                          </span><span style="color:red;">ListBoxItemContainerStyle</span><span style="color:blue;">}&quot; 
    </span><span style="color:red;">Padding</span><span style="color:blue;">=&quot;1,1,1,2&quot;/&gt;
&lt;/</span><span style="color:#a31515;">Grid</span><span style="color:blue;">&gt;
&lt;/</span><span style="color:#a31515;">Popup</span><span style="color:blue;">&gt;

&lt;</span><span style="color:#a31515;">RichTextBox </span><span style="color:red;">x</span><span style="color:blue;">:</span><span style="color:red;">Name</span><span style="color:blue;">=&quot;rtb&quot;
</span><span style="color:red;">   AcceptsReturn</span><span style="color:blue;">=&quot;False&quot;
   </span><span style="color:red;">BorderBrush</span><span style="color:blue;">=&quot;{</span><span style="color:#a31515;">x</span><span style="color:blue;">:</span><span style="color:#a31515;">Null</span><span style="color:blue;">}&quot; 
   </span><span style="color:red;">Background</span><span style="color:blue;">=&quot;{</span><span style="color:#a31515;">x</span><span style="color:blue;">:</span><span style="color:#a31515;">Null</span><span style="color:blue;">}&quot; </span><span style="color:red;">BorderThickness</span><span style="color:blue;">=&quot;1,1,0,0&quot;&gt;
   &lt;</span><span style="color:#a31515;">i</span><span style="color:blue;">:</span><span style="color:#a31515;">Interaction.Triggers</span><span style="color:blue;">&gt;
     &lt;</span><span style="color:#a31515;">i</span><span style="color:blue;">:</span><span style="color:#a31515;">EventTrigger </span><span style="color:red;">EventName</span><span style="color:blue;">=&quot;KeyUp&quot;&gt;
      &lt;</span><span style="color:#a31515;">Cinch</span><span style="color:blue;">:</span><span style="color:#a31515;">EventToCommandTrigger 
         </span><span style="color:red;">Command</span><span style="color:blue;">=&quot;{</span><span style="color:#a31515;">Binding </span><span style="color:red;">RichTextBoxKeyUp</span><span style="color:blue;">, </span></pre>
<pre class="code"><span style="color:blue;">                  </span><span style="color:red;">ElementName</span><span style="color:blue;">=TagsTxtBox}&quot;/&gt;
     &lt;/</span><span style="color:#a31515;">i</span><span style="color:blue;">:</span><span style="color:#a31515;">EventTrigger</span><span style="color:blue;">&gt;
     &lt;</span><span style="color:#a31515;">i</span><span style="color:blue;">:</span><span style="color:#a31515;">EventTrigger </span><span style="color:red;">EventName</span><span style="color:blue;">=&quot;KeyDown&quot;&gt;
      &lt;</span><span style="color:#a31515;">Cinch</span><span style="color:blue;">:</span><span style="color:#a31515;">EventToCommandTrigger 
         </span><span style="color:red;">Command</span><span style="color:blue;">=&quot;{</span><span style="color:#a31515;">Binding </span><span style="color:red;">RichTextBoxKeyDown</span><span style="color:blue;">,</span></pre>
<pre class="code"><span style="color:blue;">                  </span><span style="color:red;">ElementName</span><span style="color:blue;">=TagsTxtBox}&quot;/&gt;
     &lt;/</span><span style="color:#a31515;">i</span><span style="color:blue;">:</span><span style="color:#a31515;">EventTrigger</span><span style="color:blue;">&gt;
     &lt;</span><span style="color:#a31515;">i</span><span style="color:blue;">:</span><span style="color:#a31515;">EventTrigger </span><span style="color:red;">EventName</span><span style="color:blue;">=&quot;ContentChanged&quot;&gt;
      &lt;</span><span style="color:#a31515;">Cinch</span><span style="color:blue;">:</span><span style="color:#a31515;">EventToCommandTrigger 
         </span><span style="color:red;">Command</span><span style="color:blue;">=&quot;{</span><span style="color:#a31515;">Binding </span><span style="color:red;">RichTextBoxContentChanged</span><span style="color:blue;">, </span></pre>
<pre class="code"><span style="color:blue;">                  </span><span style="color:red;">ElementName</span><span style="color:blue;">=TagsTxtBox}&quot;/&gt;
     &lt;/</span><span style="color:#a31515;">i</span><span style="color:blue;">:</span><span style="color:#a31515;">EventTrigger</span><span style="color:blue;">&gt;
     &lt;</span><span style="color:#a31515;">i</span><span style="color:blue;">:</span><span style="color:#a31515;">EventTrigger </span><span style="color:red;">EventName</span><span style="color:blue;">=&quot;LostFocus&quot;&gt;
        &lt;</span><span style="color:#a31515;">Cinch</span><span style="color:blue;">:</span><span style="color:#a31515;">EventToCommandTrigger 
         </span><span style="color:red;">Command</span><span style="color:blue;">=&quot;{</span><span style="color:#a31515;">Binding </span><span style="color:red;">RichTextBoxLostFocus</span><span style="color:blue;">, </span></pre>
<pre class="code"><span style="color:blue;">                  </span><span style="color:red;">ElementName</span><span style="color:blue;">=TagsTxtBox}&quot;/&gt;
     &lt;/</span><span style="color:#a31515;">i</span><span style="color:blue;">:</span><span style="color:#a31515;">EventTrigger</span><span style="color:blue;">&gt;
   &lt;/</span><span style="color:#a31515;">i</span><span style="color:blue;">:</span><span style="color:#a31515;">Interaction.Triggers</span><span style="color:blue;">&gt;
&lt;/</span><span style="color:#a31515;">RichTextBox</span><span style="color:blue;">&gt;

&lt;/</span><span style="color:#a31515;">Grid</span><span style="color:blue;">&gt;</span></pre>
</td>
</tr>
</tbody>
</table>
<p>&#160;</p>
<p>As you see here; I used <strong>EventToCommandTrigger</strong> to invoke these events using Commands. And that’s gonna help MVVMers to create there own ViewModel for that control. (If they want) </p>
<p>I’m sure that Sacha Barber (This one who creates Cinch Framework) used WeakReferences. and that gonna help GC to do his work. <img style="border-style:none;" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://bunjeeb.files.wordpress.com/2012/04/wlemoticon-smile.png?w=500" /> Or simply you just use the delegate commands, or relay commands instead in PRISM. For me I prefer to use Cinch framework; I think it’s a preference.</p>
<p>TagsTextBox Control contains three properties:</p>
<ul>
<li>Tags DependencyProperty: To display tags in RichTextBox.</li>
<li>AllTags DependencyProperty: Which contains all tags to display it on autocomplete popup.</li>
<li>InlineUITags CLR read only property: Which contains the Tag Items that you can find it in RichTextBox.&#160; </li>
</ul>
<p>When user starts typing FilterPopupList will be executed. The Main functionality of this Method is to:</p>
<ul>
<li>Iterating into all InlineUIContainers to get tags texts.</li>
<li>Tags Popup will display = all tags except existing tags in RichTextBox.</li>
</ul>
<table border="0" cellspacing="0" cellpadding="2" width="502">
<tbody>
<tr>
<td valign="top" width="500">
<pre class="code"><span style="color:blue;">private void </span>FilterPopupList(<span style="color:blue;">string </span>changedText)
{
   <span style="color:blue;">if </span>(changedText == <span style="color:blue;">null</span>)
   {
      PopupTagsList.ItemsSource = <span style="color:blue;">null</span>;
      <span style="color:blue;">return</span>;
   }

   <span style="color:green;">//Get Tags from RichTextBox
   </span><span style="color:#2b91af;">List</span>&lt;<span style="color:blue;">string</span>&gt; newTags = <span style="color:blue;">new </span><span style="color:#2b91af;">List</span>&lt;<span style="color:blue;">string</span>&gt;();
   <span style="color:blue;">foreach </span>(<span style="color:#2b91af;">InlineUIContainer </span>inlineUiContainer 
                <span style="color:blue;">in this</span>.InlineUITags)
   {
     <span style="color:#2b91af;">TextBlock </span>tagNameTxtBlock = (<span style="color:#2b91af;">TextBlock</span>)((<span style="color:#2b91af;">StackPanel</span>)
      (((<span style="color:#2b91af;">Border</span>)inlineUiContainer.Child).Child)).Children[0];
            newTags.Add(tagNameTxtBlock.Text);
   }

   <span style="color:#2b91af;">IEnumerable</span>&lt;<span style="color:blue;">string</span>&gt; tags = <span style="color:blue;">this</span>.AllTags
                .Where(x =&gt; x.ToLower()
                         .Contains(changedText.ToLower()))
                                      .Except(newTags);

   PopupTagsList.ItemsSource = <span style="color:blue;">null</span>;
   PopupTagsList.ItemsSource = tags;
}</pre>
</td>
</tr>
</tbody>
</table>
<p>&#160;</p>
<p>When user commit tag insertion (by clicking enter or by choosing one of the items in the list); Then the source should be updated.</p>
<pre><strong><u>UpdateTagsPropertyAndBindingSource</u></strong><font face="Arial"> will do this work. Let me explain the logic<br />this method in three points.</font></pre>
<ul>
<li>Reset popup state if you want using <strong>isResetPopupState</strong> parameter.</li>
<li>Collecting the new added Tags.</li>
<li>Some Tags were deleted; so we should tell the source about it.</li>
<li>And Some tags were added; and we should tell the source about it also.</li>
<li>Update source using <strong>binding.UpdateSource()</strong></li>
<li>And Finally, Raise <strong>TagsChanged</strong> event which contains Tags Added &amp; Tags Deleted.
<p></li>
<table border="0" cellspacing="0" cellpadding="2" width="280">
<tbody>
<tr>
<td valign="top" width="278">
<pre class="code"><span style="color:blue;">private void </span>UpdateTagsPropertyAndBindingSource(</pre>
<pre class="code"><span style="color:blue;">          bool </span>isResetPopupState)
{
      <span style="color:blue;">if </span>(isResetPopupState)
         ResetPopupState();

      <span style="color:#2b91af;">IEnumerable</span>&lt;<span style="color:blue;">string</span>&gt; newTags = GetNewItemsAdded();

      <span style="color:green;">// If some item found in Tags Collection And 
      // not in RichTextBox; So we should delete it.
      </span><span style="color:#2b91af;">IEnumerable</span>&lt;<span style="color:blue;">string</span>&gt; mustBeDeleted = </pre>
<pre class="code">                           <span style="color:blue;">this</span>.Tags.Except(newTags);
      <span style="color:#2b91af;">List</span>&lt;<span style="color:blue;">string</span>&gt; mustBeDeletedList = <span style="color:blue;">null</span>;

      <span style="color:green;">//Tags must be deleted from the source
      </span><span style="color:blue;">int </span>mustBeDeletedCount = mustBeDeleted.Count();
      <span style="color:blue;">int </span>lastRemoveIndex = mustBeDeletedCount - 1;
      <span style="color:blue;">if </span>(mustBeDeletedCount &gt; 0)
      {
         mustBeDeletedList = mustBeDeleted.ToList();
         <span style="color:blue;">for </span>(<span style="color:blue;">int </span>i = lastRemoveIndex; i &gt;= 0; i--)
           <span style="color:blue;">this</span>.Tags.Remove(mustBeDeletedList[i]);
      }

       <span style="color:green;">//Tags must be added to the source
       </span><span style="color:#2b91af;">IEnumerable</span>&lt;<span style="color:blue;">string</span>&gt; mustBeAdded = </pre>
<pre class="code">                             newTags.Except(<span style="color:blue;">this</span>.Tags);
       <span style="color:#2b91af;">IEnumerable</span>&lt;<span style="color:blue;">string</span>&gt; mustBeAddedList = <span style="color:blue;">null</span>;
       <span style="color:blue;">int </span>mustBeAddedCount = mustBeAdded.Count();
       <span style="color:blue;">if </span>(mustBeAddedCount &gt; 0)
       {
         mustBeAddedList = mustBeAdded.ToList();
         <span style="color:blue;">foreach </span>(<span style="color:blue;">string </span>mustAddItem <span style="color:blue;">in </span>mustBeAdded)
           <span style="color:blue;">this</span>.Tags.Add(mustAddItem);
        }

        <span style="color:blue;">if </span>(mustBeDeletedCount &gt; 0 || mustBeAddedCount &gt; 0)
        {
         <span style="color:#2b91af;">BindingExpression </span>binding = </pre>
<pre class="code">           <span style="color:blue;">this</span>.GetBindingExpression(<span style="color:#2b91af;">TagsTextBox</span>.TagsProperty);
           <span style="color:blue;">if </span>(<span style="color:blue;">null </span>!= binding) binding.UpdateSource();

           <span style="color:blue;">if </span>(<span style="color:blue;">this</span>.TagsChanged != <span style="color:blue;">null</span>)
           {
             TagsChanged(binding.DataItem, </pre>
<pre class="code">               <span style="color:blue;">new </span><span style="color:#2b91af;">TagsChangedArgs</span>()
             {
                TagOwner = binding.DataItem,
                TagsAdded = mustBeAddedList,
                TagsDeleted = mustBeDeletedList
             });
          }
     }
 }</pre>
</td>
</tr>
</tbody>
</table>
</ul>
<p>Ok, One more thing to know, What If you have multiple instances of this control. And as you see in the video; that you can add entire new tag which is not listed in the auto complete popup list.<br />
  <br />So how could tell other controls that All Tags List changed?</p>
<p>If sure that you folks have many many solutions in binding, Observable collection has the ability to notify the UI when item added. yeah you are right.</p>
<p>I decided to use the Mediator in Cinch framework. Its really amazing (pub sub mechanism) which is like Event Aggregator in PRISM.</p>
<p>So I just publish new <strong>All Tags List</strong>. </p>
<p>I just passed the Id to refocus <strong>RichTextBox</strong>.</p>
<table border="0" cellspacing="0" cellpadding="2" width="497">
<tbody>
<tr>
<td valign="top" width="495">
<pre class="code">[<span style="color:#2b91af;">MediatorMessageSink</span>(bunjeeb.SL.Common.<span style="color:#2b91af;">MediatorMessages</span>.
            <span style="color:#2b91af;">TagsChangedMessage</span>.TagsChanged)]
        <span style="color:blue;">public void </span>CandidateTagsChangedMessage(
            <span style="color:#2b91af;">Tuple</span>&lt;<span style="color:blue;">int</span>, <span style="color:#2b91af;">IEnumerable</span>&lt;<span style="color:blue;">string</span>&gt;, <span style="color:#2b91af;">Type</span>&gt; tuple)
    {
       <span style="color:blue;">this</span>.AllTags = tuple.Item2;

       <span style="color:#2b91af;">PropertyInfo </span>pinfo = tuple.Item3.GetProperty(<span style="color:#a31515;">&quot;Id&quot;</span>);
       <span style="color:blue;">int </span>currentId = (<span style="color:blue;">int</span>)pinfo.GetValue(<span style="color:blue;">this</span>.DataContext,
                                                <span style="color:blue;">null</span>);
       <span style="color:blue;">int </span>updatedId = tuple.Item1;

       <span style="color:blue;">if </span>(updatedId == currentId)
           <span style="color:blue;">this</span>.rtb.Focus();
  }</pre>
</td>
</tr>
</tbody>
</table>
<p>&#160;</p>
<p>So the above code for the subscriber. And the publisher is our main view model.</p>
<table border="0" cellspacing="0" cellpadding="2" width="380">
<tbody>
<tr>
<td valign="top" width="380">
<pre class="code"><span style="color:blue;">public </span><span style="color:#2b91af;">ICommand </span>TagsChangedCommand { <span style="color:blue;">get</span>; <span style="color:blue;">set</span>; }
<span style="color:blue;">private void </span>OnTagsChangedCommand(<span style="color:#2b91af;">EventToCommandArgs </span>args)
{
    <span style="color:#2b91af;">TagsChangedArgs </span>e = args.EventArgs <span style="color:blue;">as </span><span style="color:#2b91af;">TagsChangedArgs</span>;

    <span style="color:green;">// TODO: Remove, add tags, Submit Changes to RIA Service
    // e.TagsAdded
    // e.TagsDeleted

    </span>bunjeeb.SL.Common.<span style="color:#2b91af;">MediatorMessages</span>.<span style="color:#2b91af;">TagsChangedMessage</span></pre>
<pre class="code"><span style="color:#2b91af;"></span>       .Send(<span style="color:blue;">new </span><span style="color:#2b91af;">Tuple</span>&lt;<span style="color:blue;">object</span>&gt;(e.TagOwner));
}</pre>
</td>
</tr>
</tbody>
</table>
<p>&#160;</p>
<p>This command is binded with our TagsTextBox.TagsChanged Event</p>
<table border="0" cellspacing="0" cellpadding="2" width="484">
<tbody>
<tr>
<td valign="top" width="482">
<pre class="code"><span style="color:blue;">&lt;</span><span style="color:#a31515;">bunjeebControls</span><span style="color:blue;">:</span><span style="color:#a31515;">TagsTextBox </span><span style="color:red;">x</span><span style="color:blue;">:</span><span style="color:red;">Name</span><span style="color:blue;">=&quot;MyTagsTextBox2&quot;
</span><span style="color:red;">   AllTags</span><span style="color:blue;">=&quot;{</span><span style="color:#a31515;">Binding </span><span style="color:red;">AllTags</span><span style="color:blue;">}&quot; 
</span><span style="color:red;">   Tags</span><span style="color:blue;">=&quot;{</span><span style="color:#a31515;">Binding </span><span style="color:red;">SomeTags2</span><span style="color:blue;">, </span><span style="color:red;">Mode</span><span style="color:blue;">=TwoWay}&quot; &gt;

    &lt;</span><span style="color:#a31515;">i</span><span style="color:blue;">:</span><span style="color:#a31515;">Interaction.Triggers</span><span style="color:blue;">&gt;
        &lt;</span><span style="color:#a31515;">i</span><span style="color:blue;">:</span><span style="color:#a31515;">EventTrigger </span><span style="color:red;">EventName</span><span style="color:blue;">=&quot;TagsChanged&quot;&gt;
            &lt;</span><span style="color:#a31515;">Cinch</span><span style="color:blue;">:</span><span style="color:#a31515;">EventToCommandTrigger 
        </span><span style="color:red;">Command</span><span style="color:blue;">=&quot;{</span><span style="color:#a31515;">Binding </span><span style="color:red;"><font>TagsChangedCommand</font></span><span style="color:blue;">}&quot;/&gt;
        &lt;/</span><span style="color:#a31515;">i</span><span style="color:blue;">:</span><span style="color:#a31515;">EventTrigger</span><span style="color:blue;">&gt;
    &lt;/</span><span style="color:#a31515;">i</span><span style="color:blue;">:</span><span style="color:#a31515;">Interaction.Triggers</span><span style="color:blue;">&gt;

&lt;/</span><span style="color:#a31515;">bunjeebControls</span><span style="color:blue;">:</span><span style="color:#a31515;">TagsTextBox</span><span style="color:blue;">&gt;
</span></pre>
</td>
</tr>
</tbody>
</table>
<p>&#160;</p>
<p>Sorry for not completing the 2nd article of pivot view control. I found that its more important to talk about Tagging Control. Since I did not any Silverlight Tagging Control.</p>
<p>That’s it. Wishing best coding in your life <img style="border-style:none;" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://bunjeeb.files.wordpress.com/2012/04/wlemoticon-smile.png?w=500" /></p>
<p><a href="https://skydrive.live.com/redir.aspx?cid=b31cd3cf1281f501&amp;resid=B31CD3CF1281F501!405&amp;parid=B31CD3CF1281F501!167&amp;authkey=!AIHQar4jUM47Zac">Download Sample</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bunjeeb.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bunjeeb.wordpress.com/183/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bunjeeb.com&#038;blog=16554110&#038;post=183&#038;subd=bunjeeb&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bunjeeb.com/2012/04/02/silverlight-tags-control-using-richtextbox-popup-and-listbox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/133f4fec9498509525f897faa8d4e7d9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">aburakab</media:title>
		</media:content>

		<media:content url="http://bunjeeb.files.wordpress.com/2012/04/wlemoticon-smile.png" medium="image">
			<media:title type="html">Smile</media:title>
		</media:content>

		<media:content url="http://bunjeeb.files.wordpress.com/2012/04/to_thumb.png" medium="image">
			<media:title type="html">to</media:title>
		</media:content>

		<media:content url="http://bunjeeb.files.wordpress.com/2012/04/wlemoticon-smile.png" medium="image">
			<media:title type="html">Smile</media:title>
		</media:content>

		<media:content url="http://bunjeeb.files.wordpress.com/2012/04/wlemoticon-smile.png" medium="image">
			<media:title type="html">Smile</media:title>
		</media:content>

		<media:content url="http://bunjeeb.files.wordpress.com/2012/04/wlemoticon-smile.png" medium="image">
			<media:title type="html">Smile</media:title>
		</media:content>
	</item>
		<item>
		<title>Silverlight Pivot View Control &#8211; Part 1</title>
		<link>http://bunjeeb.com/2012/03/13/silverlight-pivot-view-control-part-1/</link>
		<comments>http://bunjeeb.com/2012/03/13/silverlight-pivot-view-control-part-1/#comments</comments>
		<pubDate>Tue, 13 Mar 2012 13:35:53 +0000</pubDate>
		<dc:creator>bunjeeb</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[XAML]]></category>

		<guid isPermaLink="false">https://bunjeeb.wordpress.com/?p=162</guid>
		<description><![CDATA[&#160; Download Sample &#160; Just before one month from now, I worked with a new company; I really loved my new Job. New experience taken from Michael Ruddick; He is a Chief architect in T-Force. I will not forget to talk about Tareq Amin “The Vise president in T-Force”. He is a big fan of <a href="http://bunjeeb.com/2012/03/13/silverlight-pivot-view-control-part-1/" class="excerpt-more-link">[&#8230;]</a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bunjeeb.com&#038;blog=16554110&#038;post=162&#038;subd=bunjeeb&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>&nbsp;</p>
<p><a href="https://skydrive.live.com/redir.aspx?cid=b31cd3cf1281f501&amp;resid=B31CD3CF1281F501!403&amp;parid=B31CD3CF1281F501!167&amp;authkey=!AO7VSlvzeXLOpEo">Download Sample</a></p>
<p>&nbsp;</p>
<p>Just before one month from now, I worked with a new company; I really loved my new Job. New experience taken from Michael Ruddick; He is a Chief architect in T-Force.</p>
<p>I will not forget to talk about Tareq Amin “The Vise president in T-Force”. He is a big fan of the new Metro Apps style; Yeah Metro is amazing.</p>
<p>Tareq is listening to me a lot, sharing Ideas, respecting people.<br />
Also he is studying to make <a href="http://themamabee.com/2009/03/27/management-friday-googles-8020-innovation-model/">Google’s 80/20 Innovation Model</a> part of our work; or maybe to do like Innvoation Center in Amman Office; That’s really coool!</p>
<p>Ok, Lets talk about some geeky stuff here. Watch the video to see the output; And If you like it; Continue reading and download the sample from link below. <img class="wlEmoticon wlEmoticon-smile" style="border-style:none;" src="http://bunjeeb.files.wordpress.com/2012/03/wlemoticon-smile.png?w=500" alt="Smile" /></p>
<p>&nbsp;</p>
<p><a href="https://skydrive.live.com/redir.aspx?cid=b31cd3cf1281f501&amp;resid=B31CD3CF1281F501!403&amp;parid=B31CD3CF1281F501!167&amp;authkey=!AO7VSlvzeXLOpEo">Download Sample</a></p>
<p>&nbsp;</p>
<div id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:99c98c6e-bd1c-44fe-81f3-090e9602956c" class="wlWriterEditableSmartContent" style="display:inline;float:none;margin:0;padding:0;">
<div><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='448' height='252' src='http://www.youtube.com/embed/SP1ncz3l1bU?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;hd=1&#038;wmode=transparent' frameborder='0'></iframe></span></div>
</div>
<p>&nbsp;</p>
<p>I’ve just created a simple control, I called it Pivot View Control.</p>
<p>Simply this control contains</p>
<p><strong><span style="text-decoration:underline;"><span style="font-size:medium;"><span style="color:#000000;">PivotViewControl:</span><br />
</span></span></strong>this control divided into three parts:<br />
- <strong><span style="text-decoration:underline;">Title</span></strong>: Just a title for the Pivot Control (you can expose this property as a Dependency Property).<br />
- <strong><span style="text-decoration:underline;">Header</span></strong>: Contains Items Control for Tabs (or Pivot Headers).<br />
- <strong>Content</strong>: Each header related with a UIElement which loaded in the Content Presenter.</p>
<pre style="background-color:#ffffff;width:100%;"><span style="color:#0000ff;">&lt;</span><span style="color:#800000;">Grid</span> <span style="color:#ff0000;">x</span>:<span style="color:#ff0000;">Name</span>=<span style="color:#0000ff;">"LayoutRoot"</span> <span style="color:#ff0000;">Background</span>=<span style="color:#0000ff;">"White"</span><span style="color:#0000ff;">&gt;</span></pre>
<pre style="background-color:#ffffff;width:100%;">        <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">Grid.RowDefinitions</span><span style="color:#0000ff;">&gt;</span></pre>
<pre style="background-color:#ffffff;width:100%;">            <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">RowDefinition</span> <span style="color:#ff0000;">Height</span>=<span style="color:#0000ff;">"Auto"</span><span style="color:#0000ff;">/&gt;</span></pre>
<pre style="background-color:#ffffff;width:100%;">            <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">RowDefinition</span> <span style="color:#ff0000;">Height</span>=<span style="color:#0000ff;">"Auto"</span> <span style="color:#ff0000;">MinHeight</span>=<span style="color:#0000ff;">"30"</span><span style="color:#0000ff;">/&gt;</span></pre>
<pre style="background-color:#ffffff;width:100%;">            <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">RowDefinition</span><span style="color:#0000ff;">/&gt;</span></pre>
<pre style="background-color:#ffffff;width:100%;">        <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">Grid.RowDefinitions</span><span style="color:#0000ff;">&gt;</span></pre>
<pre style="background-color:#ffffff;width:100%;">        <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">TextBlock</span> <span style="color:#ff0000;">TextWrapping</span>=<span style="color:#0000ff;">"Wrap"</span></pre>
<pre style="background-color:#ffffff;width:100%;"><span style="color:#ff0000;">Text</span>=<span style="color:#0000ff;">"Title, select one of items below"</span></pre>
<pre style="background-color:#ffffff;width:100%;"><span style="color:#ff0000;">VerticalAlignment</span>=<span style="color:#0000ff;">"Center"</span></pre>
<pre style="background-color:#ffffff;width:100%;"><span style="color:#ff0000;">FontFamily</span>=<span style="color:#0000ff;">"Segoe UI Semibold"</span></pre>
<pre style="background-color:#ffffff;width:100%;"><span style="color:#ff0000;">FontSize</span>=<span style="color:#0000ff;">"21.333"</span> <span style="color:#ff0000;">Margin</span>=<span style="color:#0000ff;">"7,0,0,0"</span><span style="color:#0000ff;">/&gt;</span></pre>
<pre style="background-color:#ffffff;width:100%;">        <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">ListBox</span> <span style="color:#ff0000;">x</span>:<span style="color:#ff0000;">Name</span>=<span style="color:#0000ff;">"PivotItemsHeaderList"</span></pre>
<pre style="background-color:#ffffff;width:100%;"><span style="color:#ff0000;">SelectedItem</span>=<span style="color:#0000ff;">"{Binding SelectedItem, ElementName=PivotViewCtrl, </span></pre>
<pre style="background-color:#ffffff;width:100%;">Mode=TwoWay}"</pre>
<pre style="background-color:#ffffff;width:100%;">                 <span style="color:#ff0000;">Margin</span>=<span style="color:#0000ff;">"0"</span> <span style="color:#ff0000;">Grid</span>.<span style="color:#ff0000;">Row</span>=<span style="color:#0000ff;">"1"</span></pre>
<pre style="background-color:#ffffff;width:100%;"><span style="color:#ff0000;">Background</span>=<span style="color:#0000ff;">"#00000000"</span> <span style="color:#ff0000;">BorderBrush</span>=<span style="color:#0000ff;">"{x:Null}"</span></pre>
<pre style="background-color:#ffffff;width:100%;">                 <span style="color:#ff0000;">ItemsSource</span>=<span style="color:#0000ff;">"{Binding Items, ElementName=PivotViewCtrl}"</span></pre>
<pre style="background-color:#ffffff;width:100%;">                 <span style="color:#ff0000;">ItemsPanel</span>=<span style="color:#0000ff;">"{StaticResource ItemsPanelTemplate}"</span></pre>
<pre style="background-color:#ffffff;width:100%;">                 <span style="color:#ff0000;">ScrollViewer</span>.<span style="color:#ff0000;">VerticalScrollBarVisibility</span>=<span style="color:#0000ff;">"Disabled"</span></pre>
<pre style="background-color:#ffffff;width:100%;">                 <span style="color:#ff0000;">ScrollViewer</span>.<span style="color:#ff0000;">HorizontalScrollBarVisibility</span>=<span style="color:#0000ff;">"Disabled"</span></pre>
<pre style="background-color:#ffffff;width:100%;">          <span style="color:#ff0000;">ItemContainerStyle</span>=<span style="color:#0000ff;">"{StaticResource ListBoxItemContainerStyle}"</span></pre>
<pre style="background-color:#ffffff;width:100%;">                 <span style="color:#ff0000;">FontFamily</span>=<span style="color:#0000ff;">"Segoe WP SemiLight"</span> <span style="color:#ff0000;">FontSize</span>=<span style="color:#0000ff;">"24"</span></pre>
<pre style="background-color:#ffffff;width:100%;">                 <span style="color:#ff0000;">ItemTemplate</span>=<span style="color:#0000ff;">"{StaticResource DataTemplateListItem}"</span><span style="color:#0000ff;">/&gt;</span></pre>
<pre style="background-color:#ffffff;width:100%;">      <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">ContentPresenter</span> <span style="color:#ff0000;">x</span>:<span style="color:#ff0000;">Name</span>=<span style="color:#0000ff;">"ContentPresenter"</span> <span style="color:#ff0000;">Margin</span>=<span style="color:#0000ff;">"0"</span> <span style="color:#ff0000;">Grid</span>.<span style="color:#ff0000;">Row</span>=<span style="color:#0000ff;">"2"</span><span style="color:#0000ff;">&gt;</span></pre>
<pre style="background-color:#ffffff;width:100%;">          <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">ContentPresenter.Projection</span><span style="color:#0000ff;">&gt;</span></pre>
<pre style="background-color:#ffffff;width:100%;">              <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">PlaneProjection</span> <span style="color:#ff0000;">CenterOfRotationX</span>=<span style="color:#0000ff;">"0"</span><span style="color:#0000ff;">/&gt;</span></pre>
<pre style="background-color:#ffffff;width:100%;">          <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">ContentPresenter.Projection</span><span style="color:#0000ff;">&gt;</span></pre>
<pre style="background-color:#ffffff;width:100%;">      <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">ContentPresenter</span><span style="color:#0000ff;">&gt;</span></pre>
<pre style="background-color:#ffffff;width:100%;">    <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">Grid</span><span style="color:#0000ff;">&gt;</span></pre>
<p>The animation createed using Visual State Manager, In the next version I’m going to add many animation options. For now this animation is good <img class="wlEmoticon wlEmoticon-smile" style="border-style:none;" src="http://bunjeeb.files.wordpress.com/2012/03/wlemoticon-smile.png?w=500" alt="Smile" />.</p>
<p>Simply you can change the animation using Expression Blend, Go to states tab in blend and change the animation.</p>
<p>I have two states in my control;</p>
<p><strong>GoAway</strong>: will hide current displayed content. And this animation completed I will change the content of it.</p>
<p><strong>ComeIn</strong>: When <strong>GoAway</strong> animation completed and content changed.  Start the animation to bring the new content.</p>
<p><a href="http://bunjeeb.files.wordpress.com/2012/03/anim.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="Anim" src="http://bunjeeb.files.wordpress.com/2012/03/anim_thumb.png?w=283&#038;h=329" alt="Anim" width="283" height="329" border="0" /></a></p>
<p>This is the animation completed Event:</p>
<pre style="background-color:#ffffff;width:100%;"><span style="color:#0000ff;">void</span> StoryBoardGoAway_Completed(<span style="color:#0000ff;">object</span> sender, EventArgs e)</pre>
<pre style="background-color:#ffffff;width:100%;">{</pre>
<pre style="background-color:#ffffff;width:100%;">   <span style="color:#0000ff;">string</span> headerValue = <span style="color:#0000ff;">this</span>.PivotItemsHeaderList.SelectedItem.ToString();</pre>
<pre style="background-color:#ffffff;width:100%;">   var pivotItem = <span style="color:#0000ff;">this</span>.ItemsSource</pre>
<pre style="background-color:#ffffff;width:100%;">        .SingleOrDefault(p =&gt; p.Header == headerValue);</pre>
<pre style="background-color:#ffffff;width:100%;">   <span style="color:#0000ff;">this</span>.ContentPresenter.Content = (UIElement)pivotItem.Content;</pre>
<pre style="background-color:#ffffff;width:100%;">   VisualStateManager.GoToState(<span style="color:#0000ff;">this</span>, "<span style="color:#8b0000;">ComeIn</span>", <span style="color:#0000ff;">true</span>);</pre>
<pre style="background-color:#ffffff;width:100%;">}</pre>
<p><strong><span style="color:#000000;font-size:medium;">PivotItemControl.cs</span></strong></p>
<p>This control is a dependency control; Its something like Tab Item.</p>
<pre style="background-color:#ffffff;width:100%;"><span style="color:#0000ff;">public</span> <span style="color:#0000ff;">class</span> PivotItemControl : DependencyObject</pre>
<pre style="background-color:#ffffff;width:100%;">    {</pre>
<pre style="background-color:#ffffff;width:100%;">        <span style="color:#0000ff;">public</span> DependencyProperty HeaderProperty =</pre>
<pre style="background-color:#ffffff;width:100%;">            DependencyProperty.Register("<span style="color:#8b0000;">Header</span>", <span style="color:#0000ff;">typeof</span>(String),</pre>
<pre style="background-color:#ffffff;width:100%;">            <span style="color:#0000ff;">typeof</span>(PivotItemControl), <span style="color:#0000ff;">null</span>);</pre>
<pre style="background-color:#ffffff;width:100%;">         <span style="color:#0000ff;">public</span> String Header</pre>
<pre style="background-color:#ffffff;width:100%;">        {</pre>
<pre style="background-color:#ffffff;width:100%;">            <span style="color:#0000ff;">get</span></pre>
<pre style="background-color:#ffffff;width:100%;">            {</pre>
<pre style="background-color:#ffffff;width:100%;">                <span style="color:#0000ff;">return</span> (String)GetValue(HeaderProperty);</pre>
<pre style="background-color:#ffffff;width:100%;">            }</pre>
<pre style="background-color:#ffffff;width:100%;">            <span style="color:#0000ff;">set</span></pre>
<pre style="background-color:#ffffff;width:100%;">            {</pre>
<pre style="background-color:#ffffff;width:100%;">                SetValue(HeaderProperty, <span style="color:#0000ff;">value</span>);</pre>
<pre style="background-color:#ffffff;width:100%;">            }</pre>
<pre style="background-color:#ffffff;width:100%;">        }</pre>
<pre style="background-color:#ffffff;width:100%;">        <span style="color:#0000ff;">public</span> DependencyProperty ContentProperty =</pre>
<pre style="background-color:#ffffff;width:100%;">            DependencyProperty.Register("<span style="color:#8b0000;">Content</span>", <span style="color:#0000ff;">typeof</span>(UIElement),</pre>
<pre style="background-color:#ffffff;width:100%;">            <span style="color:#0000ff;">typeof</span>(PivotItemControl), <span style="color:#0000ff;">null</span>);</pre>
<pre style="background-color:#ffffff;width:100%;">         <span style="color:#0000ff;">public</span> UIElement Content</pre>
<pre style="background-color:#ffffff;width:100%;">        {</pre>
<pre style="background-color:#ffffff;width:100%;">            <span style="color:#0000ff;">get</span></pre>
<pre style="background-color:#ffffff;width:100%;">            {</pre>
<pre style="background-color:#ffffff;width:100%;">                <span style="color:#0000ff;">return</span> (UIElement)GetValue(ContentProperty);</pre>
<pre style="background-color:#ffffff;width:100%;">            }</pre>
<pre style="background-color:#ffffff;width:100%;">            <span style="color:#0000ff;">set</span></pre>
<pre style="background-color:#ffffff;width:100%;">            {</pre>
<pre style="background-color:#ffffff;width:100%;">                SetValue(ContentProperty, <span style="color:#0000ff;">value</span>);</pre>
<pre style="background-color:#ffffff;width:100%;">            }</pre>
<pre style="background-color:#ffffff;width:100%;">        }</pre>
<pre style="background-color:#ffffff;width:100%;">    }</pre>
<p><strong><span style="text-decoration:underline;">How to use it?</span></strong></p>
<pre style="background-color:#ffffff;width:100%;"><span style="color:#0000ff;">public</span> MainPage()</pre>
<pre style="background-color:#ffffff;width:100%;">        {</pre>
<pre style="background-color:#ffffff;width:100%;">            InitializeComponent();</pre>
<pre style="background-color:#ffffff;width:100%;">            <span style="color:#0000ff;">this</span>.Loaded += MainPage_Loaded;</pre>
<pre style="background-color:#ffffff;width:100%;">        }</pre>
<pre style="background-color:#ffffff;width:100%;">         <span style="color:#0000ff;">void</span> MainPage_Loaded(<span style="color:#0000ff;">object</span> sender, RoutedEventArgs e)</pre>
<pre style="background-color:#ffffff;width:100%;">        {</pre>
<pre style="background-color:#ffffff;width:100%;">            BindPivotItems();</pre>
<pre style="background-color:#ffffff;width:100%;">            <span style="color:#0000ff;">this</span>.Loaded -= MainPage_Loaded;</pre>
<pre style="background-color:#ffffff;width:100%;">        }</pre>
<pre style="background-color:#ffffff;width:100%;">       <span style="color:#0000ff;">private</span> <span style="color:#0000ff;">void</span> BindPivotItems()</pre>
<pre style="background-color:#ffffff;width:100%;">        {</pre>
<pre style="background-color:#ffffff;width:100%;">          List&lt;PivotItemControl&gt; list = <span style="color:#0000ff;">new</span> List&lt;PivotItemControl&gt;();</pre>
<pre style="background-color:#ffffff;width:100%;">          String[] headers = <span style="color:#0000ff;">new</span> <span style="color:#0000ff;">string</span>[] {"<span style="color:#8b0000;">details</span>","<span style="color:#8b0000;">documents</span>","<span style="color:#8b0000;">notes</span>"};</pre>
<pre style="background-color:#ffffff;width:100%;">             <span style="color:#0000ff;">foreach</span> (<span style="color:#0000ff;">string</span> item <span style="color:#0000ff;">in</span> headers)</pre>
<pre style="background-color:#ffffff;width:100%;">            {</pre>
<pre style="background-color:#ffffff;width:100%;">                 list.Add(<span style="color:#0000ff;">new</span> PivotItemControl()</pre>
<pre style="background-color:#ffffff;width:100%;">                        {</pre>
<pre style="background-color:#ffffff;width:100%;">                            Header=item,</pre>
<pre style="background-color:#ffffff;width:100%;">                            Content=<span style="color:#0000ff;">new</span> DummyContentControl() { Tag=item }</pre>
<pre style="background-color:#ffffff;width:100%;">                        });</pre>
<pre style="background-color:#ffffff;width:100%;">            }</pre>
<pre style="background-color:#ffffff;width:100%;">           <span style="color:#0000ff;">this</span>.PivotViewControl.ItemsSource = list;</pre>
<pre style="background-color:#ffffff;width:100%;">        }</pre>
<p>Some enhancements could occurred; like using one Usercontrol as a Content; And Change the DataContent when GoAway Animation Completed. But I think you need to Expose an Event, Yeah that gonna be great.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bunjeeb.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bunjeeb.wordpress.com/162/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bunjeeb.com&#038;blog=16554110&#038;post=162&#038;subd=bunjeeb&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bunjeeb.com/2012/03/13/silverlight-pivot-view-control-part-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/133f4fec9498509525f897faa8d4e7d9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">aburakab</media:title>
		</media:content>

		<media:content url="http://bunjeeb.files.wordpress.com/2012/03/wlemoticon-smile.png" medium="image">
			<media:title type="html">Smile</media:title>
		</media:content>

		<media:content url="http://bunjeeb.files.wordpress.com/2012/03/wlemoticon-smile.png" medium="image">
			<media:title type="html">Smile</media:title>
		</media:content>

		<media:content url="http://bunjeeb.files.wordpress.com/2012/03/anim_thumb.png" medium="image">
			<media:title type="html">Anim</media:title>
		</media:content>
	</item>
		<item>
		<title>My Experience with Mobile Ads</title>
		<link>http://bunjeeb.com/2011/11/28/my-experience-with-mobile-ads/</link>
		<comments>http://bunjeeb.com/2011/11/28/my-experience-with-mobile-ads/#comments</comments>
		<pubDate>Sun, 27 Nov 2011 23:08:54 +0000</pubDate>
		<dc:creator>bunjeeb</dc:creator>
				<category><![CDATA[Ads]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Phones]]></category>
		<category><![CDATA[Windows Phone 7]]></category>

		<guid isPermaLink="false">http://bunjeeb.wordpress.com/?p=131</guid>
		<description><![CDATA[Salam Dears, In the last months I was very busy; learnning Objective-C (iOS development). And the fruit comes with a simple application called Quraan Telawat. You can find the link above in this page.  Anyway, one of the most interesting experience that i&#8217;ve got is the Ads. Dude: what do you mean by Ads? Me: <a href="http://bunjeeb.com/2011/11/28/my-experience-with-mobile-ads/" class="excerpt-more-link">[&#8230;]</a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bunjeeb.com&#038;blog=16554110&#038;post=131&#038;subd=bunjeeb&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Salam Dears,</p>
<p>In the last months I was very busy; learnning Objective-C (iOS development). And the fruit comes with a simple application called Quraan Telawat.</p>
<p>You can find the link above in this page.  Anyway, one of the most interesting experience that i&#8217;ve got is the Ads.</p>
<p><strong>Dude</strong>: what do you mean by Ads?<br />
<strong>Me</strong>: Its an Advertising space that you reserve it in your application to browse Advertisements.</p>
<p><strong>Dude</strong>: Are they advertising on your app? How did they know you?<br />
<strong>Me</strong>: Actually, they do not know me. There are many known Ads providers in the world like google which have AdSense SDK, and AdFalcon for Noqush company.</p>
<p><strong>Dude</strong>: ok, I see. Is it only for phones?<br />
<strong>Me</strong>: nop, you can use it in your website, iOS apps, Android, and some of them are supporting WP7 also.</p>
<p><strong>                _ _<br />
Dude</strong>: {$.$} &#8230; And what about the money?<br />
<strong>Me</strong>: since 5th of November I&#8217;ve got around $43 &#8230; yeah not that much; but at the end its extra money comes from one app. In addition to the new experience.<br />
I want to share with you this site which created by one of google&#8217;s team its called <a title="Guide to the app galaxy." href="http://www.guidetotheappgalaxy.com" target="_blank">Guide to the App Galaxy</a></p>
<p><strong>Dude</strong>: Interesting, Nice UI!!<br />
<strong>Me</strong>: Yeah, It will answer all of your questions about monetizing your apps and some guidelines.</p>
<p>One more comment dude, I have till now 4,000 users. but actually not all of them are an active users now. so I found this wonderful tool that you can add it to your app and it will send to you the number of active users at this moment.</p>
<p><strong>Dude</strong>: really!!<br />
Its called Google Analytics. And you can <a title="Google Analytics" href="http://code.google.com/mobile/analytics/download.html?utm_source=appgalaxy&amp;utm_medium=web&amp;utm_campaign=about" target="_blank">download the SDK from here</a>. This SDK is mentioned in that Guide Galaxy portal.</p>
<p><strong>Dude</strong>: You said that there are many Ads providers. What should I use?<br />
<strong>Me</strong>: Actually I found <a title="Admob" href="http://www.admob.com" target="_blank">Admob</a> really great.</p>
<p><strong>Dude</strong>: Why?</p>
<p><strong>Me</strong>: Let me share with you something</p>
<p style="text-align:center;"><a href="http://bunjeeb.files.wordpress.com/2011/11/screen-shot-2011-11-28-at-12-43-31-am1.png" target="_blank"><img class="aligncenter  wp-image-144" title="Screen-Shot-2011-11-28-at-12.43.31-AM" src="http://bunjeeb.files.wordpress.com/2011/11/screen-shot-2011-11-28-at-12-43-31-am1.png?w=300&#038;h=165" alt="" width="300" height="165" /></a></p>
<p>This image contains a stats for each day. Number of Impressions, Requests, Fill Rate, ..a</p>
<p><strong>Dude</strong>: wait wait. Requests &amp; Impressions &#8230; what is the deference?</p>
<p><strong>Me</strong>: When a user open the app. &#8230; It will request an Ad.  but it could comes with Ad &#8230; And if it comes with Ad &#8230; Thats an Impression.</p>
<p><strong>Dude</strong>: Is there a way to make sure that all requests comes Impressions?<br />
<strong>Me</strong>: Yeah, AdMob already have this &#8230; they are also displaying Ads from AdSense .. And you can also handle this by code. So if there is no impassion display Ad from another provider. But its not the optimal way to solve this problem.</p>
<p>You can use &#8220;The mediator approach&#8221;&#8230; the mediator SDK will do the whole work and jumping between providers till it comes with an impression.</p>
<p>Its called <a title="AdWhirl" href="https://www.adwhirl.com/" target="_blank">AdWhirl</a> &#8230; I did not use it till now but it seems great.</p>
<p>Wishing you a googd luck dude, Good night.<br />
<strong>Dude</strong>: Good night.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bunjeeb.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bunjeeb.wordpress.com/131/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bunjeeb.com&#038;blog=16554110&#038;post=131&#038;subd=bunjeeb&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bunjeeb.com/2011/11/28/my-experience-with-mobile-ads/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/133f4fec9498509525f897faa8d4e7d9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">aburakab</media:title>
		</media:content>

		<media:content url="http://bunjeeb.files.wordpress.com/2011/11/screen-shot-2011-11-28-at-12-43-31-am1.png?w=300" medium="image">
			<media:title type="html">Screen-Shot-2011-11-28-at-12.43.31-AM</media:title>
		</media:content>
	</item>
		<item>
		<title>MVVM with ASP.net Using knockout JS Library</title>
		<link>http://bunjeeb.com/2011/07/30/mvvm-with-asp-net-using-knockout-js-library/</link>
		<comments>http://bunjeeb.com/2011/07/30/mvvm-with-asp-net-using-knockout-js-library/#comments</comments>
		<pubDate>Sat, 30 Jul 2011 18:36:06 +0000</pubDate>
		<dc:creator>bunjeeb</dc:creator>
				<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[knockout]]></category>
		<category><![CDATA[VB.net]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">https://bunjeeb.wordpress.com/2011/07/30/mvvm-with-asp-net-using-knockout-js-library/</guid>
		<description><![CDATA[Download Sample Code If you are a WPF or Silverlight developer; you should be familiar with the fancy binding and notification Mechanisms in it. MVVM pattern is dependent on these mechanisms to view data binding expressions. Fortunately, Steven Sanderson created a brilliant library to use MVVM pattern with ASP.net and he called it Knockoutjs What <a href="http://bunjeeb.com/2011/07/30/mvvm-with-asp-net-using-knockout-js-library/" class="excerpt-more-link">[&#8230;]</a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bunjeeb.com&#038;blog=16554110&#038;post=80&#038;subd=bunjeeb&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://tinyurl.com/7rplnen" title="Download Sample Code">Download Sample Code</a></p>
<p>If you are a WPF or Silverlight developer; you should be familiar with the fancy binding and notification Mechanisms in it.</p>
<p>MVVM pattern is dependent on these mechanisms to view data binding expressions.</p>
<p>Fortunately, <a href="http://blog.stevensanderson.com/">Steven Sanderson</a> created a brilliant library to use MVVM pattern with ASP.net and he called it <a href="http://knockoutjs.com/">Knockoutjs</a></p>
<p>What is Knockout library?</p>
<blockquote><p>Knockout is a JavaScript library that helps you to create rich, responsive display and editor user interfaces with a clean underlying data model. Any time you have sections of UI that update dynamically (e.g., changing depending on the user’s actions or when an external data source changes), KO can help you implement it more simply and maintainably.</p>
<p align="right"><a href="http://knockoutjs.com/documentation/introduction.html">Knockout documentation</a></p>
</blockquote>
<p>To learn this library you can start with this interactive tutorial <a title="http://learn.knockoutjs.com/" href="http://learn.knockoutjs.com/">http://learn.knockoutjs.com/</a></p>
<p>Now, Let’s do our first ASP.net application using this wonderful library</p>
<ul>
<li>Create a new Empty Web Application. (Name it <strong>KOTest</strong>)</li>
<li>Create a new person class as follows</li>
</ul>
<table width="480" border="0" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td valign="top" width="480">
<pre class="code"><span style="color:blue;">Public Class </span><span style="color:#2b91af;">Person </span><span style="color:blue;">Private </span>_FirstName <span style="color:blue;">As String Public Property </span>FirstName() <span style="color:blue;">As String Get Return </span>_FirstName
        <span style="color:blue;">End Get Set</span>(<span style="color:blue;">ByVal </span>value <span style="color:blue;">As String</span>)
            _FirstName = value
        <span style="color:blue;">End Set End Property Private </span>_LastName <span style="color:blue;">As String Public Property </span>LastName() <span style="color:blue;">As String Get Return </span>_LastName
        <span style="color:blue;">End Get Set</span>(<span style="color:blue;">ByVal </span>value <span style="color:blue;">As String</span>)
            _LastName = value
        <span style="color:blue;">End Set End Property Private </span>_Age <span style="color:blue;">As String Public Property </span>Age() <span style="color:blue;">As String Get Return </span>_Age
        <span style="color:blue;">End Get Set</span>(<span style="color:blue;">ByVal </span>value <span style="color:blue;">As String</span>)
            _Age = value
        <span style="color:blue;">End Set End Property End Class </span></pre>
</td>
</tr>
</tbody>
</table>
<ul>
<li>Add a web Service (ASMX Service) and call it ViewModelService.asmx</li>
<li>After adding this service uncomment the first line</li>
</ul>
<table width="480" border="0" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td valign="top" width="480">
<pre class="code">&lt;System.Web.Script.Services.<span style="color:#2b91af;">ScriptService</span>()&gt; _</pre>
</td>
</tr>
</tbody>
</table>
<ul>
<li>And Paste this method to it.</li>
</ul>
<table width="480" border="0" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td valign="top" width="480">
<pre class="code">    &lt;<span style="color:#2b91af;">WebMethod</span>()&gt; _
    <span style="color:blue;">Public Function </span>GetPerson() <span style="color:blue;">As </span><span style="color:#2b91af;">Person  </span><span style="color:blue;"> Return New </span><span style="color:#2b91af;">Person</span>() <span style="color:blue;">With </span>{
            .FirstName = <span style="color:#a31515;">"Mohammad"</span>,
            .LastName = <span style="color:#a31515;">"Najeeb"</span>,
            .Age = <span style="color:#a31515;">"27" </span>}</pre>
<pre class="code">    <span style="color:blue;">End Function</span></pre>
</td>
</tr>
</tbody>
</table>
<ul>
<ul>
<li>Add a new Web form page (call it <strong>ko.aspx</strong>).</li>
<li>Import two javascript libraries
<ul>
<li>jQuery 1.4.1 (You can download it from <a href="http://code.jquery.com/jquery-1.4.1.min.js">here</a>)</li>
<li>knockout 1.2.1 (You can download it from <a href="https://github.com/SteveSanderson/knockout/downloads">here</a>)</li>
<li>You can also add jQuery templates but I did not use it in my sample here (You can download it from <a href="https://github.com/jquery/jquery-tmpl">here</a>)</li>
</ul>
</li>
</ul>
</ul>
<table width="480" border="0" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td valign="top" width="480">
<pre class="code">    <span style="color:blue;">&lt;</span><span style="color:maroon;">script </span><span style="color:red;">src</span><span style="color:blue;">="JS/jquery-1.4.1.min.js" </span><span style="color:red;">type</span><span style="color:blue;">="text/javascript"&gt;&lt;/</span><span style="color:maroon;">script</span><span style="color:blue;">&gt; &lt;</span><span style="color:maroon;">script </span><span style="color:red;">src</span><span style="color:blue;">="JS/knockout-1.2.1.js" </span><span style="color:red;">type</span><span style="color:blue;">="text/javascript"&gt;&lt;/</span><span style="color:maroon;">script</span><span style="color:blue;">&gt;</span></pre>
</td>
</tr>
</tbody>
</table>
<ul>
<li>Now, Let’s create a person class in javascript</li>
</ul>
<table width="480" border="0" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td valign="top" width="480">
<pre class="code"><span style="color:#006400;">// Create a Person Class with Constructor  </span><span style="color:#006400;">// that takes two parameters (First Name &amp; Last Name) </span><span style="color:blue;">var </span>person = <span style="color:blue;">function </span>(fName, lName) {</pre>
<pre class="code">    <span style="color:blue;">this</span>.FirstName = ko.observable(fName),
    <span style="color:blue;">this</span>.LastName = ko.observable(lName),
    <span style="color:blue;">this</span>.Age = 0
};</pre>
</td>
</tr>
</tbody>
</table>
<p>As you see above. <strong>FirstName</strong> property and <strong>LastName</strong> property are Observables.</p>
<p>Observables (like <strong>FirstName</strong> and <strong>LastName</strong>) will notify the UI when they changed in <strong>viewModel</strong> object.</p>
<table width="480" border="0" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td valign="top" width="480">So the previous implementation for person class in javascript is similar to <strong>TwoWay</strong> binding in WPF.</td>
</tr>
</tbody>
</table>
<p><a href="http://bunjeeb.files.wordpress.com/2011/07/screen-shot-2011-08-06-at-12-33-12-pm.png"><img class="aligncenter size-medium wp-image-82" title="Screen Shot 2011-08-06 at 12.33.12 PM" src="http://bunjeeb.files.wordpress.com/2011/07/screen-shot-2011-08-06-at-12-33-12-pm.png?w=300&#038;h=110" alt="" width="300" height="110" /></a></p>
<p>If <strong>FirstName</strong> and <strong>LastName</strong> are not observables; The UI will display the values at the first time. but any change occurred in property will not be reflected to the UI.</p>
<table width="480" border="0" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td valign="top" width="480">Removing Observables from FirstName &amp; LastName similar to <strong>OneTime</strong> binding mode in WPF.</td>
</tr>
</tbody>
</table>
<p><img style="background-image:none;padding-left:0;padding-right:0;display:block;float:none;margin-left:auto;margin-right:auto;padding-top:0;border-width:0;" title="Screen Shot 2011-07-30 at 8.59.59 PM" src="http://bunjeeb.files.wordpress.com/2011/07/screen-shot-2011-07-30-at-8-59-59-pm_thumb.png?w=244&#038;h=98" alt="Screen Shot 2011-07-30 at 8.59.59 PM" width="244" height="98" border="0" /><br />
So if you want to do a <strong>OneTime</strong> binding change your person implementation in  JavaScript to be like this</p>
<table width="480" border="0" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td valign="top" width="480">
<pre class="code"><span style="color:blue;">var </span>person = <span style="color:blue;">function </span>(fName, lName) {
    <span style="color:blue;">this</span>.FirstName = fName,
    <span style="color:blue;">this</span>.LastName = lName,
    <span style="color:blue;">this</span>.Age = 0
};</pre>
</td>
</tr>
</tbody>
</table>
<p>But viewModel is not binded to the UI till now!! And this is our next step.</p>
<ul>
<li>Bind <strong>viewModel</strong> object to the UI &amp; get the values from Server by calling the web service.</li>
</ul>
<table width="480" border="0" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td valign="top" width="480">
<pre class="code">jQuery(<span style="color:blue;">function </span>() {
    ko.applyBindings(viewModel);
    KOTest.ViewModelService.GetPerson(onSuccess,
                                      onFail,
                                      <span style="color:blue;">null</span>, <span style="color:blue;">null</span>);
});</pre>
</td>
</tr>
</tbody>
</table>
<ul>
<li>As you know you need a Script manager to call the service. So please just add it at the top of the page inside the form tag.</li>
<li>When calling service succeeded; just set <strong>viewModel.person</strong> property</li>
</ul>
<table width="480" border="0" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td valign="top" width="480">
<pre class="code"><span style="color:blue;">function </span>onSuccess(result) {
            viewModel.person(<span style="color:blue;">new </span>person(
                             result.FirstName,
                             result.LastName
                             ));
        }</pre>
</td>
</tr>
</tbody>
</table>
<ul>
<li>Paste add this HTML in you page</li>
</ul>
<table width="433" border="0" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td valign="top" width="431">
<pre class="code"><span style="color:blue;">&lt;</span><span style="color:maroon;">div</span><span style="color:blue;">&gt;  </span><span style="color:blue;">&lt;</span><span style="color:maroon;">div</span><span style="color:blue;">&gt; &lt;</span><span style="color:maroon;">label </span><span style="color:red;">for</span><span style="color:blue;">="</span><span style="background:yellow;">&lt;%</span><span style="color:blue;">=</span>txtFirstName.ClientID <span style="background:yellow;">%&gt;</span><span style="color:blue;">"&gt; </span>First Name<span style="color:blue;">&lt;/</span><span style="color:maroon;">label</span><span style="color:blue;">&gt; &lt;</span><span style="color:maroon;">asp</span><span style="color:blue;">:</span><span style="color:maroon;">TextBox </span><span style="color:red;">ID</span><span style="color:blue;">="txtFirstName" </span><span style="color:red;">runat</span><span style="color:blue;">="server" </span><span style="color:red;"> data-bind</span><span style="color:blue;">="value:person().FirstName"&gt; &lt;/</span><span style="color:maroon;">asp</span><span style="color:blue;">:</span><span style="color:maroon;">TextBox</span><span style="color:blue;">&gt; &lt;/</span><span style="color:maroon;">div</span><span style="color:blue;">&gt; &lt;</span><span style="color:maroon;">div</span><span style="color:blue;">&gt; &lt;</span><span style="color:maroon;">label </span><span style="color:red;">for</span><span style="color:blue;">="</span><span style="background:yellow;">&lt;%</span><span style="color:blue;">=</span>txtLastName.ClientID <span style="background:yellow;">%&gt;</span><span style="color:blue;">"&gt; </span>Last Name<span style="color:blue;">&lt;/</span><span style="color:maroon;">label</span><span style="color:blue;">&gt; &lt;</span><span style="color:maroon;">asp</span><span style="color:blue;">:</span><span style="color:maroon;">TextBox </span><span style="color:red;">ID</span><span style="color:blue;">="txtLastName" </span><span style="color:red;">runat</span><span style="color:blue;">="server" </span><span style="color:red;"> data-bind</span><span style="color:blue;">="value:person().LastName"&gt; &lt;/</span><span style="color:maroon;">asp</span><span style="color:blue;">:</span><span style="color:maroon;">TextBox</span><span style="color:blue;">&gt; &lt;/</span><span style="color:maroon;">div</span><span style="color:blue;">&gt; &lt;</span><span style="color:maroon;">div</span><span style="color:blue;">&gt; &lt;</span><span style="color:maroon;">asp</span><span style="color:blue;">:</span><span style="color:maroon;">Button </span><span style="color:red;">ID</span><span style="color:blue;">="btnSubmit" </span><span style="color:red;">runat</span><span style="color:blue;">="server" </span><span style="color:red;"> Text</span><span style="color:blue;">="Submit" /&gt; &lt;/</span><span style="color:maroon;">div</span><span style="color:blue;">&gt; &lt;/</span><span style="color:maroon;">div</span><span style="color:blue;">&gt; </span></pre>
</td>
</tr>
</tbody>
</table>
<p>This is all what I have for Now. And Another Happy Weekend had been finished <img class="wlEmoticon wlEmoticon-sadsmile" style="border-style:none;" src="http://bunjeeb.files.wordpress.com/2011/07/wlemoticon-sadsmile.png?w=500" alt="Sad smile" />. Happy Ramadan for all. And See ya later.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bunjeeb.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bunjeeb.wordpress.com/80/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bunjeeb.com&#038;blog=16554110&#038;post=80&#038;subd=bunjeeb&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bunjeeb.com/2011/07/30/mvvm-with-asp-net-using-knockout-js-library/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/133f4fec9498509525f897faa8d4e7d9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">aburakab</media:title>
		</media:content>

		<media:content url="http://bunjeeb.files.wordpress.com/2011/07/screen-shot-2011-08-06-at-12-33-12-pm.png?w=300" medium="image">
			<media:title type="html">Screen Shot 2011-08-06 at 12.33.12 PM</media:title>
		</media:content>

		<media:content url="http://bunjeeb.files.wordpress.com/2011/07/screen-shot-2011-07-30-at-8-59-59-pm_thumb.png" medium="image">
			<media:title type="html">Screen Shot 2011-07-30 at 8.59.59 PM</media:title>
		</media:content>

		<media:content url="http://bunjeeb.files.wordpress.com/2011/07/wlemoticon-sadsmile.png" medium="image">
			<media:title type="html">Sad smile</media:title>
		</media:content>
	</item>
		<item>
		<title>Step by Step &#8211; Filtering List using Reactive Extensions (Rx Framework)</title>
		<link>http://bunjeeb.com/2011/07/14/step-by-step-filtering-list-using-reactive-extensions-rx-framework/</link>
		<comments>http://bunjeeb.com/2011/07/14/step-by-step-filtering-list-using-reactive-extensions-rx-framework/#comments</comments>
		<pubDate>Wed, 13 Jul 2011 23:05:47 +0000</pubDate>
		<dc:creator>bunjeeb</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Reactive Extensions]]></category>
		<category><![CDATA[Rx]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">https://bunjeeb.wordpress.com/2011/07/14/step-by-step-filtering-list-using-reactive-extensions-rx-framework/</guid>
		<description><![CDATA[Download Rx Framework from here. Install it. Create New Windows Forms project (you can choose WPF, Silverlight, WP7). I used WinForms in my example. Add TextBox and ListBox to it as you see below. &#160; 5.&#160;&#160; Add System.Reactive reference to your project (see image below). 6.&#160; Create any dummy data (you can use any repository <a href="http://bunjeeb.com/2011/07/14/step-by-step-filtering-list-using-reactive-extensions-rx-framework/" class="excerpt-more-link">[&#8230;]</a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bunjeeb.com&#038;blog=16554110&#038;post=74&#038;subd=bunjeeb&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<ol>
<li>Download Rx Framework from <a href="http://www.microsoft.com/download/en/details.aspx?id=26649">here</a>.</li>
<li>Install it.</li>
<li>Create New Windows Forms project (you can choose WPF, Silverlight, WP7). I used WinForms in my example.</li>
<li>Add TextBox and ListBox to it as you see below.</li>
</ol>
<p><a href="http://bunjeeb.files.wordpress.com/2011/07/screen-shot-2011-07-14-at-1-50-46-am.png"><img style="background-image:none;border-bottom:0;border-left:0;padding-left:0;padding-right:0;display:inline;border-top:0;border-right:0;padding-top:0;" title="Screen shot 2011-07-14 at 1.50.46 AM" border="0" alt="Screen shot 2011-07-14 at 1.50.46 AM" src="http://bunjeeb.files.wordpress.com/2011/07/screen-shot-2011-07-14-at-1-50-46-am_thumb.png?w=387&#038;h=183" width="387" height="183" /></a></p>
<p>&#160; 5.&#160;&#160; Add <strong>System.Reactive </strong>reference to your project (see image below).</p>
<p><a href="http://bunjeeb.files.wordpress.com/2011/07/screen-shot-2011-07-14-at-1-53-05-am.png"><img style="background-image:none;border-bottom:0;border-left:0;padding-left:0;padding-right:0;display:inline;border-top:0;border-right:0;padding-top:0;" title="Screen shot 2011-07-14 at 1.53.05 AM" border="0" alt="Screen shot 2011-07-14 at 1.53.05 AM" src="http://bunjeeb.files.wordpress.com/2011/07/screen-shot-2011-07-14-at-1-53-05-am_thumb.png?w=412&#038;h=239" width="412" height="239" /></a></p>
<p>6.&#160; Create any dummy data (you can use any repository you want) and just to make things fast <img style="border-style:none;" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://bunjeeb.files.wordpress.com/2011/07/wlemoticon-smile.png?w=500" /></p>
<p><a href="http://bunjeeb.files.wordpress.com/2011/07/screen-shot-2011-07-14-at-1-51-58-am.png"><img style="background-image:none;border-bottom:0;border-left:0;padding-left:0;padding-right:0;display:inline;border-top:0;border-right:0;padding-top:0;" title="Screen shot 2011-07-14 at 1.51.58 AM" border="0" alt="Screen shot 2011-07-14 at 1.51.58 AM" src="http://bunjeeb.files.wordpress.com/2011/07/screen-shot-2011-07-14-at-1-51-58-am_thumb.png?w=416&#038;h=74" width="416" height="74" /></a></p>
<p>7. Add this chunk of code.</p>
<p><a href="http://bunjeeb.files.wordpress.com/2011/07/screen-shot-2011-07-14-at-1-52-17-am.png"><img style="background-image:none;border-bottom:0;border-left:0;padding-left:0;padding-right:0;display:inline;border-top:0;border-right:0;padding-top:0;" title="Screen shot 2011-07-14 at 1.52.17 AM" border="0" alt="Screen shot 2011-07-14 at 1.52.17 AM" src="http://bunjeeb.files.wordpress.com/2011/07/screen-shot-2011-07-14-at-1-52-17-am_thumb.png?w=427&#038;h=124" width="427" height="124" /></a></p>
<p>When <strong><u>TextChanged</u></strong> raised the subscribed code will be executed Asynchronously.</p>
<p>That’s it. As simple as that.</p>
<p>Good night. <img style="border-style:none;" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://bunjeeb.files.wordpress.com/2011/07/wlemoticon-smile.png?w=500" /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bunjeeb.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bunjeeb.wordpress.com/74/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bunjeeb.com&#038;blog=16554110&#038;post=74&#038;subd=bunjeeb&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bunjeeb.com/2011/07/14/step-by-step-filtering-list-using-reactive-extensions-rx-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/133f4fec9498509525f897faa8d4e7d9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">aburakab</media:title>
		</media:content>

		<media:content url="http://bunjeeb.files.wordpress.com/2011/07/screen-shot-2011-07-14-at-1-50-46-am_thumb.png" medium="image">
			<media:title type="html">Screen shot 2011-07-14 at 1.50.46 AM</media:title>
		</media:content>

		<media:content url="http://bunjeeb.files.wordpress.com/2011/07/screen-shot-2011-07-14-at-1-53-05-am_thumb.png" medium="image">
			<media:title type="html">Screen shot 2011-07-14 at 1.53.05 AM</media:title>
		</media:content>

		<media:content url="http://bunjeeb.files.wordpress.com/2011/07/wlemoticon-smile.png" medium="image">
			<media:title type="html">Smile</media:title>
		</media:content>

		<media:content url="http://bunjeeb.files.wordpress.com/2011/07/screen-shot-2011-07-14-at-1-51-58-am_thumb.png" medium="image">
			<media:title type="html">Screen shot 2011-07-14 at 1.51.58 AM</media:title>
		</media:content>

		<media:content url="http://bunjeeb.files.wordpress.com/2011/07/screen-shot-2011-07-14-at-1-52-17-am_thumb.png" medium="image">
			<media:title type="html">Screen shot 2011-07-14 at 1.52.17 AM</media:title>
		</media:content>

		<media:content url="http://bunjeeb.files.wordpress.com/2011/07/wlemoticon-smile.png" medium="image">
			<media:title type="html">Smile</media:title>
		</media:content>
	</item>
		<item>
		<title>ASP.net Grid View with jQuery Ajax (Dynamic Load for ASCX HTML)</title>
		<link>http://bunjeeb.com/2011/07/06/asp-net-grid-view-with-jquery-ajax-dynamic-load-for-ascx-html/</link>
		<comments>http://bunjeeb.com/2011/07/06/asp-net-grid-view-with-jquery-ajax-dynamic-load-for-ascx-html/#comments</comments>
		<pubDate>Wed, 06 Jul 2011 15:26:28 +0000</pubDate>
		<dc:creator>bunjeeb</dc:creator>
				<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">https://bunjeeb.wordpress.com/2011/07/06/asp-net-grid-view-with-jquery-ajax-dynamic-load-for-ascx-html/</guid>
		<description><![CDATA[After a couple of months without touching anything related to WEB. I’m doing some refreshment by creating Web Diagram Tool using jQuery “Something like Visio on WEB”. Also my brother asked me to help to him to do a paging using AJAX. I found some articles that used Update Panel …Yuk!!! .. Come-on people! are <a href="http://bunjeeb.com/2011/07/06/asp-net-grid-view-with-jquery-ajax-dynamic-load-for-ascx-html/" class="excerpt-more-link">[&#8230;]</a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bunjeeb.com&#038;blog=16554110&#038;post=58&#038;subd=bunjeeb&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>After a couple of months without touching anything related to WEB. I’m doing some refreshment by creating Web Diagram Tool using jQuery “Something like Visio on WEB”.</p>
<p>Also my brother asked me to help to him to do a paging using AJAX.</p>
<p>I found some articles that used Update Panel …Yuk!!! .. Come-on people! are you still use it!! Update Panel could be useful sometimes. But its not a full AJAX. It will create a request for the whole page and when response comes back; It will refresh the part which in update panel.</p>
<p>I did something deferent and better. Its not new at all. Actually I worked on this task before a couple of years; I’m doing some refreshment, my brother just triggered me when he ask.</p>
<p>Simply, I loaded the <strong><u>Usercontrol</u></strong>&#160; dynamically. and the <strong><u>Usercontrol</u></strong> contains anything you want (in my case it’s a <strong><u>GridView</u></strong>). Tada! pretty easy.</p>
<p>to load controls dynamically use this static method. I you want to use it; just modify it by adding your control and set your own properties.</p>
<pre class="code"><span style="color:blue;">private static </span><span style="color:#2b91af;">String </span>GetGridControlContent(<span style="color:#2b91af;">String </span>controlLocation,</pre>
<pre class="code"> <span style="color:blue;">int </span>pgIndex, <span style="color:blue;">int </span>pgSize)
 {
   <span style="color:blue;">var </span>page = <span style="color:blue;">new </span><span style="color:#2b91af;">Page</span>();

   <span style="color:blue;">var </span>userControl = (<span style="color:#2b91af;">MyGridView</span>)page.LoadControl(controlLocation);

   <span style="color:blue;">if </span>(pgIndex &lt; 0)
         pgIndex = 0;

   userControl.PageSize = pgSize;
   userControl.PageIndex = pgIndex;

   page.Controls.Add(userControl);

   <span style="color:#2b91af;">String </span>htmlContent = <span style="color:#a31515;">&quot;&quot;</span>;

   <span style="color:blue;">using </span>(<span style="color:blue;">var </span>textWriter = <span style="color:blue;">new </span><span style="color:#2b91af;">StringWriter</span>())
   {
    <span style="color:#2b91af;">HttpContext</span>.Current.Server.Execute(page, textWriter, <span style="color:blue;">false</span>);
    htmlContent = textWriter.ToString();
   }
   <span style="color:blue;">return </span>htmlContent;
 }</pre>
<p>&#160;</p>
<p>As you see above; you can pass any parameter to the <strong><u>Usercontrol</u></strong> by creating a properties in that user control. For me I created <strong><u>PageSize</u></strong> &amp; <strong><u>PageIndex</u></strong> properties.</p>
<p>You can wrap this method in a web method to call it from Javascript.</p>
<div align="left">
<pre class="code">[<span style="color:#2b91af;">WebMethod</span>]
<span style="color:blue;">public static string </span>AjaxGetGridCtrl(<span style="color:blue;">int </span>pgIndex, <span style="color:blue;">int </span>pgSize)
{
     <span style="color:blue;">return </span>GetGridControlContent(<span style="color:#a31515;">&quot;~/MyGridView.ascx&quot;</span>, pgIndex, </pre>
<pre class="code">                                  pgSize);
}</pre>
</div>
<p>&#160;</p>
<p><font face="Courier New">So you can load you control using script mnager or using jQuery AJAX library. I used the 2nd choice</font></p>
<p><font face="Courier New"></font></p>
<pre class="code">$.ajax({
    type: <span style="color:maroon;">'POST'</span>,
    url: <span style="color:maroon;">'MyDefault.aspx/AjaxGetGridCtrl'</span>,
    contentType: <span style="color:maroon;">&quot;application/json; charset=utf-8&quot;</span>,
    dataType: <span style="color:maroon;">'json'</span>,
    success: <span style="color:blue;">function </span>(data) {
       $(<span style="color:maroon;">'#mainDiv'</span>).html(data.d);
    },
    data: <span style="color:maroon;">&quot;{pgIndex:'&quot; </span>+ pgIndex + <span style="color:maroon;">&quot;', pgSize:'&quot; </span>+ pgSize + <span style="color:maroon;">&quot;'}&quot;
 </span>});</pre>
<p>&#160;</p>
<p>&#160;</p>
<p>jQuery AJAX is really nice. Let’s talk more about the options above.</p>
<p><strong><u>type</u></strong>: you choose you either GET, or POST options.</p>
<p><strong><u>url</u></strong>: I request this URL using POST.</p>
<p><strong><u>contentType</u></strong>: used when you want to send data to the server (<strong><u>data</u></strong> is the last option). is this case the data will be sent in JSON format with UTF-8 Encoding.</p>
<p><strong><u>dataType</u></strong>: The type of data that you&#8217;re expecting back from the server.</p>
<p><strong><u>success</u></strong>: response will be handled here; if request succeeded. </p>
<p>I n this example; the HTML result will be rendered in <strong><u>mainDiv</u></strong> element.</p>
<p><strong><u>data</u></strong>: parameters will be sent to the web method here.</p>
<p>Current Page Index and Page Size are stored in a Hidden Fields. And when user clicked on Next button; the value will be added by 1. And the AJAX call started by sending the new PageIndex.</p>
<p>&#160;</p>
<pre class="code"><span style="color:blue;">function </span>FillGrid(flag) {

 <span style="color:blue;">var </span>pgIndex = 0;
 <span style="color:blue;">var </span>pgCurrentIndex = $(<span style="color:maroon;">'#txtPgIndex'</span>).attr(<span style="color:maroon;">'value'</span>);
 <span style="color:blue;">var </span>pgSize = $(<span style="color:maroon;">'#txtPgSize'</span>).attr(<span style="color:maroon;">'value'</span>);

 <span style="color:blue;">switch </span>(flag) {
      <span style="color:blue;">case </span><span style="color:maroon;">'prev'</span>:
          pgIndex = parseInt(pgCurrentIndex) - 1;
          <span style="color:blue;">break</span>;
      <span style="color:blue;">case </span><span style="color:maroon;">'next'</span>:
          pgIndex = parseInt(pgCurrentIndex) + 1;
                    <span style="color:blue;">break</span>;
            }

            $(<span style="color:maroon;">'#txtPgIndex'</span>).attr(<span style="color:maroon;">'value'</span>,pgIndex);

      $.ajax({
           type: <span style="color:maroon;">'POST'</span>,
           url: <span style="color:maroon;">'MyDefault.aspx/AjaxGetGridCtrl'</span>,
           contentType: <span style="color:maroon;">&quot;application/json; charset=utf-8&quot;</span>,
           dataType: <span style="color:maroon;">'json'</span>,
           success: <span style="color:blue;">function </span>(data) {
               $(<span style="color:maroon;">'#mainDiv'</span>).html(data.d);
           },
           data: <span style="color:maroon;">&quot;{pgIndex:'&quot; </span>+ pgIndex + <span style="color:maroon;">&quot;', pgSize:'&quot; </span>+ pgSize + <span style="color:maroon;">&quot;'}&quot;
       </span>});
    }</pre>
<p>&#160;</p>
<p>Calling GetGridControlContent will cause a crahs at this line</p>
<pre class="code"><span style="color:#2b91af;"></span>&#160;</pre>
<pre class="code"><span style="color:#2b91af;">HttpContext</span>.Current.Server.Execute(page, textWriter, <span style="color:blue;">false</span>);</pre>
<pre class="code">&#160;</pre>
<pre class="code">&#160;</pre>
<pre class="code">To avoid this crash; all you need to do is to add</pre>
<pre class="code">a [run at server form tag] to your Usercontrol</pre>
<pre class="code">&#160;</pre>
<pre class="code">&#160;</pre>
<pre class="code"><span style="background:yellow;">&lt;%</span><span style="color:blue;">@ </span><span style="color:maroon;">Control </span><span style="color:red;">Language</span><span style="color:blue;">=&quot;C#&quot; </span><span style="color:red;">AutoEventWireup</span><span style="color:blue;">=&quot;true&quot; </span></pre>
<pre class="code"><span style="color:blue;">    </span><span style="color:red;">CodeBehind</span><span style="color:blue;">=&quot;MyGridView.ascx.cs&quot; </span></pre>
<pre class="code"><span style="color:blue;"></span><span style="color:red;">    Inherits</span><span style="color:blue;">=&quot;test.MyGridView&quot; </span><span style="background:yellow;">%&gt;</span></pre>
<pre class="code"><span style="background:yellow;"></span></pre>
<pre class="code"><font><span style="color:blue;">&lt;</span><span style="color:maroon;">form </span><span style="color:red;">id</span><span style="color:blue;">=&quot;form1&quot; </span><span style="color:red;">runat</span></font><span style="color:blue;"><font>=&quot;server&quot;&gt;</font>
</span></pre>
<pre class="code"><span style="color:blue;">&lt;</span><span style="color:maroon;">asp</span><span style="color:blue;">:</span><span style="color:maroon;">GridView </span><span style="color:red;">ID</span><span style="color:blue;">=&quot;gv&quot; </span><span style="color:red;">runat</span><span style="color:blue;">=&quot;server&quot; </span><span style="color:red;">AllowPaging</span><span style="color:blue;">=&quot;true&quot; </span></pre>
<pre class="code"><span style="color:blue;">              </span><span style="color:red;">AutoGenerateColumns</span><span style="color:blue;">=&quot;False&quot;&gt;
    &lt;</span><span style="color:maroon;">Columns</span><span style="color:blue;">&gt;
        &lt;</span><span style="color:maroon;">asp</span><span style="color:blue;">:</span><span style="color:maroon;">BoundField </span><span style="color:red;">DataField</span><span style="color:blue;">=&quot;ID&quot; </span></pre>
<pre class="code"><span style="color:blue;">               </span><span style="color:red;">HeaderText</span><span style="color:blue;">=&quot;First Name&quot; </span><span style="color:red;">Visible</span><span style="color:blue;">=&quot;false&quot; /&gt;
        &lt;</span><span style="color:maroon;">asp</span><span style="color:blue;">:</span><span style="color:maroon;">BoundField </span><span style="color:red;">DataField</span><span style="color:blue;">=&quot;FirstName&quot; </span></pre>
<pre class="code"><span style="color:blue;">               </span><span style="color:red;">HeaderText</span><span style="color:blue;">=&quot;First Name&quot; /&gt;
        &lt;</span><span style="color:maroon;">asp</span><span style="color:blue;">:</span><span style="color:maroon;">BoundField </span><span style="color:red;">DataField</span><span style="color:blue;">=&quot;LastName&quot;</span></pre>
<pre class="code"><span style="color:blue;">               </span><span style="color:red;">HeaderText</span><span style="color:blue;">=&quot;Last Name&quot; /&gt;
        &lt;</span><span style="color:maroon;">asp</span><span style="color:blue;">:</span><span style="color:maroon;">BoundField </span><span style="color:red;">DataField</span><span style="color:blue;">=&quot;Mobile&quot; </span></pre>
<pre class="code"><span style="color:blue;">               </span><span style="color:red;">HeaderText</span><span style="color:blue;">=&quot;Mobile&quot; /&gt;
        &lt;</span><span style="color:maroon;">asp</span><span style="color:blue;">:</span><span style="color:maroon;">BoundField </span><span style="color:red;">DataField</span><span style="color:blue;">=&quot;EmpSalary&quot; </span></pre>
<pre class="code"><span style="color:blue;">               </span><span style="color:red;">HeaderText</span><span style="color:blue;">=&quot;Salary&quot; /&gt;
        &lt;</span><span style="color:maroon;">asp</span><span style="color:blue;">:</span><span style="color:maroon;">BoundField </span><span style="color:red;">DataField</span><span style="color:blue;">=&quot;HiringDate&quot; </span></pre>
<pre class="code"><span style="color:blue;">               </span><span style="color:red;">HeaderText</span><span style="color:blue;">=&quot;Hiring Date&quot; /&gt;
        &lt;</span><span style="color:maroon;">asp</span><span style="color:blue;">:</span><span style="color:maroon;">BoundField </span><span style="color:red;">DataField</span><span style="color:blue;">=&quot;DOB&quot; </span></pre>
<pre class="code"><span style="color:blue;">               </span><span style="color:red;">HeaderText</span><span style="color:blue;">=&quot;Date of Birth&quot; /&gt;
    &lt;/</span><span style="color:maroon;">Columns</span><span style="color:blue;">&gt;
&lt;/</span><span style="color:maroon;">asp</span><span style="color:blue;">:</span><span style="color:maroon;">GridView</span><span style="color:blue;">&gt;
&lt;</span><span style="color:maroon;">div </span><span style="color:red;">id</span><span style="color:blue;">=&quot;pgingFooter&quot;&gt;
    &lt;</span><span style="color:maroon;">a </span><span style="color:red;">href</span><span style="color:blue;">=&quot;javascript:void(0);&quot; </span><span style="color:red;">id</span><span style="color:blue;">=&quot;prev&quot;&gt;</span>Previous<span style="color:blue;">&lt;/</span><span style="color:maroon;">a</span><span style="color:blue;">&gt; </span></pre>
<pre class="code"><span style="color:blue;">        </span><span style="color:red;">&amp;nbsp;</span>|<span style="color:red;">&amp;nbsp; </span><span style="color:blue;">&lt;</span><span style="color:maroon;">a </span><span style="color:red;">href</span><span style="color:blue;">=&quot;javascript:void(0);&quot;
        </span><span style="color:red;">id</span><span style="color:blue;">=&quot;next&quot;&gt;</span>Next<span style="color:blue;">&lt;/</span><span style="color:maroon;">a</span><span style="color:blue;">&gt;
&lt;/</span><span style="color:maroon;">div</span><span style="color:blue;">&gt;</span></pre>
<pre class="code"><span style="color:blue;">
<font>&lt;/</font></span><font><span style="color:maroon;">form</span><span style="color:blue;">&gt;</span></font></pre>
<p>&#160;</p>
<p>And there is no magical things in the code behind for this user control, Just fill your GridView Control according to PageIndex &amp; PageSize properties.</p>
<pre class="code"><span style="color:blue;">public partial class </span><span style="color:#2b91af;">MyGridView </span>: System.Web.UI.<span style="color:#2b91af;">UserControl
    </span>{
        <span style="color:blue;">private </span><span style="color:#2b91af;">List</span>&lt;<span style="color:#2b91af;">Employee</span>&gt; lstEmployees;

        <span style="color:blue;">public int </span>PageSize { <span style="color:blue;">get</span>; <span style="color:blue;">set</span>; }
        <span style="color:blue;">public int </span>PageIndex { <span style="color:blue;">get</span>; <span style="color:blue;">set</span>; }

        <span style="color:blue;">protected void </span>Page_Load(<span style="color:blue;">object </span>sender, <span style="color:#2b91af;">EventArgs </span>e)
        {
            lstEmployees = <span style="color:blue;">new </span><span style="color:#2b91af;">List</span>&lt;<span style="color:#2b91af;">Employee</span>&gt;();

            FillList();
            lstEmployees = </pre>
<pre class="code">                       lstEmployees.Skip(<span style="color:blue;">this</span>.PageIndex * <span style="color:blue;">this</span>.PageSize)</pre>
<pre class="code">                                   .Take(<span style="color:blue;">this</span>.PageSize).ToList();

            gv.DataSource = lstEmployees;
            gv.DataBind();
        }

        <span style="color:blue;">private void </span>FillList()
        {
            <span style="color:blue;">for </span>(<span style="color:blue;">int </span>j = 1; j &lt;= 100; j++)
            {
                lstEmployees.Add(<span style="color:blue;">new </span><span style="color:#2b91af;">Employee </span>{ </pre>
<pre class="code">                     ID = j, FirstName = <span style="color:#a31515;">&quot;First&quot; </span>+ j, </pre>
<pre class="code">                     LastName = <span style="color:#a31515;">&quot;Last&quot; </span>+ j, </pre>
<pre class="code">                     Mobile = <span style="color:#a31515;">&quot;+932 55 1212&quot; </span>+ j, </pre>
<pre class="code">                     EmpSalary = j * 100, </pre>
<pre class="code">                     DOB = <span style="color:#a31515;">&quot;12/12/1990&quot;</span>, </pre>
<pre class="code">                     iringDate = <span style="color:#a31515;">&quot;12/12/2010&quot; </span>});
            }
        }
    }</pre>
<p>&#160;</p>
<p>You can download the sample from <a href="https://skydrive.live.com/?cid=b31cd3cf1281f501&amp;sc=documents&amp;uc=1&amp;id=B31CD3CF1281F501%21167#!/?cid=b31cd3cf1281f501&amp;sc=documents&amp;uc=1&amp;id=B31CD3CF1281F501%21368">here</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bunjeeb.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bunjeeb.wordpress.com/58/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bunjeeb.com&#038;blog=16554110&#038;post=58&#038;subd=bunjeeb&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bunjeeb.com/2011/07/06/asp-net-grid-view-with-jquery-ajax-dynamic-load-for-ascx-html/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/133f4fec9498509525f897faa8d4e7d9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">aburakab</media:title>
		</media:content>
	</item>
		<item>
		<title>Dev-igner On Blend4</title>
		<link>http://bunjeeb.com/2011/06/12/dev-igner-on-blend4/</link>
		<comments>http://bunjeeb.com/2011/06/12/dev-igner-on-blend4/#comments</comments>
		<pubDate>Sat, 11 Jun 2011 23:52:00 +0000</pubDate>
		<dc:creator>bunjeeb</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">https://bunjeeb.wordpress.com/2011/06/12/dev-igner-on-blend4/</guid>
		<description><![CDATA[I just finished my preparation for the session. Why Dev-igner? For me, I see Blend as a tool that helps developers &#38; Designers (Maybe the proper name is frontend Developers) … anyway, I’m sure that WPF, Silverlight is rarely used in Jordan; Because of: 1. Learning Curve; and as always I hear &#38; I say: <a href="http://bunjeeb.com/2011/06/12/dev-igner-on-blend4/" class="excerpt-more-link">[&#8230;]</a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bunjeeb.com&#038;blog=16554110&#038;post=54&#038;subd=bunjeeb&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I just finished my preparation for the session.</p>
<p>Why Dev-igner? For me, I see Blend as a tool that helps developers &amp; Designers (Maybe the proper name is frontend Developers) … anyway, I’m sure that WPF, Silverlight is rarely used in Jordan; Because of:</p>
<p>1. Learning Curve; and as always I hear &amp; I say: There is no time; so the small biz companies prefer to stick with Win Forms.</p>
<p>2. More Effort will be consumed to add WOOW effect to the application.</p>
<p>3. And Who Should Learn Blend? Developers? But they Love Visual Studio and they prefer to stay with it. Designers?! Same thing, they prefer illustrator &amp; Photoshop.</p>
<p>I agree with you both guys? But I’m sure that you did consume any moment to know that Blend is a great tool.</p>
<p>It’s easier to bind targets with source, Styling &amp; templating, XAMLing things, also you can Import your .AI, .PSD, and FXG files, and more.</p>
<p>If we say that Dev. should work on Blend; then he will do a catastrophe. (Thanks to their ugly taste).</p>
<p>And the Designer cannot do the whole Blendy things a lone also.</p>
<p>Finally, I face such situation and I played the 2-Face character in batman (the ugly side is the dev part); XAMLing things with VS 2008 is a really Shit. Things are better with VS 2010 but not so much.<br />
I forced to learn it and now I do not regret.</p>
<p>BLEND is the Best&#8230; I can imagine if Microsoft create such a tool for HTML5&#8230; I cannot wait for that moment.</p>
<p>Hoping you to enjoy my session:</p>
<p><strong>The Event will be at</strong><strong> </strong><strong>15 June 2011</strong> in Sumayah University.</p>
<p><a href="http://www.facebook.com/home.php?sk=group_2554681040#!/home.php?sk=group_2554681040">JorDev</a> will keeps you updated insha Allah.</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bunjeeb.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bunjeeb.wordpress.com/54/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bunjeeb.com&#038;blog=16554110&#038;post=54&#038;subd=bunjeeb&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bunjeeb.com/2011/06/12/dev-igner-on-blend4/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/133f4fec9498509525f897faa8d4e7d9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">aburakab</media:title>
		</media:content>
	</item>
		<item>
		<title>Host WCF Service in WAS</title>
		<link>http://bunjeeb.com/2011/02/19/host-wcf-service-in-was/</link>
		<comments>http://bunjeeb.com/2011/02/19/host-wcf-service-in-was/#comments</comments>
		<pubDate>Sat, 19 Feb 2011 11:04:54 +0000</pubDate>
		<dc:creator>bunjeeb</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[WCF]]></category>

		<guid isPermaLink="false">http://bunjeeb.wordpress.com/?p=35</guid>
		<description><![CDATA[Before doing these steps; host your WCF service in IIS. I assumed that you already did that. And my target here is to host the service in WAS with net.tcp port thank you. Installing WAS (you can ignore these steps if WAS already installed) 1.Control Panel &#62;&#62; Programs. 2.Under Programs and Features, click Turn Windows <a href="http://bunjeeb.com/2011/02/19/host-wcf-service-in-was/" class="excerpt-more-link">[&#8230;]</a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bunjeeb.com&#038;blog=16554110&#038;post=35&#038;subd=bunjeeb&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Before doing these steps; host your WCF service in IIS. I assumed that you already did that. And my target here is to host the service in <strong>WAS</strong> with<strong> net.tcp </strong>port <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  thank you.</p>
<p>Installing WAS (you can ignore these steps if WAS already installed)</p>
<div>1.Control Panel &gt;&gt; Programs.</div>
<div>2.Under Programs and Features, click Turn Windows Features On And Off.</div>
<div>3.Select <span style="text-decoration:underline;">Windows Process Activation Service and its sub-</span><span style="text-decoration:underline;">features.</span></div>
<div>4.Select <span style="text-decoration:underline;">Microsoft .</span><span style="text-decoration:underline;">NET Framework </span><span style="text-decoration:underline;">3.51 </span><span style="text-decoration:underline;">and its </span><span style="text-decoration:underline;">sub</span><span style="text-decoration:underline;"> </span><span style="text-decoration:underline;">features.</span></div>
<div>5.Click OK.</div>
<div>Let&#8217;s Configure the Host Environment for the <strong>WCF</strong> Service to Support the <strong>TCP</strong> Protocol:</div>
<p>1.  Start <strong><span style="text-decoration:underline;">inetmgr</span></strong> as administrator.</p>
<p>2.  Default site &gt;&gt; Right click &gt;&gt; Edit Bindings.</p>
<p>3.  If you have installed WAS correctly, it should list the default protocol bindings for the Web site, as shown in the following image:</p>
<p><a href="http://bunjeeb.files.wordpress.com/2011/02/wcf_tcp.jpg"><img class="alignnone size-medium wp-image-36" title="WCF_TCP" src="http://bunjeeb.files.wordpress.com/2011/02/wcf_tcp.jpg?w=320&#038;h=159" alt="Hosting WCF TCP Port" width="320" height="159" /></a></p>
<p>4.  Expand the Default Web Site item, and then click on your service (which is already hosted in IIS) application.</p>
<p>5.  Advanced Settings.</p>
<p>6.  In the Enabled Protocols add <strong>comma</strong> then <strong><span style="text-decoration:underline;">net.tcp</span></strong></p>
<p><a href="http://bunjeeb.files.wordpress.com/2011/02/wcf_tcp_1.jpg"><img class="alignnone size-medium wp-image-37" title="WCF_TCP_1" src="http://bunjeeb.files.wordpress.com/2011/02/wcf_tcp_1.jpg?w=320&#038;h=162" alt="Host WCF Service in WAS" width="320" height="162" /></a></p>
<p>7.  Click OK.</p>
<p>Now, Lets Configure the Client Application to Connect by Using the TCP Protocol.</p>
<ol>
<li>Test the service on the browser (copy paste the url to your browser) and make sure if it works.</li>
<li>Now, Regenerate the proxy using the <strong><em><span style="text-decoration:underline;">svcutil.exe</span></em></strong></li>
<li>Open the new <strong><em><span style="text-decoration:underline;">output.config</span></em></strong></li>
<li>Get the new TCP Binding &amp; endpoint from the file and add it to your client app.<br />
(The green bubbles below shows the net.tcp configuration).</li>
</ol>
<p><a href="http://bunjeeb.files.wordpress.com/2011/02/wcf_tcp_2.jpg"><img class="alignnone size-medium wp-image-38" title="WCF_TCP_2" src="http://bunjeeb.files.wordpress.com/2011/02/wcf_tcp_2.jpg?w=340&#038;h=195" alt="" width="340" height="195" /></a></p>
<p>5. Open the <strong><em><span style="text-decoration:underline;">main()</span></em></strong> method in your client application and paste this line below:</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="551" valign="top"><strong>ProductsServiceClient proxy = new ProductsServiceClient();</strong></td>
</tr>
</tbody>
</table>
<p>6. Run your app.</p>
<p>7. !!! What was that! Crash!</p>
<p><a href="http://bunjeeb.files.wordpress.com/2011/02/wcf-tcp-crash.jpg"><img class="alignnone size-medium wp-image-39" title="WCF TCP Crash" src="http://bunjeeb.files.wordpress.com/2011/02/wcf-tcp-crash.jpg?w=320&#038;h=194" alt="" width="320" height="194" /></a></p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="551" valign="top"><strong><span style="text-decoration:underline;">Note:</span> </strong><br />
You have more than one endpoint available; you must specify which endpoint to use.</td>
</tr>
</tbody>
</table>
<p>8. Just add your TCP endpoint’s name to your proxy constructor.</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="551" valign="top"><strong>ProductsServiceClient proxy = </strong><strong>new ProductsServiceClient(“NetTcpBinding_IService”);</strong></td>
</tr>
</tbody>
</table>
<p>TCP Endpoint name taken from:</p>
<p><a href="http://bunjeeb.files.wordpress.com/2011/02/wcf_tcp_3.jpg"><img class="alignnone size-medium wp-image-40" title="WCF_TCP_3" src="http://bunjeeb.files.wordpress.com/2011/02/wcf_tcp_3.jpg?w=320&#038;h=92" alt="" width="320" height="92" /></a></p>
<p><a href="http://bunjeeb.files.wordpress.com/2011/02/wcf_tcp_3.jpg"></a>10. Another Crash!! Go to the next step to solve that <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>11.Very important notes here:</p>
<ol>
<li>In most cases your machine will block the default TCP port; which is <strong><span style="text-decoration:underline;">808</span></strong>.</li>
<li>For testing turn off your firewall.</li>
<li>Add the port to the trusted ports:<br />
<a href="http://bunjeeb.files.wordpress.com/2011/02/wcf_tcp_4.jpg"><img class="alignnone size-medium wp-image-41" title="WCF_TCP_4" src="http://bunjeeb.files.wordpress.com/2011/02/wcf_tcp_4.jpg?w=340&#038;h=244" alt="" width="340" height="244" /></a></li>
<li>And to make sure that your Firewall will not block your port (if you do not turn it off); do the following:</li>
</ol>
<p style="padding-left:60px;">i.     Go to Windows Firewall with advanced security.<br />
<a href="http://bunjeeb.files.wordpress.com/2011/02/wcf_tcp_5.jpg"><img class="alignnone size-medium wp-image-42" title="WCF_TCP_5" src="http://bunjeeb.files.wordpress.com/2011/02/wcf_tcp_5.jpg?w=320&#038;h=115" alt="" width="320" height="115" /></a></p>
<p style="padding-left:60px;">ii.     And finally; add the port to <strong><em><span style="text-decoration:underline;">Inbound Rules</span></em></strong> and <strong><em><span style="text-decoration:underline;">Outbound Rules</span></em></strong>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bunjeeb.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bunjeeb.wordpress.com/35/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bunjeeb.com&#038;blog=16554110&#038;post=35&#038;subd=bunjeeb&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bunjeeb.com/2011/02/19/host-wcf-service-in-was/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/133f4fec9498509525f897faa8d4e7d9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">aburakab</media:title>
		</media:content>

		<media:content url="http://bunjeeb.files.wordpress.com/2011/02/wcf_tcp.jpg?w=300" medium="image">
			<media:title type="html">WCF_TCP</media:title>
		</media:content>

		<media:content url="http://bunjeeb.files.wordpress.com/2011/02/wcf_tcp_1.jpg?w=300" medium="image">
			<media:title type="html">WCF_TCP_1</media:title>
		</media:content>

		<media:content url="http://bunjeeb.files.wordpress.com/2011/02/wcf_tcp_2.jpg?w=300" medium="image">
			<media:title type="html">WCF_TCP_2</media:title>
		</media:content>

		<media:content url="http://bunjeeb.files.wordpress.com/2011/02/wcf-tcp-crash.jpg?w=300" medium="image">
			<media:title type="html">WCF TCP Crash</media:title>
		</media:content>

		<media:content url="http://bunjeeb.files.wordpress.com/2011/02/wcf_tcp_3.jpg?w=300" medium="image">
			<media:title type="html">WCF_TCP_3</media:title>
		</media:content>

		<media:content url="http://bunjeeb.files.wordpress.com/2011/02/wcf_tcp_4.jpg?w=300" medium="image">
			<media:title type="html">WCF_TCP_4</media:title>
		</media:content>

		<media:content url="http://bunjeeb.files.wordpress.com/2011/02/wcf_tcp_5.jpg?w=300" medium="image">
			<media:title type="html">WCF_TCP_5</media:title>
		</media:content>
	</item>
		<item>
		<title>Silverlight training for Designers</title>
		<link>http://bunjeeb.com/2010/12/19/silverlight-training-for-designers/</link>
		<comments>http://bunjeeb.com/2010/12/19/silverlight-training-for-designers/#comments</comments>
		<pubDate>Sun, 19 Dec 2010 21:59:37 +0000</pubDate>
		<dc:creator>bunjeeb</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Windows Phone 7]]></category>

		<guid isPermaLink="false">http://bunjeeb.wordpress.com/?p=28</guid>
		<description><![CDATA[Today I finished a special training which given by a Shane Morris. About Shane Morris Shane Morris is one of Australia’s most respected user experience professionals. Through consulting, mentoring and training he has helped organizations create compelling digital experiences since 1991. In that time he has worked on desktop applications, internet applications, mobile user interfaces, <a href="http://bunjeeb.com/2010/12/19/silverlight-training-for-designers/" class="excerpt-more-link">[&#8230;]</a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bunjeeb.com&#038;blog=16554110&#038;post=28&#038;subd=bunjeeb&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Today I finished a special training which given by a Shane Morris.</p>
<h3>About Shane Morris</h3>
<p>Shane Morris is one of Australia’s most respected user experience  professionals. Through consulting, mentoring and training he has helped organizations create compelling digital experiences since 1991. In that  time he has worked on desktop applications, internet applications,  mobile user interfaces, physical devices and web sites. Shane has taught  user experience topics around the world and is also a key contributor  to “101 Things I Learned in Interaction Design School” at ixd101.com.</p>
<p>Shane has worked with companies like Microsoft, Lonely Planet,  M&amp;C Saatchi, Cochlear, Amnesia Razorfish and Sensis &#8211; helping  creative and technical professionals collaborate to create services that  empower, inspire and reward. His passion is transforming the complex  and constrained into the simple and powerful. Not just because it&#8217;s  valuable endeavour, but because it&#8217;s hard &#8211; and therefore immensely  rewarding.</p>
<p>Shane&#8217;s previous experience includes:</p>
<ul>
<li>One of Microsoft&#8217;s first User Experience Evangelists world-wide.</li>
<li>Director of Echo Interaction Design for 6 years.</li>
<li>General Manager and Principal Consultant at The Hiser Group.</li>
</ul>
<p>&nbsp;</p>
<p>Its really awesome training. thank you AGENDA group and thank you Microsoft.</p>
<p>And special thanks for eSense to pay for that <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bunjeeb.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bunjeeb.wordpress.com/28/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bunjeeb.com&#038;blog=16554110&#038;post=28&#038;subd=bunjeeb&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bunjeeb.com/2010/12/19/silverlight-training-for-designers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/133f4fec9498509525f897faa8d4e7d9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">aburakab</media:title>
		</media:content>
	</item>
	</channel>
</rss>
