<?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:blogger='http://schemas.google.com/blogger/2008' 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-5190158426865572469</id><updated>2024-11-01T17:42:45.068+05:30</updated><category term="CSharp"/><category term=".Net"/><category term="JavaScript"/><category term="wpf"/><category term="CSS"/><category term="Jquery"/><category term="xaml"/><category term="SQL"/><category term="IE"/><category term="Ajax"/><category term="MySql"/><title type='text'>.NetCluster</title><subtitle type='html'>using asp.net, csharp(c#), Javascript, JQuery,Sql Solutions Sharing Blog in  asp.net, csharp(c#), Javascript, JQuery,Sql </subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://dotnetcluster.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://dotnetcluster.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Prince</name><uri>http://www.blogger.com/profile/06734275496055879895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>111</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5190158426865572469.post-7609267716622048513</id><published>2014-03-13T15:20:00.000+05:30</published><updated>2014-03-13T15:20:08.292+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".Net"/><title type='text'>It is an error to use a section registered as allowDefinition=&quot;MachineToApplication&quot; beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.</title><content type='html'>&lt;u&gt;&lt;b&gt;Answer:-&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
I am working .net application. I have this error when i open my application solution file and build my application that time getting this error.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;and then i referred in this link.&lt;br /&gt;
&lt;br /&gt;
he mentioned about I won&#39;t open the parent folder solution file. that&#39;s the reason happens this error.&amp;nbsp;
&lt;br /&gt;
&lt;br /&gt;
Basically, the error means that there is a web.config file in one of your subfolders that has a configuration element that it should not have. Is this you root/only web config file? If not, could you please post those as well?

Also, it sounds stupid, but I would double check that you&#39;re opening the website itself in your IDE (and not mistakenly opening a parent folder) I have seen people spend a couple hours trying to debug this same error, when all along they weren&#39;t in the right directory.

Here is a good explanation on how the web.config hierarchy is set up for ASP that will help you visualize how this works:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://scottonwriting.net/sowblog/archive/2010/02/17/163375.aspx&quot; target=&quot;_blank&quot;&gt;http://scottonwriting.net/sowblog/archive/2010/02/17/163375.aspx&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJ2lJc_1GDWi8X9WdGFHLcCtxaO5yl8aRLiUFEXO7xaVxkiXh2dCQLEtDuQF1f9LK-_ZtDPwHuC62SVFJ6zDGK4f0UWygFYo7r_7PVZciUeu2YmnxuJ0nRoRuaEzlrEEQe1AXmZVzzSWs/s1600/Untitled.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJ2lJc_1GDWi8X9WdGFHLcCtxaO5yl8aRLiUFEXO7xaVxkiXh2dCQLEtDuQF1f9LK-_ZtDPwHuC62SVFJ6zDGK4f0UWygFYo7r_7PVZciUeu2YmnxuJ0nRoRuaEzlrEEQe1AXmZVzzSWs/s1600/Untitled.png&quot; height=&quot;153&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dotnetcluster.blogspot.com/feeds/7609267716622048513/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5190158426865572469/7609267716622048513?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/7609267716622048513'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/7609267716622048513'/><link rel='alternate' type='text/html' href='http://dotnetcluster.blogspot.com/2014/03/it-is-error-to-use-section-registered.html' title='It is an error to use a section registered as allowDefinition=&quot;MachineToApplication&quot; beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.'/><author><name>senthil</name><uri>http://www.blogger.com/profile/10176497138272144692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6yBCA6dmqdTdFA_RrV5WNNw2i9OhFvBLEDOr4O6lKWMveXn2MZ7zeouIXHFLFeejDiGZeMYd__LMv2FIFLmLwxO2JdMRLJl7evXM2ptT788-ZI8iVZUySasEisKZIcgs/s220/senthil.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJ2lJc_1GDWi8X9WdGFHLcCtxaO5yl8aRLiUFEXO7xaVxkiXh2dCQLEtDuQF1f9LK-_ZtDPwHuC62SVFJ6zDGK4f0UWygFYo7r_7PVZciUeu2YmnxuJ0nRoRuaEzlrEEQe1AXmZVzzSWs/s72-c/Untitled.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5190158426865572469.post-4648961265530585773</id><published>2014-03-11T08:02:00.001+05:30</published><updated>2014-03-11T08:03:30.283+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".Net"/><category scheme="http://www.blogger.com/atom/ns#" term="CSharp"/><category scheme="http://www.blogger.com/atom/ns#" term="wpf"/><title type='text'>Multiple CustomActionData fields</title><content type='html'>This is multiple CustomActionData field pass in SetUp &amp;nbsp;file.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 13.63636302947998px; line-height: 17.804800033569336px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;&quot;&gt;
&amp;nbsp;it is possible to add one or more custom screens in the setup wizard, with fields (e.g. text boxes) where the user can enter additional installation parameters.&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 13.63636302947998px; line-height: 17.804800033569336px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;&quot;&gt;
A custom field can then be passed to a &quot;Custom Action&quot; class library project, to handle the user field. The image below shows how the property &quot;ServerName&quot; gets mapped to the EDITB1 text field:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5X0WyF-SA8sI_HZ9TthFJ5-mLgadXqUYqi0sSJ57Xft4Lgss7j9MMt7s7UrgLpyZaTEL2p7-pXQ99d7OJ0PHVRsK-5wkxK54Uh-8jh4FW-2-EbrA5t69YYtdQWYyf0qz7-AdiP0W_pak/s1600/post.bmp&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5X0WyF-SA8sI_HZ9TthFJ5-mLgadXqUYqi0sSJ57Xft4Lgss7j9MMt7s7UrgLpyZaTEL2p7-pXQ99d7OJ0PHVRsK-5wkxK54Uh-8jh4FW-2-EbrA5t69YYtdQWYyf0qz7-AdiP0W_pak/s1600/post.bmp&quot; height=&quot;59&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; margin-bottom: 1em; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 17.804800033569336px;&quot;&gt;Within the Custom Action class, the property is accessed as follows:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;!-- HTML generated using dotnetcluster --&gt;&lt;div class=&quot;source-code&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt; targetdir = Context.Parameters[&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;TARGETDIR&amp;quot;&lt;/span&gt;];
&lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt; stationname = Context.Parameters[&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;STATIONNAME&amp;quot;&lt;/span&gt;];
&lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt; facility = Context.Parameters[&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;FACILITY&amp;quot;&lt;/span&gt;];
&lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt; line = Context.Parameters[&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Line&amp;quot;&lt;/span&gt;];
&lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt; email = Context.Parameters[&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Email&amp;quot;&lt;/span&gt;];
&lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt; environment = Context.Parameters[&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;ENVIRONMENT&amp;quot;&lt;/span&gt;];
&lt;/pre&gt;&lt;/div&gt;


&lt;!-- HTML generated using dotnetcluster --&gt;&lt;div class=&quot;source-code&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;/TARGETDIR=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;[TARGETDIR]\&amp;quot; /STATIONNAME=&amp;quot;&lt;/span&gt;[STATIONNAME]&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot; /FACILITY=&amp;quot;&lt;/span&gt;[FACILITY]&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot; /LINE=&amp;quot;&lt;/span&gt;[LINE]&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot; /EMAIL=&amp;quot;&lt;/span&gt;[EMAIL]&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot; /ENV=&amp;quot;&lt;/span&gt;[ENVIRONMENT]&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetcluster.blogspot.com/feeds/4648961265530585773/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5190158426865572469/4648961265530585773?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/4648961265530585773'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/4648961265530585773'/><link rel='alternate' type='text/html' href='http://dotnetcluster.blogspot.com/2014/03/multiple-customactiondata-fields.html' title='Multiple CustomActionData fields'/><author><name>senthil</name><uri>http://www.blogger.com/profile/10176497138272144692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6yBCA6dmqdTdFA_RrV5WNNw2i9OhFvBLEDOr4O6lKWMveXn2MZ7zeouIXHFLFeejDiGZeMYd__LMv2FIFLmLwxO2JdMRLJl7evXM2ptT788-ZI8iVZUySasEisKZIcgs/s220/senthil.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5X0WyF-SA8sI_HZ9TthFJ5-mLgadXqUYqi0sSJ57Xft4Lgss7j9MMt7s7UrgLpyZaTEL2p7-pXQ99d7OJ0PHVRsK-5wkxK54Uh-8jh4FW-2-EbrA5t69YYtdQWYyf0qz7-AdiP0W_pak/s72-c/post.bmp" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5190158426865572469.post-2396617639820621818</id><published>2014-03-07T17:43:00.001+05:30</published><updated>2014-03-07T17:45:46.115+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".Net"/><title type='text'>Please wait while windows configures My Project solution</title><content type='html'>I have a service setup. It has one shortcut in application folder (In Users program menu). When I try to install installation has completed with no issues. But after installation when I click the shortcut the first time open the application and then when i click the shortcut in Second time the service application is re-installing again and showing error like &quot;Error 1001. The specified service already exists&quot;. If I click &quot;OK&quot; of the error dialog if is showing a dialog &quot;Fatal error during installation.&quot; with the title &quot;Problem with shortcut&quot;. I am using C# for the development. Event log is as below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;The description for Event ID ( 11001 ) in Source ( MsiInstaller ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Product: &quot;My Project Solutation&quot; -- Error 1001. Error 1001. The specified service already exists, (NULL), (NULL), (NULL), (NULL), , .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
0000: 7b 33 34 42 41 38 32 44   {34BA82D&lt;br /&gt;
0008: 39 2d 31 44 39 45 2d 34   9-1D9E-4&lt;br /&gt;
0010: 33 39 38 2d 42 38 30 31   398-B801&lt;br /&gt;
0018: 2d 43 42 46 33 35 43 37   -CBF35C7&lt;br /&gt;
0020: 32 46 42 34 39 7d         2FB49}  </content><link rel='replies' type='application/atom+xml' href='http://dotnetcluster.blogspot.com/feeds/2396617639820621818/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5190158426865572469/2396617639820621818?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/2396617639820621818'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/2396617639820621818'/><link rel='alternate' type='text/html' href='http://dotnetcluster.blogspot.com/2014/03/please-wait-while-windows-configures-my.html' title='Please wait while windows configures My Project solution'/><author><name>senthil</name><uri>http://www.blogger.com/profile/10176497138272144692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6yBCA6dmqdTdFA_RrV5WNNw2i9OhFvBLEDOr4O6lKWMveXn2MZ7zeouIXHFLFeejDiGZeMYd__LMv2FIFLmLwxO2JdMRLJl7evXM2ptT788-ZI8iVZUySasEisKZIcgs/s220/senthil.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5190158426865572469.post-1173475784824304707</id><published>2014-02-25T19:41:00.001+05:30</published><updated>2014-02-25T19:41:52.705+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".Net"/><category scheme="http://www.blogger.com/atom/ns#" term="wpf"/><category scheme="http://www.blogger.com/atom/ns#" term="xaml"/><title type='text'>Create New RoundedButton Style Templete in Wpf application, using Button Property IsEnable, IsPressed, IsMouseOver</title><content type='html'>This code create a new roundedbutton for wpf application.&lt;br /&gt;
&lt;br /&gt;
Its easy understand and customes button style. I want to create rounded button for in my application and style effect change when Button Enable and Disable time after that IsEnable time when i click the button that style change like a normal button.&lt;br /&gt;
&lt;br /&gt;
Here i used in Gradient color also we can customes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;!-- HTML generated using dotnetcluster --&gt;&lt;div class=&quot;source-code&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&amp;lt;Button Command=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Print&amp;quot;&lt;/span&gt; Name=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;butSinglePrint&amp;quot;&lt;/span&gt; Height=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;40&amp;quot;&lt;/span&gt; Width=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;40&amp;quot;&lt;/span&gt; Margin=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;6&amp;quot;&lt;/span&gt;&amp;gt;
        &amp;lt;Button&lt;span style=&quot;border: 1px solid #FF0000&quot;&gt;.&lt;/span&gt;Template&amp;gt;
            &amp;lt;ControlTemplate TargetType=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Button&amp;quot;&lt;/span&gt;&amp;gt;
                &amp;lt;Grid&amp;gt;
                    &amp;lt;Ellipse 
                         StrokeThickness=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;2&amp;quot;&lt;/span&gt;&amp;gt;
                        &amp;lt;Ellipse&lt;span style=&quot;border: 1px solid #FF0000&quot;&gt;.&lt;/span&gt;Fill&amp;gt;
                            &amp;lt;RadialGradientBrush GradientOrigin=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;0.496,1.052&amp;quot;&lt;/span&gt;&amp;gt;
                                &amp;lt;RadialGradientBrush&lt;span style=&quot;border: 1px solid #FF0000&quot;&gt;.&lt;/span&gt;RelativeTransform&amp;gt;
                                    &amp;lt;TransformGroup&amp;gt;
                                        &amp;lt;ScaleTransform CenterX=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;0.5&amp;quot;&lt;/span&gt; CenterY=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;0.5&amp;quot;&lt;/span&gt; ScaleX=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;1.5&amp;quot;&lt;/span&gt; ScaleY=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;1.5&amp;quot;&lt;/span&gt;/&amp;gt;
                                        &amp;lt;TranslateTransform X=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;0.02&amp;quot;&lt;/span&gt; Y=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;0.2&amp;quot;&lt;/span&gt;/&amp;gt;
                                    &amp;lt;/TransformGroup&amp;gt;
                                &lt;span style=&quot;border: 1px solid #FF0000&quot;&gt;&amp;lt;&lt;/span&gt;/RadialGradientBrush.RelativeTransform&amp;gt;
                                &amp;lt;GradientStop Offset=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;1&amp;quot;&lt;/span&gt; Color=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Green&amp;quot;&lt;/span&gt;/&amp;gt;
                                &amp;lt;GradientStop Offset=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;0.2&amp;quot;&lt;/span&gt; Color=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Green&amp;quot;&lt;/span&gt;/&amp;gt;
                            &amp;lt;/RadialGradientBrush&amp;gt;
                        &lt;span style=&quot;border: 1px solid #FF0000&quot;&gt;&amp;lt;&lt;/span&gt;/Ellipse.Fill&amp;gt;
                    &amp;lt;/Ellipse&amp;gt;                    
                    &amp;lt;Ellipse Margin=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;3&amp;quot;&lt;/span&gt; Name=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;highlightCircle&amp;quot;&lt;/span&gt;&amp;gt;
                        &amp;lt;Ellipse&lt;span style=&quot;border: 1px solid #FF0000&quot;&gt;.&lt;/span&gt;Fill &amp;gt;
                                                &amp;lt;LinearGradientBrush&amp;gt;
                                                    &amp;lt;GradientStop Offset=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;0&amp;quot;&lt;/span&gt; Color=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;#50FFFFFF&amp;quot;&lt;/span&gt;/&amp;gt;
                                                    &amp;lt;GradientStop Offset=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;0.5&amp;quot;&lt;/span&gt; Color=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;#00FFFFFF&amp;quot;&lt;/span&gt;/&amp;gt;
                                                    &amp;lt;GradientStop Offset=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;1&amp;quot;&lt;/span&gt; Color=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;#50FFFFFF&amp;quot;&lt;/span&gt;/&amp;gt;
                                                &amp;lt;/LinearGradientBrush&amp;gt;
                                            &lt;span style=&quot;border: 1px solid #FF0000&quot;&gt;&amp;lt;&lt;/span&gt;/Ellipse.Fill&amp;gt;
                    &amp;lt;/Ellipse&amp;gt;
                    &amp;lt;Ellipse Name=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;disableCircle&amp;quot;&lt;/span&gt; &amp;gt;
                        &amp;lt;Ellipse&lt;span style=&quot;border: 1px solid #FF0000&quot;&gt;.&lt;/span&gt;Fill&amp;gt;
                                                &amp;lt;LinearGradientBrush &amp;gt;
                                                    &amp;lt;GradientStop Offset=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;0&amp;quot;&lt;/span&gt; Color=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;#50FFFFFF&amp;quot;&lt;/span&gt;/&amp;gt;
                                                    &amp;lt;GradientStop Offset=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;0.5&amp;quot;&lt;/span&gt; Color=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;#00FFFFFF&amp;quot;&lt;/span&gt;/&amp;gt;
                                                    &amp;lt;GradientStop Offset=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;1&amp;quot;&lt;/span&gt; Color=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;#50FFFFFF&amp;quot;&lt;/span&gt;/&amp;gt;
                                                &amp;lt;/LinearGradientBrush&amp;gt;
                                            &lt;span style=&quot;border: 1px solid #FF0000&quot;&gt;&amp;lt;&lt;/span&gt;/Ellipse.Fill&amp;gt;
                    &amp;lt;/Ellipse&amp;gt;
                    &amp;lt;Border Name=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;highlightBorder&amp;quot;&lt;/span&gt;  BorderBrush=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;#002A00&amp;quot;&lt;/span&gt; CornerRadius=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;18&amp;quot;&lt;/span&gt; BorderThickness=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;0,0,1,1&amp;quot;&lt;/span&gt;&amp;gt;
                        &amp;lt;ContentPresenter HorizontalAlignment=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Center&amp;quot;&lt;/span&gt;
                                  VerticalAlignment=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Center&amp;quot;&lt;/span&gt;/&amp;gt;
                    &amp;lt;/Border&amp;gt;
                &amp;lt;/Grid&amp;gt;
                &amp;lt;ControlTemplate&lt;span style=&quot;border: 1px solid #FF0000&quot;&gt;.&lt;/span&gt;Triggers&amp;gt;
                    &amp;lt;Trigger Property=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;IsPressed&amp;quot;&lt;/span&gt; Value=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;True&amp;quot;&lt;/span&gt;&amp;gt;
                        &amp;lt;Setter TargetName=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;highlightBorder&amp;quot;&lt;/span&gt;  Property=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;FocusVisualStyle&amp;quot;&lt;/span&gt; Value=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;{x:Null}&amp;quot;&lt;/span&gt;/&amp;gt;
                        &amp;lt;Setter TargetName=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;highlightBorder&amp;quot;&lt;/span&gt;  Property=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;BorderThickness&amp;quot;&lt;/span&gt; Value=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;1,1,0,0&amp;quot;&lt;/span&gt; /&amp;gt;
                        &amp;lt;Setter TargetName=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;highlightBorder&amp;quot;&lt;/span&gt;  Property=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;BorderBrush&amp;quot;&lt;/span&gt; Value=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;#002A00&amp;quot;&lt;/span&gt; /&amp;gt;                       
                        &amp;lt;Setter TargetName=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;highlightCircle&amp;quot;&lt;/span&gt; Property=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Fill&amp;quot;&lt;/span&gt;&amp;gt;
                                                &amp;lt;Setter&lt;span style=&quot;border: 1px solid #FF0000&quot;&gt;.&lt;/span&gt;Value&amp;gt;
                                                    &amp;lt;LinearGradientBrush StartPoint=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;0.3,0&amp;quot;&lt;/span&gt; EndPoint=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;0.4,1&amp;quot;&lt;/span&gt;&amp;gt;
                                                    &amp;lt;GradientStop Offset=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;0&amp;quot;&lt;/span&gt; Color=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;#50FFFFFF&amp;quot;&lt;/span&gt;/&amp;gt;
                                                    &amp;lt;GradientStop Offset=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;0.5&amp;quot;&lt;/span&gt; Color=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;#00FFFFFF&amp;quot;&lt;/span&gt;/&amp;gt;
                                                    &amp;lt;GradientStop Offset=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;1&amp;quot;&lt;/span&gt; Color=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;#50FFFFFF&amp;quot;&lt;/span&gt;/&amp;gt;
                                                &amp;lt;/LinearGradientBrush&amp;gt;
                                                &lt;span style=&quot;border: 1px solid #FF0000&quot;&gt;&amp;lt;&lt;/span&gt;/Setter.Value&amp;gt;
                                            &amp;lt;/Setter&amp;gt;
                    &amp;lt;/Trigger&amp;gt;
                    &amp;lt;Trigger Property=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;IsEnabled&amp;quot;&lt;/span&gt; Value=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;False&amp;quot;&lt;/span&gt;&amp;gt;
                        &amp;lt;Setter TargetName=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;disableCircle&amp;quot;&lt;/span&gt; Property=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Fill&amp;quot;&lt;/span&gt;&amp;gt;
                            &amp;lt;Setter&lt;span style=&quot;border: 1px solid #FF0000&quot;&gt;.&lt;/span&gt;Value&amp;gt;
                                &amp;lt;LinearGradientBrush StartPoint=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;0.6,0&amp;quot;&lt;/span&gt; EndPoint=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;1.4,1&amp;quot;&lt;/span&gt;&amp;gt;
                                    &amp;lt;GradientStop Offset=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;0&amp;quot;&lt;/span&gt; Color=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;#C3C8C9&amp;quot;&lt;/span&gt;/&amp;gt;
                                    &amp;lt;GradientStop Offset=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;0.5&amp;quot;&lt;/span&gt; Color=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;#CFD3D4&amp;quot;&lt;/span&gt;/&amp;gt;
                                    &amp;lt;GradientStop Offset=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;2&amp;quot;&lt;/span&gt; Color=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;#9A9FA1&amp;quot;&lt;/span&gt;/&amp;gt;
                                &amp;lt;/LinearGradientBrush&amp;gt;
                            &lt;span style=&quot;border: 1px solid #FF0000&quot;&gt;&amp;lt;&lt;/span&gt;/Setter.Value&amp;gt;
                        &amp;lt;/Setter&amp;gt;
                    &amp;lt;/Trigger&amp;gt;
                    &amp;lt;Trigger Property=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;IsEnabled&amp;quot;&lt;/span&gt; Value=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;True&amp;quot;&lt;/span&gt;&amp;gt;
                        &amp;lt;Setter Property=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;FocusVisualStyle&amp;quot;&lt;/span&gt; Value=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;{x:Null}&amp;quot;&lt;/span&gt; /&amp;gt;
                        &amp;lt;Setter TargetName=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;highlightBorder&amp;quot;&lt;/span&gt;  Property=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;BorderThickness&amp;quot;&lt;/span&gt; Value=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;1,1,1,1&amp;quot;&lt;/span&gt; /&amp;gt;
                                        &amp;lt;Setter TargetName=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;highlightBorder&amp;quot;&lt;/span&gt; Property=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;BorderBrush&amp;quot;&lt;/span&gt;&amp;gt;
                                            &amp;lt;Setter&lt;span style=&quot;border: 1px solid #FF0000&quot;&gt;.&lt;/span&gt;Value&amp;gt;
                                                &amp;lt;LinearGradientBrush StartPoint=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;0.6,0&amp;quot;&lt;/span&gt; EndPoint=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;1.4,1&amp;quot;&lt;/span&gt;&amp;gt;
                                                    &amp;lt;GradientStop Offset=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;0&amp;quot;&lt;/span&gt; Color=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;#3FFF3F&amp;quot;&lt;/span&gt;/&amp;gt;
                                                    &amp;lt;GradientStop Offset=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;0&amp;quot;&lt;/span&gt; Color=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;#3FFF3F&amp;quot;&lt;/span&gt;/&amp;gt;
                                                    &amp;lt;GradientStop Offset=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;0.5&amp;quot;&lt;/span&gt; Color=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;#002A00&amp;quot;&lt;/span&gt;/&amp;gt;
                                                &amp;lt;/LinearGradientBrush&amp;gt;
                                            &lt;span style=&quot;border: 1px solid #FF0000&quot;&gt;&amp;lt;&lt;/span&gt;/Setter.Value&amp;gt;
                                        &amp;lt;/Setter&amp;gt;                  
                    &amp;lt;/Trigger&amp;gt;
                &lt;span style=&quot;border: 1px solid #FF0000&quot;&gt;&amp;lt;&lt;/span&gt;/ControlTemplate.Triggers&amp;gt;
            &amp;lt;/ControlTemplate&amp;gt;
        &lt;span style=&quot;border: 1px solid #FF0000&quot;&gt;&amp;lt;&lt;/span&gt;/Button.Template&amp;gt;
    &amp;lt;/Button&amp;gt;
&lt;/pre&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dotnetcluster.blogspot.com/feeds/1173475784824304707/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5190158426865572469/1173475784824304707?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/1173475784824304707'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/1173475784824304707'/><link rel='alternate' type='text/html' href='http://dotnetcluster.blogspot.com/2014/02/create-new-roundedbutton-style-templete.html' title='Create New RoundedButton Style Templete in Wpf application, using Button Property IsEnable, IsPressed, IsMouseOver'/><author><name>senthil</name><uri>http://www.blogger.com/profile/10176497138272144692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6yBCA6dmqdTdFA_RrV5WNNw2i9OhFvBLEDOr4O6lKWMveXn2MZ7zeouIXHFLFeejDiGZeMYd__LMv2FIFLmLwxO2JdMRLJl7evXM2ptT788-ZI8iVZUySasEisKZIcgs/s220/senthil.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5190158426865572469.post-3550479767769093509</id><published>2014-02-06T18:43:00.002+05:30</published><updated>2014-02-06T18:44:04.460+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="CSharp"/><category scheme="http://www.blogger.com/atom/ns#" term="wpf"/><title type='text'>Sample Multi thread Functionality in C#</title><content type='html'>this code sample main class i created multi thread concept. already i used thread in my application while call my method continuously but there is deadlock occurred because already different thread runing there so thats what i used multi thread like this.




&lt;!-- HTML generated using dotnetcluster --&gt;&lt;div class=&quot;source-code&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;using&lt;/span&gt; System; 
&lt;span style=&quot;color: #0000ff&quot;&gt;using&lt;/span&gt; System.Threading; 
&lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2b91af&quot;&gt;Test&lt;/span&gt; { 
&lt;span style=&quot;color: #0000ff&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; Main() { 
ThreadStart job = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; ThreadStart(ThreadJob); 
Thread thread = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; Thread(job); 
thread.Start();
 &lt;span style=&quot;color: #0000ff&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #2b91af&quot;&gt;int&lt;/span&gt; i=0; i &amp;lt; 5; i++) { 
Console.WriteLine (&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Main thread: {0}&amp;quot;&lt;/span&gt;, i); 
Thread.Sleep(1000); 
}
 }
 &lt;span style=&quot;color: #0000ff&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; ThreadJob() { 
&lt;span style=&quot;color: #0000ff&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #2b91af&quot;&gt;int&lt;/span&gt; i=0; i &amp;lt; 10; i++) {
 Console.WriteLine (&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Other thread: {0}&amp;quot;&lt;/span&gt;, i); 
Thread.Sleep(500); 
}
}
 } 
&lt;/pre&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dotnetcluster.blogspot.com/feeds/3550479767769093509/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5190158426865572469/3550479767769093509?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/3550479767769093509'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/3550479767769093509'/><link rel='alternate' type='text/html' href='http://dotnetcluster.blogspot.com/2014/02/sample-multi-thread-functionality-in-c.html' title='Sample Multi thread Functionality in C#'/><author><name>senthil</name><uri>http://www.blogger.com/profile/10176497138272144692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6yBCA6dmqdTdFA_RrV5WNNw2i9OhFvBLEDOr4O6lKWMveXn2MZ7zeouIXHFLFeejDiGZeMYd__LMv2FIFLmLwxO2JdMRLJl7evXM2ptT788-ZI8iVZUySasEisKZIcgs/s220/senthil.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5190158426865572469.post-1923341066639436325</id><published>2014-02-06T18:36:00.002+05:30</published><updated>2014-02-06T18:37:35.272+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="CSharp"/><category scheme="http://www.blogger.com/atom/ns#" term="wpf"/><title type='text'>The calling thread cannot access this object because a different thread owns it</title><content type='html'>I am working in wpf application. i want to call the print method till when i click stop button. So that case i have used in thread concept while i was getting This error &#39;The calling thread cannot access this object because a different thread owns it&#39; because also multiple thread run in that method so i handled this type of solution. 

my print method called in PrintElement like this;


&lt;!-- HTML generated using dotnetcluster --&gt;&lt;div class=&quot;source-code&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;static&lt;/span&gt; PrintLable PrintElement()
{
    PrintLable printLable= &lt;span style=&quot;color: #0000ff&quot;&gt;null&lt;/span&gt;;
    Application.Current.Dispatcher.Invoke(
       System.Windows.Threading.DispatcherPriority.Normal, &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; Action(
          &lt;span style=&quot;color: #0000ff&quot;&gt;delegate&lt;/span&gt;()
          {
              PrintElement printLable = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; PrintElement();
              &lt;span style=&quot;color: #008000&quot;&gt;// Initialize your PrintElement here&lt;/span&gt;
          }));
    &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; printLable;
}
&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetcluster.blogspot.com/feeds/1923341066639436325/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5190158426865572469/1923341066639436325?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/1923341066639436325'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/1923341066639436325'/><link rel='alternate' type='text/html' href='http://dotnetcluster.blogspot.com/2014/02/the-calling-thread-cannot-access-this.html' title='The calling thread cannot access this object because a different thread owns it'/><author><name>senthil</name><uri>http://www.blogger.com/profile/10176497138272144692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6yBCA6dmqdTdFA_RrV5WNNw2i9OhFvBLEDOr4O6lKWMveXn2MZ7zeouIXHFLFeejDiGZeMYd__LMv2FIFLmLwxO2JdMRLJl7evXM2ptT788-ZI8iVZUySasEisKZIcgs/s220/senthil.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5190158426865572469.post-6374370369424407270</id><published>2014-01-31T16:29:00.001+05:30</published><updated>2014-01-31T16:29:45.134+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="CSharp"/><category scheme="http://www.blogger.com/atom/ns#" term="wpf"/><title type='text'>Get USB Device from your local machine using C# code behind </title><content type='html'>This is all the USB device read from your local machine using C#. I am working in wpf windows application. When i want to read my system USB Device i got this sample code.

This code every easy to learn and implement as you want. just copy and past in your application. 



&lt;!-- HTML generated using dotnetcluster --&gt;&lt;div class=&quot;source-code&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;partial&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2b91af&quot;&gt;Window1&lt;/span&gt; : Window
    {
        &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; Window1()
        {
            InitializeComponent();
        }

  &lt;span style=&quot;color: #0000ff&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; Main()
        {
            &lt;span style=&quot;color: #2b91af&quot;&gt;var&lt;/span&gt; usbDevices = GetUSBDevices();

            &lt;span style=&quot;color: #0000ff&quot;&gt;foreach&lt;/span&gt; (&lt;span style=&quot;color: #2b91af&quot;&gt;var&lt;/span&gt; usbDevice &lt;span style=&quot;color: #0000ff&quot;&gt;in&lt;/span&gt; usbDevices)
            {
                Console.WriteLine(&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Device ID: {0}, PNP Device ID: {1}, Description: {2}&amp;quot;&lt;/span&gt;,
                    usbDevice.DeviceID, usbDevice.PNPDevideID, usbDevice.Description);
            }

            Console.Read();
        }


        &lt;span style=&quot;color: #0000ff&quot;&gt;static&lt;/span&gt; List&amp;lt;USBDeviceInfo&amp;gt; GetUSBDevices()
        {
            List&amp;lt;USBDeviceInfo&amp;gt; devices = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; List&amp;lt;USBDeviceInfo&amp;gt;();

            ManagementObjectCollection collection;
            &lt;span style=&quot;color: #0000ff&quot;&gt;using&lt;/span&gt; (&lt;span style=&quot;color: #2b91af&quot;&gt;var&lt;/span&gt; searcher = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; ManagementObjectSearcher(&lt;span style=&quot;color: #a31515&quot;&gt;@&amp;quot;Select * From Win32_USBHub&amp;quot;&lt;/span&gt;))
                collection = searcher.Get();

            &lt;span style=&quot;color: #0000ff&quot;&gt;foreach&lt;/span&gt; (&lt;span style=&quot;color: #2b91af&quot;&gt;var&lt;/span&gt; device &lt;span style=&quot;color: #0000ff&quot;&gt;in&lt;/span&gt; collection)
            {
                devices.Add(&lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; USBDeviceInfo(
                (&lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;)device.GetPropertyValue(&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;DeviceID&amp;quot;&lt;/span&gt;),
                (&lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;)device.GetPropertyValue(&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;PNPDeviceID&amp;quot;&lt;/span&gt;),
                (&lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;)device.GetPropertyValue(&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Description&amp;quot;&lt;/span&gt;)
                ));
            }

            collection.Dispose();
            &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; devices;
        }
    }

    &lt;span style=&quot;color: #0000ff&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2b91af&quot;&gt;USBDeviceInfo&lt;/span&gt;
    {
        &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; USBDeviceInfo(&lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt; deviceID, &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt; pnpDeviceID, &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt; description)
        {
            &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.DeviceID = deviceID;
            &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.PNPDeviceID = pnpDeviceID;
            &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.Description = description;
        }
        &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt; DeviceID { &lt;span style=&quot;color: #0000ff&quot;&gt;get&lt;/span&gt;; &lt;span style=&quot;color: #0000ff&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;set&lt;/span&gt;; }
        &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt; PNPDeviceID { &lt;span style=&quot;color: #0000ff&quot;&gt;get&lt;/span&gt;; &lt;span style=&quot;color: #0000ff&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;set&lt;/span&gt;; }
        &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt; Description { &lt;span style=&quot;color: #0000ff&quot;&gt;get&lt;/span&gt;; &lt;span style=&quot;color: #0000ff&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;set&lt;/span&gt;; }
    } 
&lt;/pre&gt;&lt;/div&gt;
 </content><link rel='replies' type='application/atom+xml' href='http://dotnetcluster.blogspot.com/feeds/6374370369424407270/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5190158426865572469/6374370369424407270?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/6374370369424407270'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/6374370369424407270'/><link rel='alternate' type='text/html' href='http://dotnetcluster.blogspot.com/2014/01/get-usb-device-from-your-local-machine.html' title='Get USB Device from your local machine using C# code behind '/><author><name>senthil</name><uri>http://www.blogger.com/profile/10176497138272144692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6yBCA6dmqdTdFA_RrV5WNNw2i9OhFvBLEDOr4O6lKWMveXn2MZ7zeouIXHFLFeejDiGZeMYd__LMv2FIFLmLwxO2JdMRLJl7evXM2ptT788-ZI8iVZUySasEisKZIcgs/s220/senthil.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5190158426865572469.post-7751886839022509010</id><published>2014-01-23T20:40:00.002+05:30</published><updated>2014-01-23T20:41:10.670+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".Net"/><category scheme="http://www.blogger.com/atom/ns#" term="CSharp"/><category scheme="http://www.blogger.com/atom/ns#" term="wpf"/><title type='text'>LINQ using XML data load to combobox.</title><content type='html'>To use LINQ to XML you will need to import a two of namespaces.

&lt;!-- HTML generated using dotnetcluster --&gt;&lt;div class=&quot;source-code&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;using&lt;/span&gt; System.Linq;
&lt;span style=&quot;color: #0000ff&quot;&gt;using&lt;/span&gt; System.Xml.Linq;


&lt;span style=&quot;color: #0000ff&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; StudentsLoad()
{
  &lt;span style=&quot;color: #2b91af&quot;&gt;var&lt;/span&gt; xElem = XElement.Load(&lt;span style=&quot;color: #a31515&quot;&gt;@&amp;quot;Student.xml&amp;quot;&lt;/span&gt;);

  &lt;span style=&quot;color: #2b91af&quot;&gt;var&lt;/span&gt; students = &lt;span style=&quot;color: #0000ff&quot;&gt;from&lt;/span&gt; prod &lt;span style=&quot;color: #0000ff&quot;&gt;in&lt;/span&gt; xElem.Descendants(&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Student&amp;quot;&lt;/span&gt;)
           &lt;span style=&quot;color: #0000ff&quot;&gt;orderby&lt;/span&gt; prod.Element(&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;StudentName&amp;quot;&lt;/span&gt;).Value
           &lt;span style=&quot;color: #0000ff&quot;&gt;select&lt;/span&gt; prod.Element(&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;StudentName&amp;quot;&lt;/span&gt;).Value;

  lstStudents.DataContext = students;
}
&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetcluster.blogspot.com/feeds/7751886839022509010/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5190158426865572469/7751886839022509010?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/7751886839022509010'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/7751886839022509010'/><link rel='alternate' type='text/html' href='http://dotnetcluster.blogspot.com/2014/01/linq-using-xml-data-load-to-combobox.html' title='LINQ using XML data load to combobox.'/><author><name>senthil</name><uri>http://www.blogger.com/profile/10176497138272144692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6yBCA6dmqdTdFA_RrV5WNNw2i9OhFvBLEDOr4O6lKWMveXn2MZ7zeouIXHFLFeejDiGZeMYd__LMv2FIFLmLwxO2JdMRLJl7evXM2ptT788-ZI8iVZUySasEisKZIcgs/s220/senthil.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5190158426865572469.post-2782330736920409071</id><published>2014-01-23T20:35:00.001+05:30</published><updated>2014-01-23T20:39:07.181+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="wpf"/><category scheme="http://www.blogger.com/atom/ns#" term="xaml"/><title type='text'>Statically Load XML Data to the wpf combobox (drowpdown list) in wpf application</title><content type='html'>When i want to xml data load to the combobox . i got this solution. Its very simple to load the xml data.

this the xml data.


&lt;!-- HTML generated using dotnetcluster --&gt;&lt;div class=&quot;source-code&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&amp;lt;Items&amp;gt;
  &amp;lt;Item&amp;gt;
    &amp;lt;ItemId&amp;gt;1&amp;lt;/ItemId&amp;gt;
    &amp;lt;ItemName&amp;gt;Architecting ASP.NET Applications
                 eBook&amp;lt;/ItemName&amp;gt;
    &amp;lt;Price&amp;gt;19.95&amp;lt;/Price&amp;gt;
  &amp;lt;/Item&amp;gt;
  &amp;lt;Item&amp;gt;
    &amp;lt;ItemId&amp;gt;2&amp;lt;/ItemId&amp;gt;
    &amp;lt;ItemName&amp;gt;Fundamentals of N-Tier eBook&amp;lt;/ItemName&amp;gt;
    &amp;lt;Price&amp;gt;19.95&amp;lt;/Price&amp;gt;
  &amp;lt;/Item&amp;gt;
     ...
     ...
  &amp;lt;Item&amp;gt;
    &amp;lt;ItemId&amp;gt;3&amp;lt;/ItemId&amp;gt;
    &amp;lt;ItemName&amp;gt;Security for ASP.NET Developers
                 eBook&amp;lt;/ItemName&amp;gt;
    &amp;lt;Price&amp;gt;19.95&amp;lt;/Price&amp;gt;
  &amp;lt;/Item&amp;gt;
&amp;lt;/Items&amp;gt;
&lt;/pre&gt;&lt;/div&gt;


this is stackpanel resource load, it will load on window loaded


&lt;!-- HTML generated using dotnetcluster --&gt;&lt;div class=&quot;source-code&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&amp;lt;StackPanel.Resources&amp;gt;
  &amp;lt;XmlDataProvider x:Key=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;ItemsData&amp;quot;&lt;/span&gt;
                   Source=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;/Items.xml&amp;quot;&lt;/span&gt;
                   XPath=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Items/Item&amp;quot;&lt;/span&gt; /&amp;gt;
&amp;lt;/StackPanel.Resources&amp;gt;
&lt;/pre&gt;&lt;/div&gt;


Its a combobox wirte like this, i loaded in ItemName if you want price load to another one combobox just change the xPath and then automatically load the price data to the combobox.



&lt;!-- HTML generated using dotnetcluster --&gt;&lt;div class=&quot;source-code&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&amp;lt;ComboBox Name=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Items&amp;quot;&lt;/span&gt; MinWidth=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;200&amp;quot;&lt;/span&gt; Style=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;{StaticResource RequiredComboBox}&amp;quot;&lt;/span&gt; Foreground=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Black&amp;quot;&lt;/span&gt; FontSize=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;30&amp;quot;&lt;/span&gt; IsSynchronizedWithCurrentItem=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;False&amp;quot;&lt;/span&gt; SelectedIndex=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;0&amp;quot;&lt;/span&gt;&amp;gt;
                    &amp;lt;ComboBox.ItemContainerStyle&amp;gt;
                        &amp;lt;Style TargetType=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;ComboBoxItem&amp;quot;&lt;/span&gt;&amp;gt;
                            &amp;lt;Setter Property=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Padding&amp;quot;&lt;/span&gt; Value=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;5&amp;quot;&lt;/span&gt;&amp;gt;
                            &amp;lt;/Setter&amp;gt;
                        &amp;lt;/Style&amp;gt;
                    &amp;lt;/ComboBox.ItemContainerStyle&amp;gt;
                    &amp;lt;ComboBox.ItemsSource&amp;gt;
                        &amp;lt;Binding Source=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;{StaticResource ItemsData}&amp;quot;&lt;/span&gt; XPath=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;ItemName&amp;quot;&lt;/span&gt; /&amp;gt;
                    &amp;lt;/ComboBox.ItemsSource&amp;gt;
                &amp;lt;/ComboBox&amp;gt;
&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetcluster.blogspot.com/feeds/2782330736920409071/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5190158426865572469/2782330736920409071?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/2782330736920409071'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/2782330736920409071'/><link rel='alternate' type='text/html' href='http://dotnetcluster.blogspot.com/2014/01/statically-load-xml-data-to-wpf.html' title='Statically Load XML Data to the wpf combobox (drowpdown list) in wpf application'/><author><name>senthil</name><uri>http://www.blogger.com/profile/10176497138272144692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6yBCA6dmqdTdFA_RrV5WNNw2i9OhFvBLEDOr4O6lKWMveXn2MZ7zeouIXHFLFeejDiGZeMYd__LMv2FIFLmLwxO2JdMRLJl7evXM2ptT788-ZI8iVZUySasEisKZIcgs/s220/senthil.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5190158426865572469.post-707296085787231506</id><published>2014-01-23T20:33:00.001+05:30</published><updated>2014-01-23T20:33:37.515+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="CSharp"/><title type='text'>XML data load to gridview in wpf application</title><content type='html'>This code XML data load to gridview in wpf application. when i want to xml data load to the gridview using back end csharp code. its very simple.



1. Create DataSet object and then 
2. Load the xml file to dataset using readxml property.
3. dataset value pass to the gridview itemsource.




&lt;!-- HTML generated using dotnetcluster --&gt;&lt;div class=&quot;source-code&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;DataSet dataSet = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; DataSet();

dataSet.ReadXml(&lt;span style=&quot;color: #a31515&quot;&gt;@&amp;quot;C:\Students\Students.xml&amp;quot;&lt;/span&gt;); 

dataGrid1.ItemsSource = dataSet.Tables[0].DefaultView; 
&lt;/pre&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dotnetcluster.blogspot.com/feeds/707296085787231506/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5190158426865572469/707296085787231506?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/707296085787231506'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/707296085787231506'/><link rel='alternate' type='text/html' href='http://dotnetcluster.blogspot.com/2014/01/xml-data-load-to-gridview-in-wpf.html' title='XML data load to gridview in wpf application'/><author><name>senthil</name><uri>http://www.blogger.com/profile/10176497138272144692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6yBCA6dmqdTdFA_RrV5WNNw2i9OhFvBLEDOr4O6lKWMveXn2MZ7zeouIXHFLFeejDiGZeMYd__LMv2FIFLmLwxO2JdMRLJl7evXM2ptT788-ZI8iVZUySasEisKZIcgs/s220/senthil.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5190158426865572469.post-5125267190906480847</id><published>2014-01-23T19:17:00.000+05:30</published><updated>2014-01-23T19:17:31.565+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".Net"/><category scheme="http://www.blogger.com/atom/ns#" term="CSharp"/><category scheme="http://www.blogger.com/atom/ns#" term="wpf"/><title type='text'>Child Window open from Parent window in wpf application</title><content type='html'>I am working in wpf application when i want to open the child window from Parent window button click. that time i am getting this solution.

Just write Parent window click event method like this.



&lt;!-- HTML generated using dotnetcluster --&gt;&lt;div class=&quot;source-code&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; Button_Click(&lt;span style=&quot;color: #2b91af&quot;&gt;object&lt;/span&gt; sender, RoutedEventArgs e)
        {            
            window2 win2= &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; window2();
            win2.Show();
            &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.Close();
        }
&lt;/pre&gt;&lt;/div&gt;


</content><link rel='replies' type='application/atom+xml' href='http://dotnetcluster.blogspot.com/feeds/5125267190906480847/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5190158426865572469/5125267190906480847?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/5125267190906480847'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/5125267190906480847'/><link rel='alternate' type='text/html' href='http://dotnetcluster.blogspot.com/2014/01/child-window-open-from-parent-window-in.html' title='Child Window open from Parent window in wpf application'/><author><name>senthil</name><uri>http://www.blogger.com/profile/10176497138272144692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6yBCA6dmqdTdFA_RrV5WNNw2i9OhFvBLEDOr4O6lKWMveXn2MZ7zeouIXHFLFeejDiGZeMYd__LMv2FIFLmLwxO2JdMRLJl7evXM2ptT788-ZI8iVZUySasEisKZIcgs/s220/senthil.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5190158426865572469.post-6909466928645602930</id><published>2014-01-21T22:02:00.002+05:30</published><updated>2014-01-21T22:02:46.879+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".Net"/><category scheme="http://www.blogger.com/atom/ns#" term="CSharp"/><category scheme="http://www.blogger.com/atom/ns#" term="wpf"/><category scheme="http://www.blogger.com/atom/ns#" term="xaml"/><title type='text'>Round Button Create using Style in wpf application</title><content type='html'>This code create an round button in wpf application using ResourceDictionary. create an xaml file like this.


&lt;!-- HTML generated using dotnetcluster --&gt;&lt;div class=&quot;source-code&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&amp;lt;ResourceDictionary 
  xmlns=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;&lt;/span&gt;
  xmlns:x=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;&lt;/span&gt; &amp;gt;

&amp;lt;Style x:Key=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;RoundButtonTemplate&amp;quot;&lt;/span&gt; TargetType=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Button&amp;quot;&lt;/span&gt;&amp;gt;
        &amp;lt;Setter Property=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Background&amp;quot;&lt;/span&gt; Value=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Brown&amp;quot;&lt;/span&gt;/&amp;gt;
        &amp;lt;Setter Property=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Foreground&amp;quot;&lt;/span&gt; Value=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;White&amp;quot;&lt;/span&gt; /&amp;gt;
        &amp;lt;Setter Property=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Template&amp;quot;&lt;/span&gt;&amp;gt;
            &amp;lt;Setter.Value&amp;gt;
                &amp;lt;ControlTemplate TargetType=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Button&amp;quot;&lt;/span&gt;&amp;gt;
                    &amp;lt;Border CornerRadius=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;15&amp;quot;&lt;/span&gt; Background=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;{TemplateBinding Background}&amp;quot;&lt;/span&gt;
                                BorderThickness=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;1&amp;quot;&lt;/span&gt;&amp;gt;
                        &amp;lt;ContentPresenter HorizontalAlignment=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Center&amp;quot;&lt;/span&gt; VerticalAlignment=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Center&amp;quot;&lt;/span&gt;&amp;gt;

                        &amp;lt;/ContentPresenter&amp;gt;
                    &amp;lt;/Border&amp;gt;
                &amp;lt;/ControlTemplate&amp;gt;
            &amp;lt;/Setter.Value&amp;gt;
        &amp;lt;/Setter&amp;gt;
    &amp;lt;/Style&amp;gt;

&amp;lt;/ResourceDictionary&amp;gt;
&lt;/pre&gt;&lt;/div&gt;


after that create and main window xaml file and then just call this RoundButtonTemplate style using Window.Resources load the GlassButton.xaml file and then call the StaticResource in main window like this.


&lt;!-- HTML generated using dotnetcluster --&gt;&lt;div class=&quot;source-code&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&amp;lt;Window x:Class=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;GlassButton.Window1&amp;quot;&lt;/span&gt;
    xmlns=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;&lt;/span&gt;
    xmlns:x=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;&lt;/span&gt;
    Title=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Glass Buttons&amp;quot;&lt;/span&gt; Height=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;228&amp;quot;&lt;/span&gt; Width=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;272&amp;quot;&lt;/span&gt;&amp;gt;

    &amp;lt;Window.Resources&amp;gt;
        &amp;lt;ResourceDictionary&amp;gt;
            &amp;lt;ResourceDictionary.MergedDictionaries&amp;gt;
                &amp;lt;ResourceDictionary Source=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Resources\GlassButton.xaml&amp;quot;&lt;/span&gt;/&amp;gt;
            &amp;lt;/ResourceDictionary.MergedDictionaries&amp;gt;
        &amp;lt;/ResourceDictionary&amp;gt;
    &amp;lt;/Window.Resources&amp;gt;
&amp;lt;Grid&amp;gt;
 &amp;lt;StackPanel Orientation=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Horizontal&amp;quot;&lt;/span&gt;&amp;gt;
&amp;lt;Button Focusable=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;False&amp;quot;&lt;/span&gt;
        Style=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;{StaticResource RoundButtonTemplate}&amp;quot;&lt;/span&gt;
        Width=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;264&amp;quot;&lt;/span&gt;
       Height=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;90&amp;quot;&lt;/span&gt; 
       Grid.Row=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;0&amp;quot;&lt;/span&gt;
       Margin=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;0,0,0,0&amp;quot;&lt;/span&gt;
       HorizontalAlignment=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Center&amp;quot;&lt;/span&gt;
       BorderBrush=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;#FFF&amp;quot;&lt;/span&gt;
       Name=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;PasswordButton&amp;quot;&lt;/span&gt;
       Click=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;PasswordButton_Click&amp;quot;&lt;/span&gt;&amp;gt; 
                                             
 &amp;lt;/Button&amp;gt;
  &amp;lt;/StackPanel&amp;gt;
&amp;lt;/Grid&amp;gt;
&amp;lt;/Window&amp;gt;
&lt;/pre&gt;&lt;/div&gt;


</content><link rel='replies' type='application/atom+xml' href='http://dotnetcluster.blogspot.com/feeds/6909466928645602930/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5190158426865572469/6909466928645602930?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/6909466928645602930'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/6909466928645602930'/><link rel='alternate' type='text/html' href='http://dotnetcluster.blogspot.com/2014/01/round-button-create-using-style-in-wpf.html' title='Round Button Create using Style in wpf application'/><author><name>senthil</name><uri>http://www.blogger.com/profile/10176497138272144692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6yBCA6dmqdTdFA_RrV5WNNw2i9OhFvBLEDOr4O6lKWMveXn2MZ7zeouIXHFLFeejDiGZeMYd__LMv2FIFLmLwxO2JdMRLJl7evXM2ptT788-ZI8iVZUySasEisKZIcgs/s220/senthil.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5190158426865572469.post-7123755527685709809</id><published>2014-01-21T21:40:00.003+05:30</published><updated>2014-01-21T21:45:37.493+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".Net"/><category scheme="http://www.blogger.com/atom/ns#" term="CSharp"/><category scheme="http://www.blogger.com/atom/ns#" term="wpf"/><category scheme="http://www.blogger.com/atom/ns#" term="xaml"/><title type='text'>Write New Rount Button in Wpf Application</title><content type='html'>This is code i have an exprience when i want to create a round button in my application i have used this code. this is one way of the create round button in wpf application. if we want change the color and Radial Gradient color and also we can able to apply the Transform using opacity. its very useful i have past the following code.


&lt;!-- HTML generated using dotnetcluster --&gt;&lt;div class=&quot;source-code&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&amp;lt;Button Width=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;100&amp;quot;&lt;/span&gt; Height=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;100&amp;quot;&lt;/span&gt;&amp;gt;
                &amp;lt;Button.Template&amp;gt;
                    &amp;lt;ControlTemplate TargetType=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Button&amp;quot;&lt;/span&gt;&amp;gt;
                        &amp;lt;Grid&amp;gt;
                            &amp;lt;Ellipse Stroke=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;#5ECF5E&amp;quot;&lt;/span&gt;
                         StrokeThickness=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;2&amp;quot;&lt;/span&gt;&amp;gt;
                                &amp;lt;Ellipse.Fill&amp;gt;
                                    &amp;lt;RadialGradientBrush GradientOrigin=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;0.496,1.052&amp;quot;&lt;/span&gt;&amp;gt;
                                        &amp;lt;RadialGradientBrush.RelativeTransform&amp;gt;
                                            &amp;lt;TransformGroup&amp;gt;
                                                &amp;lt;ScaleTransform CenterX=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;0.5&amp;quot;&lt;/span&gt; CenterY=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;0.5&amp;quot;&lt;/span&gt; ScaleX=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;1.5&amp;quot;&lt;/span&gt; ScaleY=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;1.5&amp;quot;&lt;/span&gt;/&amp;gt;
                                                &amp;lt;TranslateTransform X=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;0.02&amp;quot;&lt;/span&gt; Y=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;0.2&amp;quot;&lt;/span&gt;/&amp;gt;
                                            &amp;lt;/TransformGroup&amp;gt;
                                        &amp;lt;/RadialGradientBrush.RelativeTransform&amp;gt;
                                        &amp;lt;GradientStop Offset=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;1&amp;quot;&lt;/span&gt; Color=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;#5ECF5E&amp;quot;&lt;/span&gt;/&amp;gt;
                                        &amp;lt;GradientStop Offset=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;0.2&amp;quot;&lt;/span&gt; Color=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;#FFFFFFFF&amp;quot;&lt;/span&gt;/&amp;gt;
                                    &amp;lt;/RadialGradientBrush&amp;gt;
                                &amp;lt;/Ellipse.Fill&amp;gt;
                            &amp;lt;/Ellipse&amp;gt;
                            &amp;lt;ContentPresenter HorizontalAlignment=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Center&amp;quot;&lt;/span&gt;
                                  VerticalAlignment=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Center&amp;quot;&lt;/span&gt;/&amp;gt;
                        &amp;lt;/Grid&amp;gt;
                    &amp;lt;/ControlTemplate&amp;gt;
                &amp;lt;/Button.Template&amp;gt;
            &amp;lt;/Button&amp;gt;
&lt;/pre&gt;&lt;/div&gt;



another one way to create the round button.

&lt;!-- HTML generated using dotnetcluster --&gt;&lt;div class=&quot;source-code&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&amp;lt;Button  Width=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;100&amp;quot;&lt;/span&gt; Height=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;100&amp;quot;&lt;/span&gt; Content=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Abcd&amp;quot;&lt;/span&gt;&amp;gt;
        &amp;lt;Button.Template&amp;gt;
            &amp;lt;ControlTemplate TargetType=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;{x:Type Button}&amp;quot;&lt;/span&gt;&amp;gt;
                &amp;lt;Grid&amp;gt;
                &amp;lt;Ellipse Fill=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Red&amp;quot;&lt;/span&gt;/&amp;gt;
                    &amp;lt;ContentPresenter Content=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;{TemplateBinding Content}&amp;quot;&lt;/span&gt; HorizontalAlignment=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Center&amp;quot;&lt;/span&gt; VerticalAlignment=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Center&amp;quot;&lt;/span&gt;/&amp;gt;
                &amp;lt;/Grid&amp;gt;
            &amp;lt;/ControlTemplate&amp;gt;
        &amp;lt;/Button.Template&amp;gt;
    &amp;lt;/Button&amp;gt;
&lt;/pre&gt;&lt;/div&gt;

this code create an rectangle button with color and Radial Gradient color and also we can able to apply the Transform using opacity.


&lt;!-- HTML generated using dotnetcluster --&gt;&lt;div class=&quot;source-code&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&amp;lt;UserControl x:Class=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;WindowsFormsApplication8.UserControl1&amp;quot;&lt;/span&gt;
    xmlns=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;&lt;/span&gt;
    xmlns:x=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;&lt;/span&gt;
    Height=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;154&amp;quot;&lt;/span&gt; Width=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;177&amp;quot;&lt;/span&gt;&amp;gt;
    &amp;lt;Grid&amp;gt;
        
        &amp;lt;Rectangle Name=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;rectangle1&amp;quot;&lt;/span&gt; Stroke=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Black&amp;quot;&lt;/span&gt; RadiusX=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;10&amp;quot;&lt;/span&gt; RadiusY=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;10&amp;quot;&lt;/span&gt; &amp;gt;
        &amp;lt;/Rectangle&amp;gt;
 
        &amp;lt;Button Name=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;rectangle2&amp;quot;&lt;/span&gt; Foreground=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Black&amp;quot;&lt;/span&gt; Margin=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;3,3,3,3&amp;quot;&lt;/span&gt; &amp;gt;
            &amp;lt;Button.Background &amp;gt;
                &amp;lt;LinearGradientBrush StartPoint=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;0,0&amp;quot;&lt;/span&gt; EndPoint=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;1,1&amp;quot;&lt;/span&gt;&amp;gt;
                    &amp;lt;GradientStop Color=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Green&amp;quot;&lt;/span&gt; Offset=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;0.0&amp;quot;&lt;/span&gt; /&amp;gt;
                    &amp;lt;GradientStop Color=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;White&amp;quot;&lt;/span&gt; Offset=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;0.9&amp;quot;&lt;/span&gt; /&amp;gt;
                &amp;lt;/LinearGradientBrush&amp;gt;
            &amp;lt;/Button.Background&amp;gt;
        &amp;lt;/Button&amp;gt;
    &amp;lt;/Grid&amp;gt;
&amp;lt;/UserControl&amp;gt;
&lt;/pre&gt;&lt;/div&gt;






</content><link rel='replies' type='application/atom+xml' href='http://dotnetcluster.blogspot.com/feeds/7123755527685709809/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5190158426865572469/7123755527685709809?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/7123755527685709809'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/7123755527685709809'/><link rel='alternate' type='text/html' href='http://dotnetcluster.blogspot.com/2014/01/write-new-rount-button-in-wpf.html' title='Write New Rount Button in Wpf Application'/><author><name>senthil</name><uri>http://www.blogger.com/profile/10176497138272144692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6yBCA6dmqdTdFA_RrV5WNNw2i9OhFvBLEDOr4O6lKWMveXn2MZ7zeouIXHFLFeejDiGZeMYd__LMv2FIFLmLwxO2JdMRLJl7evXM2ptT788-ZI8iVZUySasEisKZIcgs/s220/senthil.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5190158426865572469.post-535710645234178812</id><published>2014-01-07T18:39:00.002+05:30</published><updated>2014-01-07T18:42:05.342+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".Net"/><category scheme="http://www.blogger.com/atom/ns#" term="CSharp"/><title type='text'>The target version of the .NET Framework in the project does not match the .NET Framework launch condition version &#39;.NET Framework 4&#39;. Update the version of the .NET Framework launch condition to match the target version of the.NET Framework in the Advanced Compile Options Dialog Box (VB) or the Application Page (C#, F#).</title><content type='html'>This Warning i have experienced. When i going to change the Windows .Net Framework installer i had changed .Net Framework version 3.5 to version 4.0 that time i&#39;m getting this issue.

Its a easy to fix in this issue.

Just Right click the setup solution explorer file and click the &quot;view&quot; and then click &quot;Launch Conditions&quot; the Issue founded.

&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLnksIK-nkgXbKGuCCVj884dZ1FIlb_NSUCrja9DP9DDxePczsbEUiJaXb7rKAwRaysf0p4OfAVeLzBWkNPLvtxahNPvCPd5BuY95N2qcVSDgc2owNNrv2d9X2pdRZkUM8SkuQZUfkHrY/s1600/post2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLnksIK-nkgXbKGuCCVj884dZ1FIlb_NSUCrja9DP9DDxePczsbEUiJaXb7rKAwRaysf0p4OfAVeLzBWkNPLvtxahNPvCPd5BuY95N2qcVSDgc2owNNrv2d9X2pdRZkUM8SkuQZUfkHrY/s400/post2.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
and then Right Click the Launch Conditions &quot;Properties Windows&quot;

&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCf_k8YJp84AM9tp06unhbBuR_8g1Wod7AMM7FRhgGSg2xyZ8K1unAa5K8NSMWcj1pqX931ZbkF8zWSO2jBOzPIlLNWpMHiLDYCNTwcQ2wT7VuN1nBABKjkjJzEk4HNRvi5U8fhYNXf6o/s1600/Post1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCf_k8YJp84AM9tp06unhbBuR_8g1Wod7AMM7FRhgGSg2xyZ8K1unAa5K8NSMWcj1pqX931ZbkF8zWSO2jBOzPIlLNWpMHiLDYCNTwcQ2wT7VuN1nBABKjkjJzEk4HNRvi5U8fhYNXf6o/s400/Post1.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
after that select the correct .Net Framework version

&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOrZb3w8U4Qu-5dMZhTHcK3wQ2ZGEAVfNhA1NJe-hO12HaqKrE2qLTJhxFqZkgmmUigrQ5KvDvxJ_BAhJY0FwM0qmAFrRr7okVAgCUSNR-j4sFmTCAj4J9P1lHCX2sMXqGTM5bYqNd7CA/s1600/post3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOrZb3w8U4Qu-5dMZhTHcK3wQ2ZGEAVfNhA1NJe-hO12HaqKrE2qLTJhxFqZkgmmUigrQ5KvDvxJ_BAhJY0FwM0qmAFrRr7okVAgCUSNR-j4sFmTCAj4J9P1lHCX2sMXqGTM5bYqNd7CA/s400/post3.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
after that Right click the setup solution explorer file and select the properties

&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZb8SyBxMqZ7dqMHnWw1GtXTzBZs60njLVs8AyDIUa-MuIdZjIMB6jvg56OPX6wn9tOoH6DFetyldC-AQn6JNbeXrDe4VclnuRsUpG4ko3taAn7tzh1cKhEd3oBmtbhwHXdLpleVS8Lbs/s1600/Post4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZb8SyBxMqZ7dqMHnWw1GtXTzBZs60njLVs8AyDIUa-MuIdZjIMB6jvg56OPX6wn9tOoH6DFetyldC-AQn6JNbeXrDe4VclnuRsUpG4ko3taAn7tzh1cKhEd3oBmtbhwHXdLpleVS8Lbs/s400/Post4.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
there is select on &quot;Prerequsities&quot; selection correct .Net Framework version.

&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhq7swXdO2dKMPF71iedp77rG4i4vCxRSSxTApimVZguL8JwblE-Nj1F2Z4vXCgL1rpgPXgKVEWydSvApCav9Q45fTULhHgORlDWxprXoi9vB17aYWO-xPudl5hjNKkLeRg97keV9srLzQ/s1600/Post5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhq7swXdO2dKMPF71iedp77rG4i4vCxRSSxTApimVZguL8JwblE-Nj1F2Z4vXCgL1rpgPXgKVEWydSvApCav9Q45fTULhHgORlDWxprXoi9vB17aYWO-xPudl5hjNKkLeRg97keV9srLzQ/s400/Post5.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dotnetcluster.blogspot.com/feeds/535710645234178812/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5190158426865572469/535710645234178812?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/535710645234178812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/535710645234178812'/><link rel='alternate' type='text/html' href='http://dotnetcluster.blogspot.com/2014/01/the-target-version-of-net-framework-in.html' title='The target version of the .NET Framework in the project does not match the .NET Framework launch condition version &#39;.NET Framework 4&#39;. Update the version of the .NET Framework launch condition to match the target version of the.NET Framework in the Advanced Compile Options Dialog Box (VB) or the Application Page (C#, F#).'/><author><name>senthil</name><uri>http://www.blogger.com/profile/10176497138272144692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6yBCA6dmqdTdFA_RrV5WNNw2i9OhFvBLEDOr4O6lKWMveXn2MZ7zeouIXHFLFeejDiGZeMYd__LMv2FIFLmLwxO2JdMRLJl7evXM2ptT788-ZI8iVZUySasEisKZIcgs/s220/senthil.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLnksIK-nkgXbKGuCCVj884dZ1FIlb_NSUCrja9DP9DDxePczsbEUiJaXb7rKAwRaysf0p4OfAVeLzBWkNPLvtxahNPvCPd5BuY95N2qcVSDgc2owNNrv2d9X2pdRZkUM8SkuQZUfkHrY/s72-c/post2.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5190158426865572469.post-2338277788777386921</id><published>2014-01-04T18:40:00.001+05:30</published><updated>2014-01-04T19:12:02.365+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".Net"/><category scheme="http://www.blogger.com/atom/ns#" term="CSharp"/><title type='text'>Form Textbox Value assign from another class</title><content type='html'>When i click the button i want to assign the textbox value from another class.


&lt;!-- HTML generated using dotnetcluster --&gt;&lt;br /&gt;
&lt;div class=&quot;source-code&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;using&lt;/span&gt; System;
&lt;span style=&quot;color: blue;&quot;&gt;using&lt;/span&gt; System.Collections.Generic;
&lt;span style=&quot;color: blue;&quot;&gt;using&lt;/span&gt; System.ComponentModel;
&lt;span style=&quot;color: blue;&quot;&gt;using&lt;/span&gt; System.Data;
&lt;span style=&quot;color: blue;&quot;&gt;using&lt;/span&gt; System.Drawing;
&lt;span style=&quot;color: blue;&quot;&gt;using&lt;/span&gt; System.Linq;
&lt;span style=&quot;color: blue;&quot;&gt;using&lt;/span&gt; System.Text;
&lt;span style=&quot;color: blue;&quot;&gt;using&lt;/span&gt; System.Windows.Forms;

&lt;span style=&quot;color: blue;&quot;&gt;namespace&lt;/span&gt; WindowsFormsApplication2
{
    &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;partial&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Form1&lt;/span&gt; : Form
    {
        Download myDownload = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; Download();
        &lt;span style=&quot;color: blue;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;string&lt;/span&gt; textBoxString;
        &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; Form1()
        {
            InitializeComponent();
        }

        &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;string&lt;/span&gt; TextboxText
        {
            &lt;span style=&quot;color: blue;&quot;&gt;set&lt;/span&gt; { textBoxString = &lt;span style=&quot;color: blue;&quot;&gt;value&lt;/span&gt;; }
        }

        &lt;span style=&quot;color: blue;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; button1_Click_1(&lt;span style=&quot;color: #2b91af;&quot;&gt;object&lt;/span&gt; sender, EventArgs e)
        {
            myDownload.Do();
            textBox1.Text = textBoxString;
            textBox1.Invalidate();
        }
    }

    &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Download&lt;/span&gt;
    {
        &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; Do()
        {
            Form1.TextboxText = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;My text&quot;&lt;/span&gt;;
        }
    }
}
&lt;/pre&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;
&lt;/pre&gt;
&lt;/div&gt;

An even better solution would be to define the possible interactions in an interface, and let that interface be the contract between your form and the other class. That way the class is completely decoupled from the form, and can use anyting implementing the interface (which opens the door for far easier testing):


&lt;!-- HTML generated using dotnetcluster --&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;source-code&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;interface&lt;/span&gt; IYourForm
{
    &lt;span style=&quot;color: #2b91af;&quot;&gt;string&lt;/span&gt; FirstName { &lt;span style=&quot;color: blue;&quot;&gt;get&lt;/span&gt;; &lt;span style=&quot;color: blue;&quot;&gt;set&lt;/span&gt;; }
}
&lt;/pre&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;
&lt;/pre&gt;
&lt;/div&gt;


In your form class:


&lt;!-- HTML generated using dotnetcluster --&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;source-code&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;YourFormClass&lt;/span&gt; : Form, IYourForm
{
    &lt;span style=&quot;color: green;&quot;&gt;// lots of other code here&lt;/span&gt;

    &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;string&lt;/span&gt; FirstName
    {
        &lt;span style=&quot;color: blue;&quot;&gt;get&lt;/span&gt; { &lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt; firstNameTextBox.Text; }
        &lt;span style=&quot;color: blue;&quot;&gt;set&lt;/span&gt; { firstNameTextBox.Text = &lt;span style=&quot;color: blue;&quot;&gt;value&lt;/span&gt;; }
    }
}
&lt;/pre&gt;
&lt;/div&gt;

...and the class:


&lt;!-- HTML generated using dotnetcluster --&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;source-code&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;SomeClass&lt;/span&gt;
{
    &lt;span style=&quot;color: blue;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;readonly&lt;/span&gt; IYourForm form;
    &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; SomeClass(IYourForm form)
    {
        &lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;.form = form;
    }

    &lt;span style=&quot;color: green;&quot;&gt;// and so on&lt;/span&gt;

}
&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dotnetcluster.blogspot.com/feeds/2338277788777386921/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5190158426865572469/2338277788777386921?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/2338277788777386921'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/2338277788777386921'/><link rel='alternate' type='text/html' href='http://dotnetcluster.blogspot.com/2014/01/form-textbox-value-assign-from-another.html' title='Form Textbox Value assign from another class'/><author><name>senthil</name><uri>http://www.blogger.com/profile/10176497138272144692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6yBCA6dmqdTdFA_RrV5WNNw2i9OhFvBLEDOr4O6lKWMveXn2MZ7zeouIXHFLFeejDiGZeMYd__LMv2FIFLmLwxO2JdMRLJl7evXM2ptT788-ZI8iVZUySasEisKZIcgs/s220/senthil.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5190158426865572469.post-4060199824315349650</id><published>2014-01-04T13:26:00.002+05:30</published><updated>2014-01-04T13:35:50.347+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".Net"/><category scheme="http://www.blogger.com/atom/ns#" term="CSharp"/><title type='text'>Windows installer error</title><content type='html'>When i install my wpf installer while getting error like this. any body know about this issue.&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;Question :-&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Error 1001. Unable to get installer types in the C:\\YM\ConfigUI\ConfigUI.exe assembly. --&amp;gt; Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;The description for Event ID 11001 from source MsiInstaller cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;If the event originated on another computer, the display information had to be saved with the event.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;The following information was included with the event: 

Product: YottaMark Case Labeling Solution -- Error 1001. Error 1001. Unable to get installer types in the C:\YM\ConfigUI\ConfigUI.exe assembly. --&amp;gt; Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.&lt;br /&gt;
(NULL)&lt;br /&gt;
(NULL)&lt;br /&gt;
&amp;nbsp;(NULL)&lt;br /&gt;
(NULL)&lt;br /&gt;
(NULL)&lt;br /&gt;
&amp;nbsp;the message resource is present but the message is not found in the string/message table
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;Answer : -&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
Based on the error message in your second comment, it appears that your ConfigUI.exe assembly has been added as a Custom Action with the InstallerClass property set to true, but either no installer classes could be found in the exe or the exe could not be loaded due to missing dependencies.&lt;br /&gt;
&lt;br /&gt;
You can see the list of Custom Actions by right-clicking on the installer project, selecting View and then Custom Actions.&lt;br /&gt;
&lt;br /&gt;
If your exe does not can an installer class, then you can remove it from the list of custom actions.&lt;br /&gt;
&lt;br /&gt;
If it does contain an installer class, then the issue is going to be missing dependencies. If fuslogvw doesn&#39;t work for you (it has always helped resolve this kind of issue for us), you can carefully review the list of references in the exe&#39;s project and compare them to what is listed in the installer project.&lt;br /&gt;
&lt;br /&gt;
The other trick that we use is to examine the install directory while the error message is displayed on the screen. We can often see that DLLs are missing by doing this, usually because the path was entered incorrectly in the DLL entry within the installer project or because a condition was set incorrectly.&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetcluster.blogspot.com/feeds/4060199824315349650/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5190158426865572469/4060199824315349650?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/4060199824315349650'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/4060199824315349650'/><link rel='alternate' type='text/html' href='http://dotnetcluster.blogspot.com/2014/01/windows-installer-error.html' title='Windows installer error'/><author><name>senthil</name><uri>http://www.blogger.com/profile/10176497138272144692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6yBCA6dmqdTdFA_RrV5WNNw2i9OhFvBLEDOr4O6lKWMveXn2MZ7zeouIXHFLFeejDiGZeMYd__LMv2FIFLmLwxO2JdMRLJl7evXM2ptT788-ZI8iVZUySasEisKZIcgs/s220/senthil.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5190158426865572469.post-5474960447125811537</id><published>2013-12-20T00:41:00.002+05:30</published><updated>2013-12-20T00:41:46.651+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".Net"/><category scheme="http://www.blogger.com/atom/ns#" term="CSharp"/><title type='text'>Application Manifest Schema:</title><content type='html'>Application manifests are not new to the Windows Vista release. Manifests were used in Windows XP to help application developers identify such things as which versions of DLLs the application was tested with. Providing the execution level is an extension to that existing application manifest schema.

The Windows Vista application manifest has been enhanced with attributes that permit developers to mark their applications with a requested execution level. The following is the format for this:



&lt;!-- HTML generated using dotnetcluster --&gt;&lt;div class=&quot;source-code&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&amp;lt;requestedExecutionLevel
level=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;asInvoker|highestAvailable|requireAdministrator&amp;quot;&lt;/span&gt;
uiAccess=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;true|false&amp;quot;&lt;/span&gt;/&amp;gt;
&lt;/pre&gt;&lt;/div&gt;



Your application will prompt for elevation if the user is an administrator and UAC is enabled


&lt;!-- HTML generated using dotnetcluster --&gt;&lt;div class=&quot;source-code&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&amp;lt;trustInfo xmlns=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;urn:schemas-microsoft-com:asm.v2&amp;quot;&lt;/span&gt;&amp;gt;
  &amp;lt;security&amp;gt;
   &amp;lt;requestedPrivileges xmlns=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;urn:schemas-microsoft-com:asm.v3&amp;quot;&lt;/span&gt;&amp;gt;
    &amp;lt;!-- UAC Manifest Options
      If you want to change the Windows User Account Control level replace the 
      requestedExecutionLevel node with one of the following.

    &amp;lt;requestedExecutionLevel level=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;asInvoker&amp;quot;&lt;/span&gt; uiAccess=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;false&amp;quot;&lt;/span&gt; /&amp;gt;
    &amp;lt;requestedExecutionLevel level=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;requireAdministrator&amp;quot;&lt;/span&gt; uiAccess=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;false&amp;quot;&lt;/span&gt; /&amp;gt;
    &amp;lt;requestedExecutionLevel level=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;highestAvailable&amp;quot;&lt;/span&gt; uiAccess=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;false&amp;quot;&lt;/span&gt; /&amp;gt;

      Specifying requestedExecutionLevel node will disable file and registry virtualization.
      If you want to utilize File and Registry Virtualization &lt;span style=&quot;color: #0000ff&quot;&gt;for&lt;/span&gt; backward 
      compatibility then delete the requestedExecutionLevel node.
    --&amp;gt;
    &amp;lt;requestedExecutionLevel level=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;highestAvailable&amp;quot;&lt;/span&gt; uiAccess=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;false&amp;quot;&lt;/span&gt; /&amp;gt;
   &amp;lt;/requestedPrivileges&amp;gt;
  &amp;lt;/security&amp;gt;
 &amp;lt;/trustInfo&amp;gt;
&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetcluster.blogspot.com/feeds/5474960447125811537/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5190158426865572469/5474960447125811537?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/5474960447125811537'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/5474960447125811537'/><link rel='alternate' type='text/html' href='http://dotnetcluster.blogspot.com/2013/12/application-manifest-schema.html' title='Application Manifest Schema:'/><author><name>senthil</name><uri>http://www.blogger.com/profile/10176497138272144692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6yBCA6dmqdTdFA_RrV5WNNw2i9OhFvBLEDOr4O6lKWMveXn2MZ7zeouIXHFLFeejDiGZeMYd__LMv2FIFLmLwxO2JdMRLJl7evXM2ptT788-ZI8iVZUySasEisKZIcgs/s220/senthil.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5190158426865572469.post-2897348747604470266</id><published>2013-12-19T23:22:00.006+05:30</published><updated>2013-12-19T23:23:09.180+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".Net"/><category scheme="http://www.blogger.com/atom/ns#" term="CSharp"/><title type='text'>Exception Error: cannot open  on computer &#39;.&#39;. </title><content type='html'>This error i have experienced. when i going to start my application service while happened this error. Just start your service using sample application create one button click and then place this code. Its service start using ServiceController.


&lt;!-- HTML generated using dotnetcluster --&gt;&lt;div class=&quot;source-code&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; button1_Click(&lt;span style=&quot;color: #2b91af&quot;&gt;object&lt;/span&gt; sender, RoutedEventArgs e)
        {
            &lt;span style=&quot;color: #0000ff&quot;&gt;try&lt;/span&gt;
            {
                ServiceController sc = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; ServiceController(&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;YottaMark Code Dispenser&amp;quot;&lt;/span&gt;);
                &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; ((sc.Status.Equals(ServiceControllerStatus.Stopped)))
                {
                    sc.Start();

                    MessageBox.Show(&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Starting the  YottaMark Code Dispenser&amp;quot;&lt;/span&gt;);
                }
                MessageBox.Show(&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Started the YottaMark Code Dispenser&amp;quot;&lt;/span&gt;);
            }
            &lt;span style=&quot;color: #0000ff&quot;&gt;catch&lt;/span&gt; (Exception Ex)
            {
                MessageBox.Show(Ex.Message);
            }
        }
&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetcluster.blogspot.com/feeds/2897348747604470266/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5190158426865572469/2897348747604470266?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/2897348747604470266'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/2897348747604470266'/><link rel='alternate' type='text/html' href='http://dotnetcluster.blogspot.com/2013/12/exception-error-cannot-open-on-computer.html' title='Exception Error: cannot open &lt;servicename&gt; on computer &#39;.&#39;. '/><author><name>senthil</name><uri>http://www.blogger.com/profile/10176497138272144692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6yBCA6dmqdTdFA_RrV5WNNw2i9OhFvBLEDOr4O6lKWMveXn2MZ7zeouIXHFLFeejDiGZeMYd__LMv2FIFLmLwxO2JdMRLJl7evXM2ptT788-ZI8iVZUySasEisKZIcgs/s220/senthil.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5190158426865572469.post-6844475581899882396</id><published>2013-12-12T15:03:00.001+05:30</published><updated>2013-12-12T15:05:16.530+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="CSharp"/><category scheme="http://www.blogger.com/atom/ns#" term="wpf"/><category scheme="http://www.blogger.com/atom/ns#" term="xaml"/><title type='text'>How to create a GridView in Wpf application using C#</title><content type='html'>This code create a new gridview in wpf application. its working good.


&lt;!-- HTML generated using dotnetcluster --&gt;&lt;div class=&quot;source-code&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&amp;lt;Grid&amp;gt;
        &amp;lt;DataGrid x:Name=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;MyDataGrid&amp;quot;&lt;/span&gt; x:Uid=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;MyDataGrid&amp;quot;&lt;/span&gt; AutoGenerateColumns=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;False&amp;quot;&lt;/span&gt; 
                       AlternationCount=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;2&amp;quot;&lt;/span&gt; SelectionMode=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Single&amp;quot;&lt;/span&gt; Height=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;175&amp;quot;&lt;/span&gt; VerticalAlignment=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Bottom&amp;quot;&lt;/span&gt; Background=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;White&amp;quot;&lt;/span&gt; Margin=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;12,0,12,12&amp;quot;&lt;/span&gt; CanUserAddRows=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;False&amp;quot;&lt;/span&gt; CanUserDeleteRows=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;False&amp;quot;&lt;/span&gt;&amp;gt;
            &amp;lt;DataGrid.Columns&amp;gt;
                &amp;lt;DataGridTextColumn IsReadOnly=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;True&amp;quot;&lt;/span&gt; Binding=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;{Binding Path=Name}&amp;quot;&lt;/span&gt;
                                    Header=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Name&amp;quot;&lt;/span&gt; Width=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;SizeToHeader&amp;quot;&lt;/span&gt; /&amp;gt;
                &amp;lt;DataGridTextColumn IsReadOnly=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;True&amp;quot;&lt;/span&gt; Binding=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;{Binding Path=Email}&amp;quot;&lt;/span&gt; 
                                    Header=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Email&amp;quot;&lt;/span&gt; Width=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;SizeToHeader&amp;quot;&lt;/span&gt; /&amp;gt;
                &amp;lt;DataGridTextColumn IsReadOnly=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;True&amp;quot;&lt;/span&gt; Binding=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;{Binding Path=DOB}&amp;quot;&lt;/span&gt;
                                    Header=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;DOB&amp;quot;&lt;/span&gt; Width=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;SizeToHeader&amp;quot;&lt;/span&gt; /&amp;gt;
                &amp;lt;DataGridTextColumn IsReadOnly=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;True&amp;quot;&lt;/span&gt; Binding=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;{Binding Path=Address1}&amp;quot;&lt;/span&gt;
                                    Header=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Address1&amp;quot;&lt;/span&gt; Width=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;SizeToHeader&amp;quot;&lt;/span&gt; /&amp;gt;
                &amp;lt;DataGridTextColumn IsReadOnly=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;True&amp;quot;&lt;/span&gt; Binding=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;{Binding Path=City}&amp;quot;&lt;/span&gt;
                                    Header=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;City&amp;quot;&lt;/span&gt; Width=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;SizeToHeader&amp;quot;&lt;/span&gt; /&amp;gt;
                &amp;lt;DataGridTextColumn IsReadOnly=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;True&amp;quot;&lt;/span&gt; Binding=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;{Binding Path=Country}&amp;quot;&lt;/span&gt;
                                    Header=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Country&amp;quot;&lt;/span&gt; Width=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;SizeToHeader&amp;quot;&lt;/span&gt; /&amp;gt;
                &amp;lt;DataGridTemplateColumn Header=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Edit&amp;quot;&lt;/span&gt;&amp;gt;
                    &amp;lt;DataGridTemplateColumn.CellTemplate&amp;gt;
                        &amp;lt;DataTemplate&amp;gt;
                            &amp;lt;Button Content=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Edit&amp;quot;&lt;/span&gt; Click=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;EditButton_Click&amp;quot;&lt;/span&gt; /&amp;gt;
                        &amp;lt;/DataTemplate&amp;gt;
                    &amp;lt;/DataGridTemplateColumn.CellTemplate&amp;gt;
                &amp;lt;/DataGridTemplateColumn&amp;gt;
                &amp;lt;DataGridTemplateColumn Header=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Delete&amp;quot;&lt;/span&gt;&amp;gt;
                    &amp;lt;DataGridTemplateColumn.CellTemplate&amp;gt;
                        &amp;lt;DataTemplate&amp;gt;
                            &amp;lt;Button Content=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Delete&amp;quot;&lt;/span&gt; Click=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;DeleteButton_Click&amp;quot;&lt;/span&gt; /&amp;gt;
                        &amp;lt;/DataTemplate&amp;gt;
                    &amp;lt;/DataGridTemplateColumn.CellTemplate&amp;gt;                    
                &amp;lt;/DataGridTemplateColumn&amp;gt;               
            &amp;lt;/DataGrid.Columns&amp;gt;
        &amp;lt;/DataGrid&amp;gt;
        &amp;lt;Label Content=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Printer Configuration&amp;quot;&lt;/span&gt; FontSize=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;16&amp;quot;&lt;/span&gt; Foreground=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Blue&amp;quot;&lt;/span&gt; Height=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;28&amp;quot;&lt;/span&gt; HorizontalAlignment=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Left&amp;quot;&lt;/span&gt; Margin=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;8,5,0,0&amp;quot;&lt;/span&gt; Name=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Title&amp;quot;&lt;/span&gt; VerticalAlignment=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Top&amp;quot;&lt;/span&gt; Width=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;272&amp;quot;&lt;/span&gt; /&amp;gt;
        &amp;lt;Button Content=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Add Printer&amp;quot;&lt;/span&gt; Height=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;23&amp;quot;&lt;/span&gt; HorizontalAlignment=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Left&amp;quot;&lt;/span&gt; Margin=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;409,12,0,0&amp;quot;&lt;/span&gt; Name=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;btnAddPrinter&amp;quot;&lt;/span&gt; VerticalAlignment=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Top&amp;quot;&lt;/span&gt; Width=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;141&amp;quot;&lt;/span&gt; Background=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Blue&amp;quot;&lt;/span&gt; Foreground=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;White&amp;quot;&lt;/span&gt; FontSize=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;13&amp;quot;&lt;/span&gt; Click=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;btnAddEmploy_Click&amp;quot;&lt;/span&gt; /&amp;gt;
    &amp;lt;/Grid&amp;gt;
&lt;/pre&gt;&lt;/div&gt;


Just copy this code and past your wpf xaml file side of the window after that

&lt;!-- HTML generated using dotnetcluster --&gt;&lt;div class=&quot;source-code&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; LoadEmploys()
        {
&lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt; employconfigFolder=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;D:\\Employ.xml&amp;quot;&lt;/span&gt;
            &lt;span style=&quot;color: #2b91af&quot;&gt;var&lt;/span&gt; doc = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; XmlDocument();
            doc.Load(employconfigFolder);

            XmlNodeList employ = doc.GetElementsByTagName(&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Employ&amp;quot;&lt;/span&gt;);

            List&amp;lt;EmployAttribute&amp;gt; authors = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; List&amp;lt;EmployAttribute&amp;gt;();

            &lt;span style=&quot;color: #0000ff&quot;&gt;foreach&lt;/span&gt; (XmlNode item &lt;span style=&quot;color: #0000ff&quot;&gt;in&lt;/span&gt; employ)
            {
                &lt;span style=&quot;color: #2b91af&quot;&gt;bool&lt;/span&gt; defaultPrinter = &lt;span style=&quot;color: #0000ff&quot;&gt;false&lt;/span&gt;;

                authors.Add(&lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; PrinterAttribute()
                {
                    Name = item.Attributes[&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Name&amp;quot;&lt;/span&gt;].Value,
                    Email = item.Attributes[&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Email&amp;quot;&lt;/span&gt;].Value,
                    DOB = item.Attributes[&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;DOB&amp;quot;&lt;/span&gt;].Value,
                    Address1 = item.Attributes[&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Address1&amp;quot;&lt;/span&gt;].Value,
                    City = item.Attributes[&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;City&amp;quot;&lt;/span&gt;].Value,
                    Country = item.Attributes[&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Country&amp;quot;&lt;/span&gt;].Value,
                });
            }
            MyDataGrid.ItemsSource = authors;
        }



 &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2b91af&quot;&gt;EmployAttribute&lt;/span&gt;
        {
            &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt; Name { &lt;span style=&quot;color: #0000ff&quot;&gt;get&lt;/span&gt;; &lt;span style=&quot;color: #0000ff&quot;&gt;set&lt;/span&gt;; }
            &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt; Email { &lt;span style=&quot;color: #0000ff&quot;&gt;get&lt;/span&gt;; &lt;span style=&quot;color: #0000ff&quot;&gt;set&lt;/span&gt;; }
            &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt; DOB { &lt;span style=&quot;color: #0000ff&quot;&gt;get&lt;/span&gt;; &lt;span style=&quot;color: #0000ff&quot;&gt;set&lt;/span&gt;; }
            &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt; Address1 { &lt;span style=&quot;color: #0000ff&quot;&gt;get&lt;/span&gt;; &lt;span style=&quot;color: #0000ff&quot;&gt;set&lt;/span&gt;; }
            &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #2b91af&quot;&gt;bool&lt;/span&gt; City { &lt;span style=&quot;color: #0000ff&quot;&gt;get&lt;/span&gt;; &lt;span style=&quot;color: #0000ff&quot;&gt;set&lt;/span&gt;; }
            &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #2b91af&quot;&gt;bool&lt;/span&gt; Country { &lt;span style=&quot;color: #0000ff&quot;&gt;get&lt;/span&gt;; &lt;span style=&quot;color: #0000ff&quot;&gt;set&lt;/span&gt;; }
        }
&lt;/pre&gt;&lt;/div&gt;


you can call LoadEmploys() method in your window_Loaded() its working fine. 

</content><link rel='replies' type='application/atom+xml' href='http://dotnetcluster.blogspot.com/feeds/6844475581899882396/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5190158426865572469/6844475581899882396?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/6844475581899882396'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/6844475581899882396'/><link rel='alternate' type='text/html' href='http://dotnetcluster.blogspot.com/2013/12/how-to-create-gridview-in-wpf.html' title='How to create a GridView in Wpf application using C#'/><author><name>senthil</name><uri>http://www.blogger.com/profile/10176497138272144692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6yBCA6dmqdTdFA_RrV5WNNw2i9OhFvBLEDOr4O6lKWMveXn2MZ7zeouIXHFLFeejDiGZeMYd__LMv2FIFLmLwxO2JdMRLJl7evXM2ptT788-ZI8iVZUySasEisKZIcgs/s220/senthil.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5190158426865572469.post-2617585938933330353</id><published>2013-12-07T12:09:00.002+05:30</published><updated>2013-12-07T12:09:44.757+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="CSharp"/><title type='text'>How to method call using Timer in c# </title><content type='html'>this code using the system timer we can call the method. i tried working good. its a easy way to call the method using Timer interval time. 

Following the sample code:


&lt;!-- HTML generated using dotnet cluster --&gt;&lt;div class=&quot;source-code&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; button1_Click(&lt;span style=&quot;color: #2b91af&quot;&gt;object&lt;/span&gt; sender, RoutedEventArgs e)
        {
            aTimer = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; System.Timers.Timer(10000);

            aTimer.Elapsed += &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; ElapsedEventHandler(OnTimedEvent);

            aTimer.Interval = 2000;
            aTimer.Enabled = &lt;span style=&quot;color: #0000ff&quot;&gt;true&lt;/span&gt;;

            Console.WriteLine(&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Press the Enter key to exit the program.&amp;quot;&lt;/span&gt;);
            Console.ReadLine();
           
        }

        &lt;span style=&quot;color: #0000ff&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; OnTimedEvent(&lt;span style=&quot;color: #2b91af&quot;&gt;object&lt;/span&gt; source, ElapsedEventArgs e)
        {
            aTimer.Enabled = &lt;span style=&quot;color: #0000ff&quot;&gt;false&lt;/span&gt;;
            Console.WriteLine(&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;The Elapsed event was raised at {0}&amp;quot;&lt;/span&gt;, e.SignalTime);
        }
&lt;/pre&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dotnetcluster.blogspot.com/feeds/2617585938933330353/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5190158426865572469/2617585938933330353?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/2617585938933330353'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/2617585938933330353'/><link rel='alternate' type='text/html' href='http://dotnetcluster.blogspot.com/2013/12/how-to-method-call-using-timer-in-c.html' title='How to method call using Timer in c# '/><author><name>senthil</name><uri>http://www.blogger.com/profile/10176497138272144692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6yBCA6dmqdTdFA_RrV5WNNw2i9OhFvBLEDOr4O6lKWMveXn2MZ7zeouIXHFLFeejDiGZeMYd__LMv2FIFLmLwxO2JdMRLJl7evXM2ptT788-ZI8iVZUySasEisKZIcgs/s220/senthil.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5190158426865572469.post-1463487654197182578</id><published>2013-11-30T11:05:00.001+05:30</published><updated>2013-11-30T11:05:20.875+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="CSharp"/><title type='text'>how to create HTML Ui using C# string Builder</title><content type='html'>This is code when i create my sample web application i want to create html ui in back end code so i created using string builder.


&lt;!-- HTML generated using donnetcluster --&gt;&lt;div class=&quot;source-code&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (dt.Rows.Count &amp;gt; 0)
            {
                StringBuilder strb = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; StringBuilder();
                strb.Append(&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;quot;&lt;/span&gt;);
                strb.Append(&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;&amp;lt;table border=&amp;#39;1&amp;#39; cellpadding=&amp;#39;3&amp;#39;&amp;gt;&amp;quot;&lt;/span&gt;);
                &lt;span style=&quot;color: #0000ff&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #2b91af&quot;&gt;int&lt;/span&gt; i = 0; i &amp;lt; dt.Rows.Count; i++)
                {
                    strb.Append(&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;quot;&lt;/span&gt;);
                    strb.Append(dt.Rows[i][&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Subject&amp;quot;&lt;/span&gt;].ToString());
                    strb.Append(&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;&amp;lt;/td&amp;gt;&amp;quot;&lt;/span&gt;);
                    strb.Append(&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;&amp;lt;td&amp;gt;&amp;quot;&lt;/span&gt;);
                    strb.Append(&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;&amp;lt;input type=\&amp;quot;text\&amp;quot; name=\&amp;quot;subject\&amp;quot; id=\&amp;quot;txtSubject&amp;quot;&lt;/span&gt; + i.ToString() + &lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;\&amp;quot; runat=\&amp;quot;server\&amp;quot; /&amp;gt;&amp;quot;&lt;/span&gt;);
                    strb.Append(&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;&amp;lt;input type=\&amp;quot;hidden\&amp;quot; name=\&amp;quot;hidsubject\&amp;quot; id=\&amp;quot;hidSubject&amp;quot;&lt;/span&gt; + i.ToString() + &lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;\&amp;quot; runat=\&amp;quot;server+\&amp;quot; value=&amp;quot;&lt;/span&gt; + dt.Rows[i][&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Subject_ID&amp;quot;&lt;/span&gt;].ToString() + &lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;/&amp;gt;&amp;quot;&lt;/span&gt;);
                    strb.Append(&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;quot;&lt;/span&gt;);
                }
                &lt;span style=&quot;color: #008000&quot;&gt;//subject = subject + &amp;quot;,&amp;quot; + dt.Rows[i][&amp;quot;Subject_ID&amp;quot;].ToString();&lt;/span&gt;
                &lt;span style=&quot;color: #008000&quot;&gt;//hidSubject.Value = subject;&lt;/span&gt;
                strb.Append(&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;&amp;lt;/table&amp;gt;&amp;quot;&lt;/span&gt;);
                divMark.InnerHtml = strb.ToString();
            }
&lt;/pre&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dotnetcluster.blogspot.com/feeds/1463487654197182578/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5190158426865572469/1463487654197182578?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/1463487654197182578'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/1463487654197182578'/><link rel='alternate' type='text/html' href='http://dotnetcluster.blogspot.com/2013/11/how-to-create-html-ui-using-c-string.html' title='how to create HTML Ui using C# string Builder'/><author><name>senthil</name><uri>http://www.blogger.com/profile/10176497138272144692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6yBCA6dmqdTdFA_RrV5WNNw2i9OhFvBLEDOr4O6lKWMveXn2MZ7zeouIXHFLFeejDiGZeMYd__LMv2FIFLmLwxO2JdMRLJl7evXM2ptT788-ZI8iVZUySasEisKZIcgs/s220/senthil.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5190158426865572469.post-7526296242527844656</id><published>2013-11-29T16:14:00.002+05:30</published><updated>2013-11-29T16:28:30.343+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="CSharp"/><title type='text'>How to refresh combobox XmlDataProvider data using C# (OR) &quot;Exception error: Unable to cast object of type &#39;System.Windows.Data.XmlDataProvider&#39; to type &#39;System.Windows.Data.CollectionContainer&#39;.&quot;</title><content type='html'>This solution i experienced. when i develop wpf application there i used combobox. when i try to add new student that time combobox items not reloaded. because of application loading time i loaded dynamically. so i don&#39;t no how to refresh the combobox list. After that i got this solution.

when u add new item while after &quot;objwindow.ShowDialog()&quot; refresh the combobox.   


&lt;!-- HTML generated using dotnetcluster --&gt;&lt;div class=&quot;source-code&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt; &amp;lt;ComboBox Name=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Student&amp;quot;&lt;/span&gt; ItemsSource=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;{Binding Source={StaticResource Students}, XPath=Student/@StudentName}&amp;quot;&lt;/span&gt;
SelectionChanged=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;{pti:DelegateCreator student_Changed}&amp;quot;&lt;/span&gt; MinWidth=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;150&amp;quot;&lt;/span&gt;
Style=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;{StaticResource RequiredComboBox}&amp;quot;&lt;/span&gt; /&amp;gt;
&lt;/pre&gt;&lt;/div&gt;

if you want to refresh from the controller your combobox name declare commonly like  

&lt;!-- HTML generated using dotnetcluster --&gt;&lt;div class=&quot;source-code&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;ComboBox _studentList = FindLogicalNode(window, STUDENT_LIST) &lt;span style=&quot;color: #0000ff&quot;&gt;as&lt;/span&gt; ComboBox;
&lt;/pre&gt;&lt;/div&gt;
 
other wise your refresh from the xaml.cs file there your can declare like &quot;this.FindResource&quot;

&lt;!-- HTML generated using dotnetcluster --&gt;&lt;div class=&quot;source-code&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; studentConfig_Click(&lt;span style=&quot;color: #2b91af&quot;&gt;object&lt;/span&gt; source, RoutedEventArgs args)
        {
            StudentConfiguration objwindow = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; StudentConfiguration();
            objwindow.ShowDialog();
            (_studentList.FindResource(&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Students&amp;quot;&lt;/span&gt;) &lt;span style=&quot;color: #0000ff&quot;&gt;as&lt;/span&gt; XmlDataProvider).Refresh();            
        }
&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetcluster.blogspot.com/feeds/7526296242527844656/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5190158426865572469/7526296242527844656?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/7526296242527844656'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/7526296242527844656'/><link rel='alternate' type='text/html' href='http://dotnetcluster.blogspot.com/2013/11/how-to-refresh-combobox-xmldataprovider.html' title='How to refresh combobox XmlDataProvider data using C# (OR) &quot;Exception error: Unable to cast object of type &#39;System.Windows.Data.XmlDataProvider&#39; to type &#39;System.Windows.Data.CollectionContainer&#39;.&quot;'/><author><name>senthil</name><uri>http://www.blogger.com/profile/10176497138272144692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6yBCA6dmqdTdFA_RrV5WNNw2i9OhFvBLEDOr4O6lKWMveXn2MZ7zeouIXHFLFeejDiGZeMYd__LMv2FIFLmLwxO2JdMRLJl7evXM2ptT788-ZI8iVZUySasEisKZIcgs/s220/senthil.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5190158426865572469.post-2611805319829271596</id><published>2013-11-28T15:59:00.001+05:30</published><updated>2013-11-28T15:59:33.846+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="CSharp"/><title type='text'>How to Get the System Printer list and Get the default Printer using C#</title><content type='html'>This code when i want to get all my system printer list and set the default printer in my application while i used this code its working good. because of i want to do bar code printer so i have used more then one printer.


Its very easy to get the system printer name using this method.

&lt;!-- HTML generated using dotnetcluster --&gt;&lt;div class=&quot;source-code&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;using&lt;/span&gt; System.Text;
&lt;span style=&quot;color: #0000ff&quot;&gt;using&lt;/span&gt; System.Windows.Forms;
&lt;span style=&quot;color: #0000ff&quot;&gt;using&lt;/span&gt; System.Management;
&lt;span style=&quot;color: #0000ff&quot;&gt;using&lt;/span&gt; System.Drawing.Printing;

&lt;span style=&quot;color: #0000ff&quot;&gt;namespace&lt;/span&gt; GetPrintersName
{
    &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;partial&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2b91af&quot;&gt;Form1&lt;/span&gt; : Form
    {
        &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; Form1()
        {           
            InitializeComponent();
        }
    }

    &lt;span style=&quot;color: #0000ff&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; Form1_Load(&lt;span style=&quot;color: #2b91af&quot;&gt;object&lt;/span&gt; sender, EventArgs e)
    {
        printer();
    }

    &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; printer() 
    {
        &lt;span style=&quot;color: #0000ff&quot;&gt;foreach&lt;/span&gt; (&lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt; printer &lt;span style=&quot;color: #0000ff&quot;&gt;in&lt;/span&gt; PrinterSettings.InstalledPrinters)
                 Console.WriteLine(printer);
 
            &lt;span style=&quot;color: #2b91af&quot;&gt;var&lt;/span&gt; printerSettings = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; PrinterSettings();
            Console.WriteLine(&lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;.Format(&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;The default printer is: {0}&amp;quot;&lt;/span&gt;,                         printerSettings.PrinterName));                 
     }
}
&lt;/pre&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dotnetcluster.blogspot.com/feeds/2611805319829271596/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5190158426865572469/2611805319829271596?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/2611805319829271596'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/2611805319829271596'/><link rel='alternate' type='text/html' href='http://dotnetcluster.blogspot.com/2013/11/how-to-get-system-printer-list-and-get.html' title='How to Get the System Printer list and Get the default Printer using C#'/><author><name>senthil</name><uri>http://www.blogger.com/profile/10176497138272144692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6yBCA6dmqdTdFA_RrV5WNNw2i9OhFvBLEDOr4O6lKWMveXn2MZ7zeouIXHFLFeejDiGZeMYd__LMv2FIFLmLwxO2JdMRLJl7evXM2ptT788-ZI8iVZUySasEisKZIcgs/s220/senthil.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5190158426865572469.post-8443142018390834123</id><published>2013-11-22T11:26:00.002+05:30</published><updated>2013-11-22T11:26:54.700+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="CSharp"/><title type='text'>How to Add config file xml node using C#</title><content type='html'>This is code Add xml node in configuration file using C# method.

Step:1 
this is sample.config file

&lt;!-- HTML generated using dotnetcluster --&gt;&lt;div class=&quot;source-code&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&amp;lt;TABLE&amp;gt;
&amp;lt;ROW&amp;gt;
    &amp;lt;COLUMN SOURCE=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;1&amp;quot;&lt;/span&gt; NAME=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;age&amp;quot;&lt;/span&gt; /&amp;gt;
    &amp;lt;COLUMN SOURCE=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;3&amp;quot;&lt;/span&gt; NAME=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;firstname&amp;quot;&lt;/span&gt; /&amp;gt;
    &amp;lt;COLUMN SOURCE=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;4&amp;quot;&lt;/span&gt; NAME=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;lastname&amp;quot;&lt;/span&gt; /&amp;gt;
  &amp;lt;/ROW&amp;gt;
&amp;lt;/TABLE&amp;gt;
&lt;/pre&gt;&lt;/div&gt;

Step:2
I want to add xml node for my application configuration settings. so i want to add configuration setting using user interface 

Step:3 
I created user interface one add page for add xml node.

Step:4
I used this method and pass the xml value add the node.


&lt;!-- HTML generated using dotnetcluster --&gt;&lt;div class=&quot;source-code&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #2b91af&quot;&gt;bool&lt;/span&gt; AddconfigFileXmlNode()
        {
            &lt;span style=&quot;color: #0000ff&quot;&gt;try&lt;/span&gt;
            {
                &lt;span style=&quot;color: #2b91af&quot;&gt;var&lt;/span&gt; doc = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; XmlDocument();
                doc.Load(&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;D:\\sample.config&amp;quot;&lt;/span&gt;);
                 
                XmlNode profile;                
                profile = doc.SelectSingleNode(&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;TABLE/ROW&amp;quot;&lt;/span&gt;);

                XmlElement newChild = doc.CreateElement(&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;COLUMN&amp;quot;&lt;/span&gt;);

                newChild.SetAttribute(&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;SOURCE&amp;quot;&lt;/span&gt;, &lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;4&amp;quot;&lt;/span&gt;);
                newChild.SetAttribute(&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;NAME&amp;quot;&lt;/span&gt;, &lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;lastname&amp;quot;&lt;/span&gt;);  
            

                profile.AppendChild(newChild);
                doc.Save(&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;D:\\sample.config&amp;quot;&lt;/span&gt;);
            }
            &lt;span style=&quot;color: #0000ff&quot;&gt;catch&lt;/span&gt; { }
            &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;true&lt;/span&gt;;
        }
&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetcluster.blogspot.com/feeds/8443142018390834123/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5190158426865572469/8443142018390834123?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/8443142018390834123'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/8443142018390834123'/><link rel='alternate' type='text/html' href='http://dotnetcluster.blogspot.com/2013/11/how-to-add-config-file-xml-node-using-c.html' title='How to Add config file xml node using C#'/><author><name>senthil</name><uri>http://www.blogger.com/profile/10176497138272144692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6yBCA6dmqdTdFA_RrV5WNNw2i9OhFvBLEDOr4O6lKWMveXn2MZ7zeouIXHFLFeejDiGZeMYd__LMv2FIFLmLwxO2JdMRLJl7evXM2ptT788-ZI8iVZUySasEisKZIcgs/s220/senthil.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5190158426865572469.post-2404097499524819986</id><published>2013-11-21T22:55:00.001+05:30</published><updated>2013-11-21T22:55:57.381+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="CSharp"/><title type='text'>How to split the value from string using c# method</title><content type='html'>This is split the your string value using the special character



&lt;!-- HTML generated using dotnetcluster --&gt;&lt;div class=&quot;source-code&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; SplitString()
        {
     &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt; _BaseString=&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;RIVE-SENT-KUMA-XXX&amp;quot;&lt;/span&gt;
            &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;[] seperate_filelds = _BaseString.Split(&lt;span style=&quot;color: #a31515&quot;&gt;&amp;#39;-&amp;#39;&lt;/span&gt;);
            &lt;span style=&quot;color: #2b91af&quot;&gt;int&lt;/span&gt; counter = 0;
           &lt;span style=&quot;color: #008000&quot;&gt;// bool is_legit = false;&lt;/span&gt;

            &lt;span style=&quot;color: #0000ff&quot;&gt;foreach&lt;/span&gt; (&lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt; each_field &lt;span style=&quot;color: #0000ff&quot;&gt;in&lt;/span&gt; seperate_filelds)
            {
                counter++;
                &lt;span style=&quot;color: #008000&quot;&gt;// reading the first field which is prefix field&lt;/span&gt;
                &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (counter == 1)
                {
     &lt;span style=&quot;color: #008000&quot;&gt;//fristValue = &amp;quot;RIVE&amp;quot;;&lt;/span&gt;
                   &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt; fristValue = each_field  ;

                }
                &lt;span style=&quot;color: #0000ff&quot;&gt;else&lt;/span&gt; if (counter == 2)
                {
                    &lt;span style=&quot;color: #008000&quot;&gt;//secondValue = &amp;quot;SENT&amp;quot;;&lt;/span&gt;
                   &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt; secondValue = each_field  ;
                }
  &lt;span style=&quot;color: #0000ff&quot;&gt;else&lt;/span&gt; if (counter == 3)
                {
                    &lt;span style=&quot;color: #008000&quot;&gt;//thirdValue = &amp;quot;SENT&amp;quot;;&lt;/span&gt;
                   &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt; secondValue = each_field  ;
                }
  &lt;span style=&quot;color: #0000ff&quot;&gt;else&lt;/span&gt; if (counter == 4)
                {
                    &lt;span style=&quot;color: #008000&quot;&gt;//furthValue = &amp;quot;XXXX&amp;quot;;&lt;/span&gt;
                   &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt; furthValue = each_field  ;
                }
               &lt;span style=&quot;color: #0000ff&quot;&gt;else&lt;/span&gt;
                { &lt;span style=&quot;color: #0000ff&quot;&gt;break&lt;/span&gt;; }
            }
                     
        }
&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetcluster.blogspot.com/feeds/2404097499524819986/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5190158426865572469/2404097499524819986?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/2404097499524819986'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5190158426865572469/posts/default/2404097499524819986'/><link rel='alternate' type='text/html' href='http://dotnetcluster.blogspot.com/2013/11/how-to-split-value-from-string-using-c.html' title='How to split the value from string using c# method'/><author><name>senthil</name><uri>http://www.blogger.com/profile/10176497138272144692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6yBCA6dmqdTdFA_RrV5WNNw2i9OhFvBLEDOr4O6lKWMveXn2MZ7zeouIXHFLFeejDiGZeMYd__LMv2FIFLmLwxO2JdMRLJl7evXM2ptT788-ZI8iVZUySasEisKZIcgs/s220/senthil.jpg'/></author><thr:total>0</thr:total></entry></feed>