<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3473523060113863124</id><updated>2011-08-01T19:38:16.265-07:00</updated><category term='Binding.TargetUpdated'/><category term='WCF Error'/><category term='oil'/><category term='wpf custom xmlns'/><category term='input controls'/><category term='Large WCF Data error'/><category term='mousefocus'/><category term='Image'/><category term='DataBindingSource is Updated'/><category term='WPF Exceptions'/><category term='WPF Textbox Input character'/><category term='xmlns a url'/><category term='miniature building'/><category term='WPF ComboBox Binding'/><category term='oil on canvass'/><category term='silent exceptions'/><category term='miniature house'/><category term='Image Converter'/><category term='try..catch'/><category term='application level exceptions'/><category term='Zoom'/><category term='portrait'/><category term='WPF BitmapImageConveter'/><category term='WCF'/><category term='BitmapImageConveter'/><category term='wpf xmlns'/><category term='EventTrigger'/><category term='miniature painting'/><category term='RoutedEvent'/><category term='ComboBox Binding'/><category term='Bitmap Image Converter'/><category term='Animation'/><category term='WPF'/><category term='Textbox Input'/><category term='wpf namespace'/><category term='painting'/><category term='Channel'/><category term='WPF Animation'/><title type='text'>Gio's Blog</title><subtitle type='html'>Freedom of expression..
- Anything about Microsoft Technology
- Places to be.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://giovhan.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3473523060113863124/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://giovhan.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Gio</name><uri>http://www.blogger.com/profile/17133654476603300637</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>13</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3473523060113863124.post-7053045552575905449</id><published>2011-04-27T19:06:00.000-07:00</published><updated>2011-04-27T19:46:44.541-07:00</updated><title type='text'>April 28, 2011 a Microsoft Community Contributor Award!</title><content type='html'>&lt;a href="http://3.bp.blogspot.com/-_iAuSl8nwzU/TbjTTAmQVXI/AAAAAAAAAEg/ltvw6sr-okM/s1600/MCC11_Social-Media_Logo.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 100px; height: 100px;" src="http://3.bp.blogspot.com/-_iAuSl8nwzU/TbjTTAmQVXI/AAAAAAAAAEg/ltvw6sr-okM/s400/MCC11_Social-Media_Logo.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5600458460166641010" /&gt;&lt;/a&gt;&lt;span class="Apple-style-span"&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/-FT2McVFvCNQ/TbjSgWur4WI/AAAAAAAAAEY/N7bBfzuroZk/s1600/MCC11_Social%2BMedia_Logo.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;/a&gt;&lt;span class="Apple-style-span" &gt;I am proud and happy that today I got an email from Microsoft saying that "I was being recognized with Microsoft Community Contributor Award!"&lt;br /&gt;&lt;br /&gt;This award earned me access to more resources from Microsoft. And will empower more to people like me who like to share and contribute to the community.  Sharing and contributing to WPF and ADO.NET Entity forum is also a great opportunity to learn.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This is a great encouragement to me to continue what has been started.&lt;br /&gt;and I am proud to say that this is my first badge on this small blog. :-)&lt;br /&gt;&lt;br /&gt;Thanks Microsoft for giving me this &lt;a href="https://www.microsoftcommunitycontributor.com/"&gt;Microsoft Community Contributor Award&lt;/a&gt;.&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;I accepted it with both hands.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3473523060113863124-7053045552575905449?l=giovhan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://giovhan.blogspot.com/feeds/7053045552575905449/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3473523060113863124&amp;postID=7053045552575905449' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3473523060113863124/posts/default/7053045552575905449'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3473523060113863124/posts/default/7053045552575905449'/><link rel='alternate' type='text/html' href='http://giovhan.blogspot.com/2011/04/april-28-2011-microsoft-community.html' title='April 28, 2011 a Microsoft Community Contributor Award!'/><author><name>Gio</name><uri>http://www.blogger.com/profile/17133654476603300637</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-_iAuSl8nwzU/TbjTTAmQVXI/AAAAAAAAAEg/ltvw6sr-okM/s72-c/MCC11_Social-Media_Logo.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3473523060113863124.post-4514563641936558116</id><published>2011-04-24T00:46:00.000-07:00</published><updated>2011-04-28T02:58:26.303-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='wpf custom xmlns'/><category scheme='http://www.blogger.com/atom/ns#' term='xmlns a url'/><category scheme='http://www.blogger.com/atom/ns#' term='wpf namespace'/><category scheme='http://www.blogger.com/atom/ns#' term='wpf xmlns'/><title type='text'>How to make your xlmns pointing to URL</title><content type='html'>Quite a few WPF developer knows that we can customize on how XAML namespaces represents the actual assembly (.dll).  I too sometimes forgot how to customize it that is why I blogged this out.&lt;br /&gt;&lt;br /&gt;When we represent the assembly/namespaces (dll) in our XAML; we do specify like this&lt;br /&gt;&lt;pre name="code" class="brush:xml"&gt;   &lt;br /&gt;xmlns=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;&lt;br /&gt;  xmlns:x=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;When we have our own namespace or assembly of controls we declare something like the bottom so that we could use some controls.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="brush:xml"&gt;xmlns:custom=&amp;quot;clr-namespace:WpfCustomControlLibrary1;assembly=WpfCustomControlLibrary1&amp;quot;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Actually, we also do namespacing like that one on the top which represent the presentationcore.dll  To do it, we can put XMLDefinition in our namespaces.&lt;br /&gt;&lt;pre name="code" class="brush:c#"&gt;[assembly: XmlnsDefinition("http://www.gioVhan.com", "WpfCustomControlLibrary1")]&lt;br /&gt;namespace WpfCustomControlLibrary1&lt;br /&gt;{&lt;br /&gt;  .....&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;In this way, the "http://www.gioVhan.com" is the representation of our assembly thus we can type like.&lt;br /&gt;&lt;pre name="code" class="brush:xml"&gt;&lt;window class="WpfApplication1.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" x="http://schemas.microsoft.com/winfx/2006/xaml" custom="clr-namespace:WpfCustomControlLibrary1;assembly=WpfCustomControlLibrary1" mycustom="http://www.gioVhan.com" mycustomgroup="http://www.gioVhan.com/AnotherGroup" title="Window1" height="300" width="300"&gt;&lt;br /&gt;  &lt;grid&gt;&lt;br /&gt;      &lt;mycustom:customcontrol1 name="Control1"&gt;&lt;br /&gt;      &lt;mycustomgroup:customtextbox name="myTextBox"&gt;&lt;br /&gt;  &lt;/mycustomgroup:customtextbox&gt;&lt;/mycustom:customcontrol1&gt;&lt;/grid&gt;&lt;br /&gt;&lt;/window&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This is a very cool feature in WPF.  When designing your own assemblies, you can create something like this.  It will represent a more and clear namespace rather than pointing to clr-...&lt;br /&gt;&lt;br /&gt;I will check on VS2010/EF4.0 if this feature was changed.&lt;br /&gt;&lt;br /&gt;Thanks.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3473523060113863124-4514563641936558116?l=giovhan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://giovhan.blogspot.com/feeds/4514563641936558116/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3473523060113863124&amp;postID=4514563641936558116' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3473523060113863124/posts/default/4514563641936558116'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3473523060113863124/posts/default/4514563641936558116'/><link rel='alternate' type='text/html' href='http://giovhan.blogspot.com/2010/07/custom-wpf-xmlns-namespace.html' title='How to make your xlmns pointing to URL'/><author><name>Gio</name><uri>http://www.blogger.com/profile/17133654476603300637</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3473523060113863124.post-1683405902891655776</id><published>2011-03-23T20:27:00.000-07:00</published><updated>2011-03-23T20:53:02.930-07:00</updated><title type='text'>Does your Project Manager have these criteria?</title><content type='html'>I've been in the IT industry for a quite sometime and always working with passion.&lt;br /&gt;I've been a Project Manager &lt;span style="font-style:italic;"&gt;(sort of)&lt;/span&gt; since, I manage and handle almost all task in the Software Development Life Cycle.  From initial stage downto deployment and maintenance.&lt;br /&gt;From requirement gathering to development and testing.  I am very hands-on in terms of both Analysis and coding.&lt;br /&gt;&lt;br /&gt;I am proud to say I have masteral units in Business Management (&lt;span style="font-style:italic;"&gt;missing 6units :-)&lt;/span&gt; ) thus allows me to handle bad and good situations, decisions and planning.  MBM has a lot inside, to handle pressure, production, finance matters, people, etc.&lt;br /&gt;&lt;br /&gt;I am an observant type; I observed how people do react in a certain situation;&lt;br /&gt;I came to write track how far does your PM goes.  Or as the title itself.&lt;br /&gt;Here are Top 10 Qualities of PM (&lt;span style="font-style:italic;"&gt;from a good article&lt;/span&gt;)&lt;br /&gt;1. Inspired a Shared Vision&lt;br /&gt;2. Good Communicator&lt;br /&gt;3. Integrity&lt;br /&gt;4. Enthusiasm&lt;br /&gt;5. Empathy&lt;br /&gt;6. Competence&lt;br /&gt;7. Ability to Delegate Task&lt;br /&gt;8. Cool under pressure&lt;br /&gt;9. Team Building Skills&lt;br /&gt;10. Problem Solving Skills.&lt;br /&gt;&lt;br /&gt;You can add as many as you can.  You can also debate what is inside it.&lt;br /&gt;To be a good project manager you must also have like (wiki) &lt;br /&gt;&lt;br /&gt;http://en.wikipedia.org/wiki/Project_management&lt;br /&gt;&lt;br /&gt;Good PM doesnt always mean that you have a successful product delivery.&lt;br /&gt;It is how you plan, handle resources (both hardware and peopleware), react and handle  to situations in different aspects.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Article Link:&lt;br /&gt;http://www.projectsmart.co.uk/top-10-qualities-project-manager.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3473523060113863124-1683405902891655776?l=giovhan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://giovhan.blogspot.com/feeds/1683405902891655776/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3473523060113863124&amp;postID=1683405902891655776' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3473523060113863124/posts/default/1683405902891655776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3473523060113863124/posts/default/1683405902891655776'/><link rel='alternate' type='text/html' href='http://giovhan.blogspot.com/2011/03/does-your-project-manager-have-these.html' title='Does your Project Manager have these criteria?'/><author><name>Gio</name><uri>http://www.blogger.com/profile/17133654476603300637</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3473523060113863124.post-6732894676240181492</id><published>2011-03-21T23:43:00.001-07:00</published><updated>2011-04-27T22:27:35.727-07:00</updated><title type='text'>Question a Threading</title><content type='html'>I cannot believe somebody ask the expected result regarding threading.&lt;br /&gt;I came across to find out and prove if he is correct.&lt;br /&gt;&lt;br /&gt;The code snippet :&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="brush:c#"&gt;&lt;br /&gt;   class Program&lt;br /&gt;    {&lt;br /&gt;        static void Main(string[] args)&lt;br /&gt;        {&lt;br /&gt;            Thread s1 = new Thread(Display1);&lt;br /&gt;            Thread s2 = new Thread(Display2);&lt;br /&gt;&lt;br /&gt;            s1.Start();&lt;br /&gt;            s2.Start();&lt;br /&gt;            for (var i = 0; i &lt;= 10; i++)&lt;br /&gt;            {&lt;br /&gt;                Console.WriteLine(string.Format("Main 1 : {0}", i.ToString()));&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            Console.ReadKey();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        static void Display1()&lt;br /&gt;        {&lt;br /&gt;            for (var i = 0; i &lt;= 10; i++)&lt;br /&gt;            {&lt;br /&gt;                Console.WriteLine(string.Format("Display 1 : {0}", i.ToString()));&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;                static void Display2()&lt;br /&gt;        {&lt;br /&gt;            for (var i = 0; i &lt;= 10; i++)&lt;br /&gt;            {&lt;br /&gt;                Console.WriteLine(string.Format("Display 2 : {0}", i.ToString()));&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;According to the questionaire, the correct answer would be&lt;br /&gt;1. Display 1: 0 to Display 1: 10&lt;br /&gt;2. Main 1: 0 to Main 1: 10&lt;br /&gt;3. Display 2: 0 to Display 2: 10&lt;br /&gt;&lt;br /&gt;As I execute the code, it seems to negate the statement.  It would display, different display everytime I will execute.  This is because, there is a timing or a specific period of time where a thread will start.  But most of the time, it should go as expected.&lt;br /&gt;&lt;br /&gt;some output :&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/-06LJecspEHc/TYhMksj766I/AAAAAAAAAEI/87jqpMEjGC4/s1600/threadstart.JPG"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 259px;" src="http://4.bp.blogspot.com/-06LJecspEHc/TYhMksj766I/AAAAAAAAAEI/87jqpMEjGC4/s400/threadstart.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5586799531073989538" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If anybody wants to understand and have a good start regarding THREADING.&lt;br /&gt;you can start from here. &lt;br /&gt;&lt;br /&gt;http://msdn.microsoft.com/en-us/library/aa645740(v=vs.71).aspx&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3473523060113863124-6732894676240181492?l=giovhan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://giovhan.blogspot.com/feeds/6732894676240181492/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3473523060113863124&amp;postID=6732894676240181492' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3473523060113863124/posts/default/6732894676240181492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3473523060113863124/posts/default/6732894676240181492'/><link rel='alternate' type='text/html' href='http://giovhan.blogspot.com/2011/03/question-threading.html' title='Question a Threading'/><author><name>Gio</name><uri>http://www.blogger.com/profile/17133654476603300637</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-06LJecspEHc/TYhMksj766I/AAAAAAAAAEI/87jqpMEjGC4/s72-c/threadstart.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3473523060113863124.post-1518206485923210939</id><published>2009-12-05T06:30:00.001-08:00</published><updated>2009-12-05T07:21:58.136-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='EventTrigger'/><category scheme='http://www.blogger.com/atom/ns#' term='WPF Animation'/><category scheme='http://www.blogger.com/atom/ns#' term='Binding.TargetUpdated'/><category scheme='http://www.blogger.com/atom/ns#' term='Animation'/><category scheme='http://www.blogger.com/atom/ns#' term='RoutedEvent'/><category scheme='http://www.blogger.com/atom/ns#' term='DataBindingSource is Updated'/><title type='text'>WPF Animation when Databing source is updated.</title><content type='html'>I find a little time to blog this very nice feature on WPF.&lt;br /&gt;More and more people seems to play with WPF animation.&lt;br /&gt;&lt;br /&gt;Sometimes in a multi-user environment, updated data is very&lt;br /&gt;important aspect in computing.  Users wants to see what other&lt;br /&gt;people are doing with other data by just their own client machine.&lt;br /&gt;&lt;br /&gt;With a Mixture of RTI or any messenging over an infrastructure,&lt;br /&gt;and with CEP concepts, data can be PUSH and PULL over the wire.&lt;br /&gt;&lt;br /&gt;To play along for the user if their console will be updated&lt;br /&gt;with the new data, We will use just XAML code to detect if&lt;br /&gt;there are changes with our BindingSource.&lt;br /&gt;&lt;br /&gt;Here it is as simple.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_0lTP4sAq6t8/Sxp6HaL-DDI/AAAAAAAAADQ/ZrM_Svpclco/s1600-h/wpfanimation.PNG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 110px;" src="http://4.bp.blogspot.com/_0lTP4sAq6t8/Sxp6HaL-DDI/AAAAAAAAADQ/ZrM_Svpclco/s400/wpfanimation.PNG" alt="" id="BLOGGER_PHOTO_ID_5411772169946270770" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Using an EventTrigger with RoutedEvent="Binding.TargetUpdated"&lt;br /&gt;allows the WPF to detect if your datasource has been updated.&lt;br /&gt;If this is true, then the storyboard executes.  It changes the specific&lt;br /&gt;textbox (if you set this one on your textbox style) color from blue to transparent.&lt;br /&gt;Remember to set your this Trigger in your style.&lt;br /&gt;&lt;br /&gt;Have fun.&lt;br /&gt;&lt;br /&gt;Sometimes simple information helps.&lt;input id="gwProxy" type="hidden"&gt;&lt;!--Session data--&gt;&lt;input onclick="jsCall();" id="jsProxy" type="hidden"&gt;&lt;div id="refHTML"&gt;&lt;/div&gt;&lt;input id="gwProxy" type="hidden"&gt;&lt;!--Session data--&gt;&lt;input onclick="jsCall();" id="jsProxy" type="hidden"&gt;&lt;div id="refHTML"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3473523060113863124-1518206485923210939?l=giovhan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://giovhan.blogspot.com/feeds/1518206485923210939/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3473523060113863124&amp;postID=1518206485923210939' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3473523060113863124/posts/default/1518206485923210939'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3473523060113863124/posts/default/1518206485923210939'/><link rel='alternate' type='text/html' href='http://giovhan.blogspot.com/2009/12/wpf-animation-when-databing-source-is.html' title='WPF Animation when Databing source is updated.'/><author><name>Gio</name><uri>http://www.blogger.com/profile/17133654476603300637</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_0lTP4sAq6t8/Sxp6HaL-DDI/AAAAAAAAADQ/ZrM_Svpclco/s72-c/wpfanimation.PNG' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3473523060113863124.post-3590369730586365971</id><published>2009-12-02T07:28:00.000-08:00</published><updated>2010-05-27T22:34:29.467-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WPF Exceptions'/><category scheme='http://www.blogger.com/atom/ns#' term='silent exceptions'/><category scheme='http://www.blogger.com/atom/ns#' term='application level exceptions'/><category scheme='http://www.blogger.com/atom/ns#' term='try..catch'/><title type='text'>WPF Exception</title><content type='html'>Wow, it's been a while I haven't updated this blog.&lt;br /&gt;&lt;br /&gt;Some people are looking for direct answer and some people&lt;br /&gt;doesn't care at all but needs an answer.&lt;br /&gt;&lt;br /&gt;Today, I'll make straight points discussing WPF Exceptions.&lt;br /&gt;The list below are the basic way to catch or look an exception.&lt;br /&gt;&lt;br /&gt;&lt;div style="background-color: white; color: blue;"&gt;&lt;i&gt;1. Try..Catch..Finally block.&lt;/i&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: white; color: blue;"&gt;&lt;i&gt;2. Using the Application.DispatcherUnhandledException&lt;/i&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: white; color: blue;"&gt;&lt;i&gt;3. looking at Silent exceptions.&lt;/i&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;1. Try..Catch..Finaly block still the most commonly used to catch almost all types of errors during run-time.&lt;br /&gt;this statement is very easy to use... for example&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="c#"&gt;&lt;br /&gt;            string a = null;&lt;br /&gt;            try&lt;br /&gt;            {&lt;br /&gt;                if (a == null) throw new NullReferenceException();&lt;br /&gt;            }&lt;br /&gt;            catch (NullReferenceException e)&lt;br /&gt;            {&lt;br /&gt;                //exception 1&lt;br /&gt;            }&lt;br /&gt;            catch (FieldAccessException fex)&lt;br /&gt;            {&lt;br /&gt;                //exception 2.......&lt;br /&gt;            }&lt;br /&gt;            finally&lt;br /&gt;            {&lt;br /&gt;                //finally block executed with or without error....&lt;br /&gt;            }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;b style="color: red;"&gt;NOTE&lt;/b&gt; : If you are concerned about performance, I don't suggest that you use "try.. catch.." block.. this will swallow the exception and can possibly don't throw your exception to your UI level.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In this section I will not discuss handling this kind of exception in Multi-threading.&lt;br /&gt;&lt;br /&gt;2. Using the application level to catch exception thrown by any of your code is the most simple and yet effective type of catching error.  To do this in WPF,  you write your code in the Application.Xaml code behind.  On Application.xaml.vb (cs), type your custom handler on the Application_DispatcherUnhandledException() method.  This can catch your exception. voila...&lt;br /&gt;You can now have your exception handler without worrying other developers cathing&lt;br /&gt;exception.&lt;br /&gt;&lt;br /&gt;3. The last exception that I will be pointing out are those silent exceptions, silent exceptions&lt;br /&gt;mostly don't interact with your UI thread level.  If you are running your application inside&lt;br /&gt;your Visual Studio, you can actually locate them at the Output Window.  Most of these exceptions&lt;br /&gt;are caused sometimes by WPF databinding.  Using MVVM actually cannot detect binding errors&lt;br /&gt;at design time so be careful.&lt;br /&gt;Silent Exceptions also has performance penalty if you don't handle them.  So, you better&lt;br /&gt;check and clear these kind of exceptions in your apps.&lt;br /&gt;&lt;br /&gt;Make it simple.  The key to handle these exceptions.&lt;br /&gt;&lt;br /&gt;Enjoy.  GTG.  Thinking other things for my ASP.NET project.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;input id="gwProxy" type="hidden"&gt;&lt;input id="jsProxy" onclick="jsCall();" type="hidden"&gt;&lt;br /&gt;&lt;div id="refHTML"&gt;&lt;/div&gt;&lt;input id="gwProxy" type="hidden"&gt;&lt;!--Session data--&gt;&lt;input id="jsProxy" onclick="jsCall();" type="hidden"&gt;&lt;div id="refHTML"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3473523060113863124-3590369730586365971?l=giovhan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://giovhan.blogspot.com/feeds/3590369730586365971/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3473523060113863124&amp;postID=3590369730586365971' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3473523060113863124/posts/default/3590369730586365971'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3473523060113863124/posts/default/3590369730586365971'/><link rel='alternate' type='text/html' href='http://giovhan.blogspot.com/2009/12/wpf-exception.html' title='WPF Exception'/><author><name>Gio</name><uri>http://www.blogger.com/profile/17133654476603300637</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3473523060113863124.post-4566049643362586894</id><published>2009-07-07T17:39:00.000-07:00</published><updated>2010-06-13T03:36:45.884-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WPF'/><category scheme='http://www.blogger.com/atom/ns#' term='Zoom'/><category scheme='http://www.blogger.com/atom/ns#' term='mousefocus'/><category scheme='http://www.blogger.com/atom/ns#' term='Image'/><title type='text'>WPF Image Zoom when MouseFocus</title><content type='html'>I actually spent a day trying to figure out how to apply render transform to all images in a style.  It is pretty simple using XAML and this without using any-code behind.&lt;br /&gt;Then ScaleTransform ScaleX and ScaleY was binded to the ActualWidth and ActualHeight of the Image and make use of the “DoubleSplitConverter” to divide the width and height to enable the image transform on the center of its location. As what MSDN (http://msdn.microsoft.com/en-us/library/system.windows.media.scaletransform.aspx).&lt;br /&gt;&lt;br /&gt;XAML Code:&lt;br /&gt;&lt;pre name="code" class="xml" &gt;&lt;br /&gt;         &amp;lt;Style TargetType="{x:Type Image}" &amp;gt;&lt;br /&gt;                &amp;lt;Setter Property="Margin" Value="4"/&amp;gt;&lt;br /&gt;                &amp;lt;Setter Property="RenderTransform" &amp;gt;&lt;br /&gt;                    &amp;lt;Setter.Value&amp;gt;&lt;br /&gt;                        &amp;lt;ScaleTransform ScaleX="1" ScaleY="1" CenterX="{Binding RelativeSource={RelativeSource AncestorType={x:Type Image}, AncestorLevel=1}, Path=ActualWidth, Converter={StaticResource DoubleSplitConverter}}" CenterY="{Binding RelativeSource={RelativeSource AncestorType={x:Type Image}, AncestorLevel=1}, Path=ActualHeight, Converter={StaticResource DoubleSplitConverter}}" /&amp;gt;&lt;br /&gt;                    &amp;lt;/Setter.Value&amp;gt;&gt;&lt;br /&gt;                &amp;lt;/Setter&amp;gt;&lt;br /&gt;                &amp;lt;Style.Triggers&amp;gt;&lt;br /&gt;                    &amp;lt;EventTrigger RoutedEvent="Image.MouseEnter" &amp;gt;&lt;br /&gt;                        &amp;lt;BeginStoryboard&amp;gt;&lt;br /&gt;                            &amp;lt;Storyboard&amp;gt;&lt;br /&gt;                                &amp;lt;DoubleAnimation Storyboard.TargetProperty="(Image.RenderTransform).(ScaleTransform.ScaleX)" To="1.5" Duration="0:0:0.20" /&amp;gt;&lt;br /&gt;                                &amp;lt;DoubleAnimation Storyboard.TargetProperty="(Image.RenderTransform).(ScaleTransform.ScaleY)" To="1.5" Duration="0:0:0.20" /&amp;gt;&lt;br /&gt;&lt;br /&gt;                            &amp;lt;/Storyboard&amp;gt;&lt;br /&gt;                        &amp;lt;/BeginStoryboard&amp;gt;&lt;br /&gt;                    &amp;lt;/EventTrigger&amp;gt;&lt;br /&gt;                    &amp;lt;EventTrigger RoutedEvent="Image.MouseLeave" &amp;gt;&lt;br /&gt;                        &amp;lt;BeginStoryboard&amp;gt;&lt;br /&gt;                            &amp;lt;Storyboard&amp;gt;&lt;br /&gt;                                &amp;lt;DoubleAnimation Storyboard.TargetProperty="(Image.RenderTransform).(ScaleTransform.ScaleX)" To="1" Duration="0:0:0.20" /&amp;gt;&lt;br /&gt;                                &amp;lt;DoubleAnimation Storyboard.TargetProperty="(Image.RenderTransform).(ScaleTransform.ScaleY)" To="1" Duration="0:0:0.20" /&amp;gt;&lt;br /&gt;&lt;br /&gt;                            &amp;lt;/Storyboard&amp;gt;&lt;br /&gt;                        &amp;lt;/BeginStoryboard&amp;gt;&lt;br /&gt;                    &amp;lt;/EventTrigger&amp;gt;&lt;br /&gt;                &amp;lt;/Style.Triggers&amp;gt;&lt;br /&gt;            &amp;lt;/Style&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Then, we do have “DoubleAnimation” on RoutedEvent “Image.MouseEnter” which enables the scaleX and ScaleY to be adjusted to 1.5.  “MouseLeave” does it so to return to its size 1.&lt;br /&gt;The Storyboard.TargetProperty signifies that we apply these animation to the {Image.RenderTransform}.{ScaleTransform.ScaleX and Y}.  This statement will not work if we don’t have a value for our RenderTransform property of &amp;lt;ScaleTransform&amp;gt;&lt;br /&gt;This is the Converter to use just dividing it by 2.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="xml" &gt;&lt;br /&gt;    Public Class DoubleSplitConverter&lt;br /&gt;        Implements IValueConverter&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        Public Function Convert(ByVal value As Object, ByVal targetType As System.Type, ByVal parameter As Object, ByVal culture As System.Globalization.CultureInfo) As Object Implements System.Windows.Data.IValueConverter.Convert&lt;br /&gt;            Dim mValue As Double = value&lt;br /&gt;            Return mValue / 2&lt;br /&gt;        End Function&lt;br /&gt;&lt;br /&gt;        Public Function ConvertBack(ByVal value As Object, ByVal targetType As System.Type, ByVal parameter As Object, ByVal culture As System.Globalization.CultureInfo) As Object Implements System.Windows.Data.IValueConverter.ConvertBack&lt;br /&gt;            Dim mValue As Double = value&lt;br /&gt;            Return mValue * 2&lt;br /&gt;        End Function&lt;br /&gt;    End Class&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Hope you like it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3473523060113863124-4566049643362586894?l=giovhan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://giovhan.blogspot.com/feeds/4566049643362586894/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3473523060113863124&amp;postID=4566049643362586894' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3473523060113863124/posts/default/4566049643362586894'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3473523060113863124/posts/default/4566049643362586894'/><link rel='alternate' type='text/html' href='http://giovhan.blogspot.com/2009/07/wpf-image-zoom-when-mousefocus.html' title='WPF Image Zoom when MouseFocus'/><author><name>Gio</name><uri>http://www.blogger.com/profile/17133654476603300637</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3473523060113863124.post-2021991885801867565</id><published>2009-06-10T21:42:00.000-07:00</published><updated>2009-07-07T19:12:12.421-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='oil'/><category scheme='http://www.blogger.com/atom/ns#' term='portrait'/><category scheme='http://www.blogger.com/atom/ns#' term='oil on canvass'/><title type='text'>Oil on Canvass and Butterfly wings</title><content type='html'>I'll post another great art by my sister.   This is I think Oil in canvass.&lt;br /&gt;I know for a fact that she can paint in a charcoal but this is something&lt;br /&gt;she loved to do.&lt;br /&gt;&lt;br /&gt;Although I am not an artist since by default I am Software Developer,&lt;br /&gt;but I appreciate this kind of mastery.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;A. Fisherman dragging his boat to shore.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_0lTP4sAq6t8/SjCNKK0VQVI/AAAAAAAAACY/skt3_fsP_Gk/s1600-h/paint3.GIF"&gt;&lt;img style="cursor: pointer; width: 320px; height: 240px;" src="http://4.bp.blogspot.com/_0lTP4sAq6t8/SjCNKK0VQVI/AAAAAAAAACY/skt3_fsP_Gk/s320/paint3.GIF" alt="" id="BLOGGER_PHOTO_ID_5345927963530838354" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;B. Horsey&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_0lTP4sAq6t8/SjCNJ85JxWI/AAAAAAAAACQ/7T17fUEA2io/s1600-h/paint2.GIF"&gt;&lt;img style="cursor: pointer; width: 320px; height: 240px;" src="http://3.bp.blogspot.com/_0lTP4sAq6t8/SjCNJ85JxWI/AAAAAAAAACQ/7T17fUEA2io/s320/paint2.GIF" alt="" id="BLOGGER_PHOTO_ID_5345927959792960866" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;C. Herself on Sinulog outfit.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_0lTP4sAq6t8/SjCNJiCBIxI/AAAAAAAAACI/5MMQqevkcXE/s1600-h/paint0.GIF"&gt;&lt;img style="cursor: pointer; width: 240px; height: 320px;" src="http://2.bp.blogspot.com/_0lTP4sAq6t8/SjCNJiCBIxI/AAAAAAAAACI/5MMQqevkcXE/s320/paint0.GIF" alt="" id="BLOGGER_PHOTO_ID_5345927952582386450" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Do you believe the following are butterfly wings that are joined&lt;br /&gt;together to create a stunning image.&lt;br /&gt;&lt;br /&gt;D. Froggy&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_0lTP4sAq6t8/SjCNKX_v2EI/AAAAAAAAACo/GRpBMbbPeP0/s1600-h/paint5.GIF"&gt;&lt;img style="cursor: pointer; width: 320px; height: 240px;" src="http://3.bp.blogspot.com/_0lTP4sAq6t8/SjCNKX_v2EI/AAAAAAAAACo/GRpBMbbPeP0/s320/paint5.GIF" alt="" id="BLOGGER_PHOTO_ID_5345927967068379202" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;D. Birdy.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_0lTP4sAq6t8/SjCNKMAAAqI/AAAAAAAAACg/VHNK0706ddY/s1600-h/paint4.GIF"&gt;&lt;img style="cursor: pointer; width: 320px; height: 240px;" src="http://3.bp.blogspot.com/_0lTP4sAq6t8/SjCNKMAAAqI/AAAAAAAAACg/VHNK0706ddY/s320/paint4.GIF" alt="" id="BLOGGER_PHOTO_ID_5345927963848213154" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;These are only sample of their great skills.&lt;br /&gt;I will try to program this in WPF and see if works.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3473523060113863124-2021991885801867565?l=giovhan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://giovhan.blogspot.com/feeds/2021991885801867565/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3473523060113863124&amp;postID=2021991885801867565' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3473523060113863124/posts/default/2021991885801867565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3473523060113863124/posts/default/2021991885801867565'/><link rel='alternate' type='text/html' href='http://giovhan.blogspot.com/2009/06/ill-post-another-great-art-by-my-sister.html' title='Oil on Canvass and Butterfly wings'/><author><name>Gio</name><uri>http://www.blogger.com/profile/17133654476603300637</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_0lTP4sAq6t8/SjCNKK0VQVI/AAAAAAAAACY/skt3_fsP_Gk/s72-c/paint3.GIF' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3473523060113863124.post-4149443838301502806</id><published>2009-05-13T21:44:00.000-07:00</published><updated>2009-12-02T05:12:37.874-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='miniature house'/><category scheme='http://www.blogger.com/atom/ns#' term='miniature painting'/><category scheme='http://www.blogger.com/atom/ns#' term='painting'/><category scheme='http://www.blogger.com/atom/ns#' term='miniature building'/><title type='text'>Family of Artist - miniatures and lifesize</title><content type='html'>I got to stop thinking WPF and .Net for a while; and share this&lt;br /&gt;very amazing craftman's work.  All images you will see below&lt;br /&gt;are made of cartoon or cardboard.  It's amazing how this guy&lt;br /&gt;created a masterpiece.&lt;br /&gt;&lt;br /&gt;A.  Would you believe this is a lampshade? It's about 20 inches tall 13in wide.&lt;br /&gt;You will see more images&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_0lTP4sAq6t8/SgukQTzj8TI/AAAAAAAAABQ/GaJS9vuFIbc/s1600-h/pagoda6.JPG"&gt;&lt;img style="cursor: pointer; width: 314px; height: 235px;" src="http://2.bp.blogspot.com/_0lTP4sAq6t8/SgukQTzj8TI/AAAAAAAAABQ/GaJS9vuFIbc/s320/pagoda6.JPG" alt="" id="BLOGGER_PHOTO_ID_5335538783651885362" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_0lTP4sAq6t8/SgukQWenkZI/AAAAAAAAABI/tyv5m44MA80/s1600-h/pagoda5.JPG"&gt;&lt;img style="cursor: pointer; width: 314px; height: 235px;" src="http://2.bp.blogspot.com/_0lTP4sAq6t8/SgukQWenkZI/AAAAAAAAABI/tyv5m44MA80/s320/pagoda5.JPG" alt="" id="BLOGGER_PHOTO_ID_5335538784369349010" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_0lTP4sAq6t8/SgukQU8ZCDI/AAAAAAAAABA/vTzOSorving/s1600-h/pagoda2.JPG"&gt;&lt;img style="cursor: pointer; width: 235px; height: 314px;" src="http://4.bp.blogspot.com/_0lTP4sAq6t8/SgukQU8ZCDI/AAAAAAAAABA/vTzOSorving/s320/pagoda2.JPG" alt="" id="BLOGGER_PHOTO_ID_5335538783957354546" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_0lTP4sAq6t8/SgujFPFDjlI/AAAAAAAAAA4/W_O-blB4XXg/s1600-h/pagoda1.JPG"&gt;&lt;img style="cursor: pointer; width: 314px; height: 235px;" src="http://1.bp.blogspot.com/_0lTP4sAq6t8/SgujFPFDjlI/AAAAAAAAAA4/W_O-blB4XXg/s320/pagoda1.JPG" alt="" id="BLOGGER_PHOTO_ID_5335537493892894290" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Can you Imagine the details of this work? how small and precise? IT's amazing.&lt;br /&gt;&lt;br /&gt;Another image i would like to show is a lifesize gun or armalite?  anyway here it is.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_0lTP4sAq6t8/SgulizOuuZI/AAAAAAAAAB4/VuHbpcAzOwU/s1600-h/gun5.JPG"&gt;&lt;img style="cursor: pointer; width: 314px; height: 235px;" src="http://3.bp.blogspot.com/_0lTP4sAq6t8/SgulizOuuZI/AAAAAAAAAB4/VuHbpcAzOwU/s320/gun5.JPG" alt="" id="BLOGGER_PHOTO_ID_5335540200836610450" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_0lTP4sAq6t8/SgulioCe7cI/AAAAAAAAABw/kZC3Wvof6lM/s1600-h/gun4.JPG"&gt;&lt;img style="cursor: pointer; width: 314px; height: 235px;" src="http://2.bp.blogspot.com/_0lTP4sAq6t8/SgulioCe7cI/AAAAAAAAABw/kZC3Wvof6lM/s320/gun4.JPG" alt="" id="BLOGGER_PHOTO_ID_5335540197832453570" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_0lTP4sAq6t8/SgulirsZbFI/AAAAAAAAABo/9Gg7mSRlNgE/s1600-h/gun3.JPG"&gt;&lt;img style="cursor: pointer; width: 314px; height: 235px;" src="http://1.bp.blogspot.com/_0lTP4sAq6t8/SgulirsZbFI/AAAAAAAAABo/9Gg7mSRlNgE/s320/gun3.JPG" alt="" id="BLOGGER_PHOTO_ID_5335540198813559890" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_0lTP4sAq6t8/SguliTVbWAI/AAAAAAAAABg/X8hTEwZk1pQ/s1600-h/gun2.JPG"&gt;&lt;img style="cursor: pointer; width: 314px; height: 235px;" src="http://2.bp.blogspot.com/_0lTP4sAq6t8/SguliTVbWAI/AAAAAAAAABg/X8hTEwZk1pQ/s320/gun2.JPG" alt="" id="BLOGGER_PHOTO_ID_5335540192274765826" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_0lTP4sAq6t8/SguliR0RRkI/AAAAAAAAABY/63jpUl9iVtU/s1600-h/gun1.JPG"&gt;&lt;img style="cursor: pointer; width: 314px; height: 235px;" src="http://4.bp.blogspot.com/_0lTP4sAq6t8/SguliR0RRkI/AAAAAAAAABY/63jpUl9iVtU/s320/gun1.JPG" alt="" id="BLOGGER_PHOTO_ID_5335540191867258434" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_0lTP4sAq6t8/SgumKKz7g0I/AAAAAAAAACA/XPtCIgvKezQ/s1600-h/gun8.JPG"&gt;&lt;img style="cursor: pointer; width: 314px; height: 235px;" src="http://1.bp.blogspot.com/_0lTP4sAq6t8/SgumKKz7g0I/AAAAAAAAACA/XPtCIgvKezQ/s320/gun8.JPG" alt="" id="BLOGGER_PHOTO_ID_5335540877181551426" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;There are other miniatures like boat of 18th century, offices, building, Jet Fighter F16, etc.&lt;br /&gt;&lt;br /&gt;All I can say is a big wow to his talent.&lt;br /&gt;Oh, by the way, the flower portrait (oil in canvas) is from his wife.&lt;br /&gt;&lt;br /&gt;Make the world know you!!!!!&lt;input id="gwProxy" type="hidden"&gt;&lt;!--Session data--&gt;&lt;input onclick="jsCall();" id="jsProxy" type="hidden"&gt;&lt;div id="refHTML"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3473523060113863124-4149443838301502806?l=giovhan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://giovhan.blogspot.com/feeds/4149443838301502806/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3473523060113863124&amp;postID=4149443838301502806' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3473523060113863124/posts/default/4149443838301502806'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3473523060113863124/posts/default/4149443838301502806'/><link rel='alternate' type='text/html' href='http://giovhan.blogspot.com/2009/05/family-of-artist-miniatures-and.html' title='Family of Artist - miniatures and lifesize'/><author><name>Gio</name><uri>http://www.blogger.com/profile/17133654476603300637</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_0lTP4sAq6t8/SgukQTzj8TI/AAAAAAAAABQ/GaJS9vuFIbc/s72-c/pagoda6.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3473523060113863124.post-8979632476599983198</id><published>2009-01-27T23:54:00.000-08:00</published><updated>2009-12-02T05:47:27.918-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='input controls'/><category scheme='http://www.blogger.com/atom/ns#' term='WPF Textbox Input character'/><category scheme='http://www.blogger.com/atom/ns#' term='WPF'/><category scheme='http://www.blogger.com/atom/ns#' term='Textbox Input'/><title type='text'>Limiting WPF Textbox Input character</title><content type='html'>Today, I spend almost 2 hours looking for answers.&lt;br /&gt;I look like stupid on how to control or validate the accepted characters that the textbox&lt;br /&gt;would accept. A very simple problem in the good old days.&lt;br /&gt;&lt;br /&gt;i got some answers from&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.vbdotnetforums.com/windows-presentation-foundation-wpf/23881-ascii-value-instead-system-windows-input-key.html"&gt;http://www.vbdotnetforums.com/windows-presentation-foundation-wpf/23881-ascii-value-instead-system-windows-input-key.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I appreciate the solution above, but some has to validate what kind of characters are&lt;br /&gt;accepted.&lt;br /&gt;&lt;br /&gt;but hey, it's much as easy as it would be, the PreviewTextInput() event is the right answer;&lt;br /&gt;giving the correct character pressed on the keyboard and is not returning the&lt;br /&gt;Windows.Input.Key types...&lt;br /&gt;&lt;br /&gt;Here is the sample.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Private Sub Textbox_PreviewTextInput(ByVal sender As Object, ByVal e As System.Windows.Input.TextCompositionEventArgs) Handles Me.PreviewTextInput&lt;br /&gt;If e.Text = "a"  ' will not accept "a"&lt;br /&gt;e.Handled = True&lt;br /&gt;Else&lt;br /&gt;e.Handled = False&lt;br /&gt;End If&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Sorry for the HTML format..&lt;br /&gt;Enjoy.&lt;br /&gt;&lt;input id="gwProxy" type="hidden" /&gt;&lt;!--Session data--&gt;&lt;input id="jsProxy" onclick="jsCall();" type="hidden" /&gt;&lt;div id="refHTML"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3473523060113863124-8979632476599983198?l=giovhan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://giovhan.blogspot.com/feeds/8979632476599983198/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3473523060113863124&amp;postID=8979632476599983198' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3473523060113863124/posts/default/8979632476599983198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3473523060113863124/posts/default/8979632476599983198'/><link rel='alternate' type='text/html' href='http://giovhan.blogspot.com/2009/01/limiting-wpf-textbox-input-character.html' title='Limiting WPF Textbox Input character'/><author><name>Gio</name><uri>http://www.blogger.com/profile/17133654476603300637</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3473523060113863124.post-2384999653002565198</id><published>2008-12-10T18:20:00.000-08:00</published><updated>2009-12-02T05:48:26.198-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Large WCF Data error'/><category scheme='http://www.blogger.com/atom/ns#' term='Channel'/><category scheme='http://www.blogger.com/atom/ns#' term='WCF Error'/><category scheme='http://www.blogger.com/atom/ns#' term='WCF'/><title type='text'>Transporting Large Ado.Net Entity in WCF Error</title><content type='html'>&lt;a href="http://3.bp.blogspot.com/_0lTP4sAq6t8/SUB-zHyQLTI/AAAAAAAAAAo/fSTWGp3us5s/s1600-h/WCF+Error.PNG"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This could be a reference other post who encounter the same problem as mine.&lt;br /&gt;I have a simple WCF Server/Client Scenario; with Operation Contract&lt;br /&gt;that returns ado.net entity (Objects.DataClasses.EntityObject) &lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #666666;"&gt;Public Class GenericService&lt;br /&gt;Implements IGenericService&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Public Function RetrieveData() As Object Implements&lt;br /&gt;Dim _Context As New CustomerEntities&lt;br /&gt;Dim myData = From OneRecord In _Context.Customers Select OneRecord &lt;/span&gt;&lt;span style="color: #666666;"&gt;Where OneRecord.CustomerId = "AAA"&lt;br /&gt;Return myData&lt;br /&gt;End Function&lt;br /&gt;&lt;br /&gt;End Class&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;However, in the return process.. I got this Error&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://2.bp.blogspot.com/_0lTP4sAq6t8/SUB_GEPb0vI/AAAAAAAAAAw/yggj4RpRXZ0/s1600-h/WCF+Error.PNG"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5278358505472643826" src="http://2.bp.blogspot.com/_0lTP4sAq6t8/SUB_GEPb0vI/AAAAAAAAAAw/yggj4RpRXZ0/s320/WCF+Error.PNG" style="height: 178px; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;span style="font-family: arial;"&gt;&lt;i&gt;The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:01:00'.&lt;/i&gt;&lt;/span&gt; &lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;Some other posting has same error but different solution&lt;br /&gt;&lt;/div&gt;&lt;div&gt;- by Denis Pitcher --&amp;gt; &lt;a href="http://geekswithblogs.net/Denis/archive/2008/10/07/125688.aspx"&gt;http://geekswithblogs.net/Denis/archive/2008/10/07/125688.aspx&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;- Other forum --&amp;gt; &lt;a href="http://www.themssforum.com/Framework/Error-139943/"&gt;http://www.themssforum.com/Framework/Error-139943/&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;In my part, it seems large amount of message was passed through the channel.?&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;Hope anyone seeing this.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;input id="gwProxy" type="hidden" /&gt;&lt;!--Session data--&gt;&lt;input id="jsProxy" onclick="jsCall();" type="hidden" /&gt;&lt;div id="refHTML"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3473523060113863124-2384999653002565198?l=giovhan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://giovhan.blogspot.com/feeds/2384999653002565198/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3473523060113863124&amp;postID=2384999653002565198' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3473523060113863124/posts/default/2384999653002565198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3473523060113863124/posts/default/2384999653002565198'/><link rel='alternate' type='text/html' href='http://giovhan.blogspot.com/2008/12/transporting-large-adonet-entity-in-wcf.html' title='Transporting Large Ado.Net Entity in WCF Error'/><author><name>Gio</name><uri>http://www.blogger.com/profile/17133654476603300637</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_0lTP4sAq6t8/SUB_GEPb0vI/AAAAAAAAAAw/yggj4RpRXZ0/s72-c/WCF+Error.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3473523060113863124.post-4844982673169215050</id><published>2008-11-23T16:42:00.000-08:00</published><updated>2011-05-08T23:32:32.989-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='BitmapImageConveter'/><category scheme='http://www.blogger.com/atom/ns#' term='Bitmap Image Converter'/><category scheme='http://www.blogger.com/atom/ns#' term='WPF BitmapImageConveter'/><category scheme='http://www.blogger.com/atom/ns#' term='Image Converter'/><title type='text'>WPF BitMapImage Converters and SQL Image</title><content type='html'>Learning in progress.&lt;br /&gt;&lt;br /&gt;For obvious reasons, there are developers needs to save the images&lt;br /&gt;whether .jpg or .png to backend, specifically to MS SQL image type.&lt;br /&gt;&lt;br /&gt;WPF can handle both retrieving and saving of Images through converters.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;TO DISPLAY&lt;/b&gt;&lt;br /&gt;Let us assume that you use DataTemplate to display your image as part&lt;br /&gt;of our listview columns.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;-- on window resources / or app resources &lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;declare the template for the image and this will be part of listview's column&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="brush:c#"&gt;&lt;br /&gt;&amp;lt;DataTemplate key="TemplatePic"&amp;gt;&lt;br /&gt;&lt;tab&gt;&amp;lt;Image Name="myImage" Source="{Binding Path=EmployeePic, Converter="{StaticResource ByteToImageConverter}} /&amp;gt;&lt;br /&gt;&amp;lt;/DataTemplate&amp;gt;&lt;/tab&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;-- on ListView, define the template for the gridview column&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="brush:c#"&gt;&lt;br /&gt;&amp;lt;Listview name="ListView1"&amp;gt;&lt;br /&gt;&amp;lt;ListView.view&amp;gt;&lt;br /&gt;&amp;lt;GridView&amp;gt;&lt;br /&gt;&amp;lt;GridViewColumn header="Image" name="myPicture" celltemplate="{StaticResource TemplatePic}"&amp;gt;&lt;br /&gt;&amp;lt;GridView&amp;gt;&lt;br /&gt;&amp;lt;/ListView.View&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;--for your converter resource class &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Public Class ByteToImageConverter&lt;br /&gt;Implements IValueConverter&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Public Function Convert(ByVal value As Object, ByVal targetType As System.Type, ByVal parameter As Object, ByVal culture As System.Globalization.CultureInfo) As Object Implements System.Windows.Data.IValueConverter.Convert&lt;br /&gt;If value Is Nothing Then&lt;br /&gt;Return Nothing&lt;br /&gt;End If&lt;br /&gt;Dim picByte As Byte() = value&lt;br /&gt;Dim bi As BitmapImage = New BitmapImage()&lt;br /&gt;bi.BeginInit()&lt;br /&gt;Dim ImageStream As IO.Stream = New IO.MemoryStream(picByte)&lt;br /&gt;bi.StreamSource = ImageStream&lt;br /&gt;bi.EndInit()&lt;br /&gt;Return bi &lt;br /&gt;End Function&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Public Function ConvertBack(ByVal value As Object, ByVal targetType As System.Type, ByVal parameter As Object, ByVal culture As System.Globalization.CultureInfo) As Object Implements System.Windows.Data.IValueConverter.ConvertBack&lt;br /&gt;&lt;br /&gt;&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; Dim rtb = New RenderTargetBitmap(value.Width, value.Width, 92, 92, PixelFormats.Pbgra32)&lt;br /&gt;&amp;nbsp; &amp;nbsp; rtb.Render(value)&lt;br /&gt;&amp;nbsp; &amp;nbsp; Dim enc = New System.Windows.Media.Imaging.PngBitmapEncoder()&lt;br /&gt;&amp;nbsp; &amp;nbsp; enc.Frames.Add(System.Windows.Media.Imaging.BitmapFrame.Create(rtb))&lt;br /&gt;&amp;nbsp; &amp;nbsp; ' array of byte for the image&lt;br /&gt;&amp;nbsp; &amp;nbsp; Dim mPicBtye As Byte() = Nothing&lt;br /&gt;&amp;nbsp; &amp;nbsp; Using mMemStream As IO.MemoryStream = New IO.MemoryStream&lt;br /&gt;&amp;nbsp; &amp;nbsp; enc.Save(mMemStream)&lt;br /&gt;&amp;nbsp; &amp;nbsp; mPicBtye = mMemStream.ToArray&lt;br /&gt;&amp;nbsp; &amp;nbsp; End Using&lt;br /&gt;Return mPicBtye&lt;br /&gt;&lt;br /&gt;End Function&lt;br /&gt;End Class&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;In the Convert() function converts the "value" from byte() to a BitMapImage using IO.Stream. This reads the value saved from the backend and convert it to the memory stream of byte.&lt;br /&gt;&lt;br /&gt;The ConvertBack() function is a reverse process wherein we have converted the BitMapImage back to Byte().&lt;br /&gt;&lt;br /&gt;The example above is very traditional but uses memory stream to convert the image.&lt;br /&gt;&lt;br /&gt;Hope you like it.&lt;br /&gt;&lt;input id="gwProxy" type="hidden" /&gt;&lt;!--Session data--&gt;&lt;input id="jsProxy" onclick="jsCall();" type="hidden" /&gt;&lt;div id="refHTML"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3473523060113863124-4844982673169215050?l=giovhan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://giovhan.blogspot.com/feeds/4844982673169215050/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3473523060113863124&amp;postID=4844982673169215050' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3473523060113863124/posts/default/4844982673169215050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3473523060113863124/posts/default/4844982673169215050'/><link rel='alternate' type='text/html' href='http://giovhan.blogspot.com/2008/11/wpf-bitmapimage-converters-and-sql.html' title='WPF BitMapImage Converters and SQL Image'/><author><name>Gio</name><uri>http://www.blogger.com/profile/17133654476603300637</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3473523060113863124.post-4855903581000109808</id><published>2008-08-03T17:07:00.000-07:00</published><updated>2009-12-02T05:49:59.616-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WPF'/><category scheme='http://www.blogger.com/atom/ns#' term='WPF ComboBox Binding'/><category scheme='http://www.blogger.com/atom/ns#' term='ComboBox Binding'/><title type='text'>Disney and WPF Step by step ComboBox Binding to observablecollection</title><content type='html'>&lt;div&gt;&lt;a href="http://2.bp.blogspot.com/_0lTP4sAq6t8/SMY6Qaf4ADI/AAAAAAAAAAQ/hrYd3wwTDNA/s1600-h/IMG_0880.JPG"&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5243942869784854578" src="http://2.bp.blogspot.com/_0lTP4sAq6t8/SMY6Qaf4ADI/AAAAAAAAAAQ/hrYd3wwTDNA/s320/IMG_0880.JPG" style="float: right; margin: 0px 0px 10px 10px;" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt;California - a very nice place to live.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt;Roaming around San Franciso is something that could be cherished. Watching and taking pictures on Pier 39, Downtown and the Golden Gate is so cool. Disney and Hollywood is a big WOW. One thing I like is that the people are so courteous and always smiling, greeting everybody around. Definitely a very nice place to live.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt;Let's discuss WPF's combo box binding. Once you learn it, it is very convenient to use.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt;There are a lot of sources and great blogs on how to use them.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt;Julie Lerma Blog and Microsoft's binding queen &lt;/span&gt;&lt;a href="http://www.beacosta.com/blog/?s=combobox"&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt;Beatriz Costa&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt; are one examples.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt;For here : I will just concentrate on binding ComboBox&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt;For me, there are 2 important things to remember about comboboxes.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt;1. Where to retrieve data as combobox sources.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt;2. Where to save data of the SelectedValue or the Text displayed on the box.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&lt;span style="font-size: 85%;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family: arial;"&gt;&lt;span style="font-size: 85%;"&gt;&lt;b&gt;ComboBox ItemSource&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt;WPF Suggested to bind UIElement to an ObservableCollection to achieve high performance. I will not discuss binding to LINQ Entities here for LINQ entity results will have an enumerable / list. Let us create our own observable collection class.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial; font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family: Arial; font-size: 85%;"&gt;Assume that we have a Places.vb&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;-------------&lt;br /&gt;&lt;span style="font-family: times new roman;"&gt;Imports System.Collections.ObjectModel&lt;br /&gt;&lt;br /&gt;Namespace PlaceDataSource&lt;br /&gt;Public Class Places&lt;br /&gt;Inherits ObservableCollection(Of String)&lt;br /&gt;&lt;br /&gt;Public Sub New()&lt;br /&gt;MyBase.Add("California")&lt;br /&gt;MyBase.Add("New York")&lt;br /&gt;End Sub&lt;br /&gt;End Class&lt;br /&gt;End Namespace&lt;br /&gt;---------------&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt;Now, inorder for you to use that class as your itemsource for the combobox, we need the following.&lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt;Set the Namespace in the window namespace reference.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt;Set the Resource of the window or page.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt;Set combobox itemsource property to point to static resource declared by XAML.&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt;1. Set the Namespace in the window namespace reference.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt;Declaration of resources can be declared in either window level or by application level. Let us use the window level to make it simple. &lt;/span&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt;Thus, on window xmls area we declare the namespace.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt;&lt;span style="color: #000099;"&gt;&lt;b&gt;xmlns:places="clr-namespace:WpfApplication4.PlaceDataSource"&lt;/b&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt;Note : That VS2008 designer will display all clr-namespaces as you type "xmlns:", then just select the PlaceDataSource Namespace.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt;2. Set the Resource of the window or page. - Right after referencing the namespace, we can set the resource of the window to.&lt;/span&gt;&lt;br /&gt;&amp;lt;Window.Resources&amp;gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&amp;lt;places:Places x:key="PlaceBound" /&amp;gt;&lt;br /&gt;&lt;/span&gt;&amp;lt;/Window.Resources&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt;3. Set combobox itemsource property to point to static resource declared by XAML. &lt;/span&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt;In setting the combobox itemsource, just drag your combobox in the window/page. then put the data source like below.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;ComboBox ItemsSource="{StaticResource PlacesBound}" /&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt;and then... Run the program.. tsada... there you go... ComboBox will have its displaymember from our observablecollection....&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt;As I've said, there are several ways to set combo's itemsource. You can bind it from XML, Enum, Enumerable.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 0pt;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;input id="gwProxy" type="hidden" /&gt;&lt;!--Session data--&gt;&lt;input id="jsProxy" onclick="jsCall();" type="hidden" /&gt;&lt;div id="refHTML"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3473523060113863124-4855903581000109808?l=giovhan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://giovhan.blogspot.com/feeds/4855903581000109808/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3473523060113863124&amp;postID=4855903581000109808' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3473523060113863124/posts/default/4855903581000109808'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3473523060113863124/posts/default/4855903581000109808'/><link rel='alternate' type='text/html' href='http://giovhan.blogspot.com/2008/08/disney-and-wpf-step-by-step-combobox.html' title='Disney and WPF Step by step ComboBox Binding to observablecollection'/><author><name>Gio</name><uri>http://www.blogger.com/profile/17133654476603300637</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_0lTP4sAq6t8/SMY6Qaf4ADI/AAAAAAAAAAQ/hrYd3wwTDNA/s72-c/IMG_0880.JPG' height='72' width='72'/><thr:total>0</thr:total></entry></feed>
