<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Soaked in CIDER !</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/subhagpo/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/subhagpo/feed.xml</link>
    <description>Subhag Oak, 
SDE, Cider.</description>
    <lastBuildDate>Wed, 17 Apr 2019 03:27:13 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Visit Cider blog for updates from WPF/SL Designer team ....</title>
      <link>https://docs.microsoft.com/archive/blogs/subhagpo/visit-cider-blog-for-updates-from-wpfsl-designer-team</link>
      <pubDate>Mon, 03 May 2010 20:58:00 GMT</pubDate>
      <dc:creator><![CDATA[subhagpo]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/subhagpo/2010/05/03/visit-cider-blog-for-updates-from-wpfsl-designer-team/</guid>
      <description><![CDATA[Here is all the information you need: https://blogs.msdn.com/wpfsldesigner/default.aspx&nbsp;]]></description>
      <content:encoded><![CDATA[<P>Here is all the information you need: <A href="https://blogs.msdn.com/wpfsldesigner/default.aspx">https://blogs.msdn.com/wpfsldesigner/default.aspx</A>&nbsp;</P>]]></content:encoded>
    </item>
    <item>
      <title>Performance boosts in CIDER for RC release ....</title>
      <link>https://docs.microsoft.com/archive/blogs/subhagpo/performance-boosts-in-cider-for-rc-release</link>
      <pubDate>Fri, 08 Jan 2010 15:31:00 GMT</pubDate>
      <dc:creator><![CDATA[subhagpo]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/subhagpo/2010/01/08/performance-boosts-in-cider-for-rc-release/</guid>
      <description><![CDATA[BrianPe (the Architect) of Cider has an all-informative post about the perf work we (read he) have...]]></description>
      <content:encoded><![CDATA[<P>BrianPe (the Architect) of Cider has an all-informative post about the perf work we (read he) have been doing for the RC release of DEV10. Worth a read, it really makes me feel proud and happy to be a part of Cider team (and devdiv) and you can read it at <A href="https://www.pocketsilicon.com/post/Cider-Performance-for-VS2010.aspx">https://www.pocketsilicon.com/post/Cider-Performance-for-VS2010.aspx</A></P>
<P>Yes, performance matters a whole lot to us! </P>]]></content:encoded>
    </item>
    <item>
      <title>Whats coming in VS 2010 - WPFDesigner.</title>
      <link>https://docs.microsoft.com/archive/blogs/subhagpo/whats-coming-in-vs-2010-wpfdesigner</link>
      <pubDate>Thu, 07 May 2009 23:37:00 GMT</pubDate>
      <dc:creator><![CDATA[subhagpo]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/subhagpo/2009/05/07/whats-coming-in-vs-2010-wpfdesigner/</guid>
      <description><![CDATA[Mark Wilson-Thomas (PM on Cider team) gives a sneak-preview of whats coming in VS 2010 :...]]></description>
      <content:encoded><![CDATA[<P>Mark Wilson-Thomas (PM on Cider team) gives a sneak-preview of whats coming in VS 2010 : <A href="https://channel9.msdn.com/shows/The+Knowledge+Chamber/Mark-Wilson-Thomas-WPF-and-Silverlight-Development-in-Visual-Studio-2010/">https://channel9.msdn.com/shows/The+Knowledge+Chamber/Mark-Wilson-Thomas-WPF-and-Silverlight-Development-in-Visual-Studio-2010/</A></P>
<P>- Enjoy!</P>]]></content:encoded>
    </item>
    <item>
      <title>XAML PowerToys for VisualStudio!</title>
      <link>https://docs.microsoft.com/archive/blogs/subhagpo/xaml-powertoys-for-visualstudio</link>
      <pubDate>Mon, 29 Dec 2008 00:39:00 GMT</pubDate>
      <dc:creator><![CDATA[subhagpo]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/subhagpo/2008/12/29/xaml-powertoys-for-visualstudio/</guid>
      <description><![CDATA[Karl (our newest PM on the team) presented cool power tool that enable developers to quickly layout...]]></description>
      <content:encoded><![CDATA[<H5><SPAN style="FONT-SIZE: 24pt"><FONT face=Calibri><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 14pt; COLOR: windowtext; mso-bidi-font-family: Arial; mso-fareast-font-family: 'Times New Roman'; mso-bidi-language: AR-SA; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">Karl (our newest PM on the team) presented cool power tool that enable developers to quickly layout and maintain Line of Business Application forms using the UI controls that ship with Visual Studio. </SPAN></B></FONT></SPAN></H5>
<H5><SPAN style="FONT-SIZE: 24pt"><FONT face=Calibri><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 14pt; COLOR: windowtext; mso-bidi-font-family: Arial; mso-fareast-font-family: 'Times New Roman'; mso-bidi-language: AR-SA; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">More here : </SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 14pt; COLOR: windowtext; mso-bidi-font-family: Arial; mso-fareast-font-family: 'Times New Roman'; mso-bidi-language: AR-SA; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"><A href="https://karlshifflett.wordpress.com/xaml-power-toys/" mce_href="https://karlshifflett.wordpress.com/xaml-power-toys/"><SPAN style="COLOR: blue">https://karlshifflett.wordpress.com/xaml-power-toys/</SPAN></A></SPAN></B></H5></FONT></SPAN>]]></content:encoded>
    </item>
    <item>
      <title>PDC unleashed ...</title>
      <link>https://docs.microsoft.com/archive/blogs/subhagpo/pdc-unleashed</link>
      <pubDate>Tue, 04 Nov 2008 12:17:00 GMT</pubDate>
      <dc:creator><![CDATA[subhagpo]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/subhagpo/2008/11/04/pdc-unleashed/</guid>
      <description><![CDATA[When you have a chance watch the great stuff that was showcased at PDC here]]></description>
      <content:encoded><![CDATA[When you have a chance watch the great stuff that was showcased at PDC <A class="" href="https://www.microsoftpdc.com/" target=_blank mce_href="https://www.microsoftpdc.com/">here</A>]]></content:encoded>
    </item>
    <item>
      <title>Everything about SilverLight ....</title>
      <link>https://docs.microsoft.com/archive/blogs/subhagpo/everything-about-silverlight</link>
      <pubDate>Mon, 03 Nov 2008 19:30:00 GMT</pubDate>
      <dc:creator><![CDATA[subhagpo]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/subhagpo/2008/11/03/everything-about-silverlight/</guid>
      <description><![CDATA[Get started ... https://silverlight.net/GetStarted/&nbsp;]]></description>
      <content:encoded><![CDATA[Get started ... <A href="https://silverlight.net/GetStarted/">https://silverlight.net/GetStarted/</A>&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>WPF and VS updates at PDC 2008</title>
      <link>https://docs.microsoft.com/archive/blogs/subhagpo/wpf-and-vs-updates-at-pdc-2008</link>
      <pubDate>Mon, 03 Nov 2008 19:20:00 GMT</pubDate>
      <dc:creator><![CDATA[subhagpo]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/subhagpo/2008/11/03/wpf-and-vs-updates-at-pdc-2008/</guid>
      <description><![CDATA[Here's a great post by Tim Sneath that talks about new features in WPF and VS-shell. :...]]></description>
      <content:encoded><![CDATA[<P>Here's a great post by Tim Sneath that talks about new features in WPF and VS-shell. : <A href="https://blogs.msdn.com/tims/archive/2008/11/03/wpf-developers-pdc-wrap-up-and-visual-studio-tooling-update.aspx">https://blogs.msdn.com/tims/archive/2008/11/03/wpf-developers-pdc-wrap-up-and-visual-studio-tooling-update.aspx</A></P>
<P mce_keep="true">&nbsp;</P>]]></content:encoded>
    </item>
    <item>
      <title>first blog for cider !</title>
      <link>https://docs.microsoft.com/archive/blogs/subhagpo/first-blog-for-cider</link>
      <pubDate>Mon, 24 Apr 2006 00:40:00 GMT</pubDate>
      <dc:creator><![CDATA[subhagpo]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/subhagpo/2006/04/24/first-blog-for-cider/</guid>
      <description><![CDATA[This is my first blog since I have changed teams last year. Wow, its almost 5 months since I am in...]]></description>
      <content:encoded><![CDATA[<P><FONT face=Tahoma size=2>This is my first blog since I have changed teams last year. Wow, its almost 5 months since I am in this new team and there are no excuses for not blogging. </FONT></P>
<P><FONT face=Tahoma size=2>I have decided to actively start blogging about this very cool technology that I am working on which is called Cider. I know you will ask "Cider.. what is that?". </FONT><A href="https://www.urbanpotato.net/"><FONT face=Tahoma size=2>BrianPe </FONT></A><FONT face=Tahoma size=2>has already explained it </FONT><A href="https://www.urbanpotato.net/Default.aspx/document/2208"><FONT face=Tahoma size=2>here</FONT></A><FONT face=Tahoma size=2>. We are building a designer for </FONT><A href="https://msdn.microsoft.com/winfx/reference/presentation/default.aspx"><FONT face=Tahoma size=2>WPF</FONT></A><FONT face=Tahoma size=2>&nbsp;technology thats going to ship with Visual Studio. </FONT></P>
<P><FONT face=Tahoma size=2>We have adopted the new agile process of developement and have already shipped&nbsp;some CTPS (the most recent&nbsp;was the&nbsp;</FONT><A href="https://msdn.microsoft.com/windowsvista/downloads/getthebeta/default.aspx"><FONT face=Tahoma size=2>Feb CTP</FONT></A><FONT face=Tahoma size=2>).</FONT></P>
<P><FONT face=Tahoma size=2>Instead of starting the first post with the customarty "Hello world" application, I will just provide some links to the blogs of my team members (who are active bloggers than myself)</FONT></P>
<P><FONT face=Tahoma size=2>BrianPe: </FONT><A href="https://www.urbanpotato.net/Default.aspx/document/970"><FONT face=Tahoma size=2>https://www.urbanpotato.net/Default.aspx/document/970</FONT></A></P>
<P><FONT face=Tahoma size=2>ChuckJ: </FONT><A href="https://www.removingalldoubt.com/"><FONT face=Tahoma size=2>https://www.removingalldoubt.com/</FONT></A></P>
<P><FONT face=Tahoma size=2>Jfosler: </FONT><A href="/jfoscoding/archive/category/11634.aspx"><FONT face=Tahoma size=2>https://blogs.msdn.com/jfoscoding/archive/category/11634.aspx</FONT></A></P>
<P><FONT face=Tahoma size=2>RBailey: </FONT><A href="/richard_bailey/"><FONT face=Tahoma size=2>https://blogs.msdn.com/richard_bailey/</FONT></A></P>
<P><FONT face=Verdana></FONT>&nbsp;</P>]]></content:encoded>
    </item>
    <item>
      <title>What's new in Whidbey? : Part 1 - ClipBoard Improvements.</title>
      <link>https://docs.microsoft.com/archive/blogs/subhagpo/whats-new-in-whidbey-part-1-clipboard-improvements</link>
      <pubDate>Wed, 31 Aug 2005 15:03:00 GMT</pubDate>
      <dc:creator><![CDATA[subhagpo]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/subhagpo/2005/08/31/whats-new-in-whidbey-part-1-clipboard-improvements/</guid>
      <description><![CDATA[&nbsp;&nbsp;&nbsp;There are lots of new things in the Whidbey release for Windows...]]></description>
      <content:encoded><![CDATA[<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma">&nbsp;&nbsp;&nbsp;There are lots of new things in the Whidbey release for Windows Forms.&nbsp;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"></SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma">&nbsp;&nbsp;&nbsp;There are a bunch of new controls and components like StripControls (ToolStrip, MenuStrip, ContextMenuStrip, StatusStrip), DataGridView, SplitContainer, WebBrowser. We have also added some richness to existing controls and components. For example we have exposed the scrollbars on scrollablecontrol as properties, added a bunch of new properties to the treeview and the tooltip, provided auto complete feature on the combo-box and the text-box and added list-view virtualization.</SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma">&nbsp;&nbsp;&nbsp;In the designer space we have exposed a framework to build simple light weight designers that automagically uses the new&nbsp;serialization code, snaplines and other designer features. We have added snap-lines and a new mechanism to show the properties that are commonly used which&nbsp;we call&nbsp;the smart-tags extension. We have also enabled <A href="/rprabhu/archive/category/6591.aspx">configuration settings management </A>and provided extensible interfaces for the users to plug-in their own configuration settings.<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"><o:p>&nbsp;</o:p></SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma">&nbsp;&nbsp;&nbsp;In order to explain some of the new features in Whidbey, I have decided to take one feature at a time and explain how it works and how it can be used. I will also try to explain how it is different (and easy) to use the same feature in Whidbey as compared to </SPAN><?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /><st1:City><st1:place><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma">Everett</SPAN></st1:place></st1:City><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"> (if applicable). So let’s get started...<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"><STRONG></STRONG></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"><STRONG><A href="https://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformsclipboardclasstopic.asp">ClipBoard</A></STRONG>:<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma">&nbsp;&nbsp;&nbsp;ClipBoard is an existing class from </SPAN><st1:City><st1:place><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma">Everett</SPAN></st1:place></st1:City><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"> which can be found in System.Windows.Forms namespace. The basic functionality of this class is to allow user to set data into the clipboard and retrieve it. This is how the class looked in </SPAN><st1:City><st1:place><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma">Everett</SPAN></st1:place></st1:City><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Lucida Console'">public sealed class </SPAN><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Lucida Console'">System.Windows.Forms.Clipboard :<BR><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">object</SPAN><BR>{<BR><BR><I><SPAN style="COLOR: green"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>// Constructors<BR></SPAN></I><BR><I><SPAN style="COLOR: green"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>// Methods<BR></SPAN></I><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public virtual bool</SPAN> Equals(<SPAN style="COLOR: blue">object</SPAN> obj);<BR><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public static </SPAN>System.Windows.Forms.IDataObject GetDataObject();<BR><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public virtual int</SPAN> GetHashCode();<BR><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public </SPAN>Type GetType();<BR><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public static void</SPAN> SetDataObject(<SPAN style="COLOR: blue">object</SPAN> data);<BR><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public static void</SPAN> SetDataObject(<SPAN style="COLOR: blue">object</SPAN> data, <SPAN style="COLOR: blue">bool</SPAN> copy);<BR><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public virtual string</SPAN> ToString();<BR>} <I><SPAN style="COLOR: green">// end of System.Windows.Forms.Clipboard</SPAN></I></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma">&nbsp;&nbsp;&nbsp;The user can use the SetDataObject to place the data on the clipboard. The bool “copy” denotes if the data should remain on the clipboard after the application exits.<o:p></o:p></SPAN></P><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-ansi-language: EN-US; mso-bidi-language: AR-SA"></SPAN>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma">Consider a form with a picture box and a button. The following code would place the image of the picture box on the clipboard.<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">private</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"> <SPAN style="COLOR: blue">void</SPAN> button1_Click(<SPAN style="COLOR: blue">object</SPAN> sender, System.EventArgs e) <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'">// Takes the image and puts it on the clipboard.<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">if</SPAN>(<SPAN style="COLOR: blue">this</SPAN>.pictureBox1.Image != <SPAN style="COLOR: blue">null</SPAN>)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Clipboard.SetDataObject(<SPAN style="COLOR: blue">this</SPAN>.pictureBox1.Image, <SPAN style="COLOR: blue">true</SPAN>);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma">&nbsp;&nbsp;&nbsp;Now consider another application which has a panel and a button. Now you can set the background image of the panel to the image of the picture box that was copied to the clipboard earlier using the following code.<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">private</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"> <SPAN style="COLOR: blue">void</SPAN> button2_Click(<SPAN style="COLOR: blue">object</SPAN> sender, System.EventArgs e)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'">// Declares an IDataObject to hold the data returned from the<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>// clipboard.<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// Retrieves the data from the clipboard.<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>IDataObject iData = Clipboard.GetDataObject();<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// Determines whether the data is in a format you can use.<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">if</SPAN>(iData.GetDataPresent(DataFormats.Bitmap)) <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// Yes it is, so display it.<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 1in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">this</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">.panel1.BackgroundImage = (Bitmap)iData.GetData(DataFormats.Bitmap); <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">else</SPAN> <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// No it is not.<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">this</SPAN>.Text = "Could not retrieve data off the clipboard.";<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma">&nbsp;&nbsp;&nbsp;In Whidbey the ClipBoard class looks as follows:<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><I><SPAN style="FONT-SIZE: 8pt; COLOR: green; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Lucida Console'"><o:p>&nbsp;</o:p></SPAN></I></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Lucida Console'">public sealed class </SPAN><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Lucida Console'">System.Windows.Forms.Clipboard :<BR><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">object</SPAN><BR>{<BR><BR><I><SPAN style="COLOR: green"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>// Constructors<BR></SPAN></I><BR><I><SPAN style="COLOR: green"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>// Methods<BR></SPAN></I><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public static void</SPAN> Clear();<BR><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public static bool</SPAN> ContainsAudio();<BR><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public static bool</SPAN> ContainsData(<SPAN style="COLOR: blue">string</SPAN> format);<BR><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public static bool</SPAN> ContainsFileDropList();<BR><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public static bool</SPAN> ContainsImage();<BR><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public static bool</SPAN> ContainsText();<BR><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public static bool</SPAN> ContainsText(System.Windows.Forms.TextDataFormat format);<BR><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public virtual bool</SPAN> Equals(<SPAN style="COLOR: blue">object</SPAN> obj);<BR><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public static </SPAN>System.IO.Stream GetAudioStream();<BR><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public static object</SPAN> GetData(<SPAN style="COLOR: blue">string</SPAN> format);<BR><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public static </SPAN>System.Windows.Forms.IDataObject GetDataObject();<BR><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public static </SPAN>System.Collections.Specialized.StringCollection GetFileDropList();<BR><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public virtual int</SPAN> GetHashCode();<BR><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public static </SPAN>System.Drawing.Image GetImage();<BR><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public static string</SPAN> GetText();<BR><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public static string</SPAN> GetText(System.Windows.Forms.TextDataFormat format);<BR><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public </SPAN>Type GetType();<BR><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public static void</SPAN> SetAudio(<SPAN style="COLOR: blue">byte</SPAN>[] audioBytes);<BR><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public static void</SPAN> SetAudio(System.IO.Stream audioStream);<BR><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public static void</SPAN> SetData(<SPAN style="COLOR: blue">string</SPAN> format, <SPAN style="COLOR: blue">object</SPAN> data);<BR><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public static void</SPAN> SetDataObject(<SPAN style="COLOR: blue">object</SPAN> data);<BR><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public static void</SPAN> SetDataObject(<SPAN style="COLOR: blue">object</SPAN> data, <SPAN style="COLOR: blue">bool</SPAN> copy);<BR><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public static void</SPAN> SetDataObject(<SPAN style="COLOR: blue">object</SPAN> data, <SPAN style="COLOR: blue">bool</SPAN> copy, <SPAN style="COLOR: blue">int</SPAN> retryTimes, <SPAN style="COLOR: blue">int</SPAN> retryDelay);<BR><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public static void</SPAN> SetFileDropList(System.Collections.Specialized.StringCollection filePaths);<BR><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public static void</SPAN> SetImage(System.Drawing.Image image);<BR><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public static void</SPAN> SetText(<SPAN style="COLOR: blue">string</SPAN> text);<BR><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public static void</SPAN> SetText(<SPAN style="COLOR: blue">string</SPAN> text, System.Windows.Forms.TextDataFormat format);<BR><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public virtual string</SPAN> ToString();<BR>} <I><SPAN style="COLOR: green">// end of System.Windows.Forms.Clipboard</SPAN></I></SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma">&nbsp;&nbsp;&nbsp;A bunch of static helper functions have been added to the ClipBoard class that would wrap the data in the DataObject and pass it onto the clipboard in the correct format. The ContainsXXX methods can be used by the user to query the current contents of the clipboard without actually getting the IDataObject from the clipboard and calling GetDataPresent on it.&nbsp;</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma">The helper functions are provided on commonly used DataFormats but users can still use the old SetDataObject and GetDataObject for custom formats.</SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma">&nbsp;&nbsp;&nbsp;In Whidbey, you can programmatically clear the clipboard calling the Clear method. This removes all the contents of the clipboard and can be helpful if you want to purge the contents of the clipboard periodically.<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma">&nbsp;&nbsp;&nbsp;Coming to the same example that we discussed above, the same code in Whidbey would look like the following:<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">private</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"> <SPAN style="COLOR: blue">void</SPAN> button1_Click(<SPAN style="COLOR: blue">object</SPAN> sender, <SPAN style="COLOR: teal">EventArgs</SPAN> e)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 30pt; mso-layout-grid-align: none; mso-pagination: none"><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'">// Set the image (this will throw an exception if image passed in // is null)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: teal">Clipboard</SPAN>.SetImage(<SPAN style="COLOR: blue">this</SPAN>.pictureBox1.Image);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">private</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"> <SPAN style="COLOR: blue">void</SPAN> button2_Click(<SPAN style="COLOR: blue">object</SPAN> sender, <SPAN style="COLOR: teal">EventArgs</SPAN> e)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// Check if ClipBoard has image...<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">if</SPAN> (<SPAN style="COLOR: teal">Clipboard</SPAN>.ContainsImage())<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// if so, set the image to the background image of the panel<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">this</SPAN>.panel1.BackgroundImage = <SPAN style="COLOR: teal">Clipboard</SPAN>.GetImage();<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">else<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">this</SPAN>.Text = <SPAN style="COLOR: maroon">"No Image in ClipBoard"</SPAN>;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma">&nbsp;&nbsp;&nbsp;As you can see the code here is greatly reduced as compared to </SPAN><st1:City><st1:place><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma">Everett</SPAN></st1:place></st1:City><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"> and most of the work is done by the clipboard class. The user just needs to call the proper helper functions. <o:p></o:p></SPAN></P><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-ansi-language: EN-US; mso-bidi-language: AR-SA"><BR style="PAGE-BREAK-BEFORE: always; mso-special-character: line-break" clear=all></SPAN>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"><STRONG>Whidbey security restrictions using ClipBoard</STRONG></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma">&nbsp;&nbsp;&nbsp;Clipboard works for application running under STA apartment thread only. More information about STA and MTA thread can be found <A href="https://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemthreadingapartmentstateclasstopic.asp">here</A>.&nbsp;In full-trust the clipboard allows to set and get any data. In partial trust (Internet zone)&nbsp;data only in the following four formats&nbsp;can be set into the clipboard:<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in; mso-layout-grid-align: none; mso-pagination: none"><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"><SPAN style="mso-spacerun: yes">&nbsp;</SPAN>Formats allowed: Text, UnicodeText, System.String and CSV.<o:p></o:p></SPAN></B></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma">All other formats are restricted in partial trust. </SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma">Coming up next is <STRONG><FONT style="BACKGROUND-COLOR: #f5f5dc" color=#0000ff><EM>TreeView</EM></FONT></STRONG>... so stay tuned.</SPAN></P>]]></content:encoded>
    </item>
    <item>
      <title>How can I drop controls within UserControl at Design time?</title>
      <link>https://docs.microsoft.com/archive/blogs/subhagpo/how-can-i-drop-controls-within-usercontrol-at-design-time</link>
      <pubDate>Mon, 21 Mar 2005 12:16:00 GMT</pubDate>
      <dc:creator><![CDATA[subhagpo]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/subhagpo/2005/03/21/how-can-i-drop-controls-within-usercontrol-at-design-time/</guid>
      <description><![CDATA[One of the most frequent questions asked on the community forum is how can I make my userControl act...]]></description>
      <content:encoded><![CDATA[<p><font face="Arial">One of the most frequent questions asked on the community forum is how can I make my userControl act as a containerControl (panel) which allows me to add controls at design time. In V1.0 and V1.1 you had to write a lot if code to do this, but in Whidbey we have added a new concept of NestedContainers which would allow the users to accomplish this using a single method on the ControlDesigners. </font></p> <p><font face="Arial">Let me explain how you can expose the userControl as "container" at design time.</font></p> <p><font face="Arial">You may ask&nbsp;why doesnt it work by default? </font></p> <p><font face="Arial">What you’re seeing is our default encapsulation model for user controls.&nbsp; By default, a user control is treated as a single object when placed on a form.&nbsp; We do this because it may not be your intent to expose the inner layout of your user control (for example, the PropertyGrid control contains several panels, buttons, scroll bars, etc, but it is treated as a single control). So there are cases when you want the userControl to be a single composite control and hence not support it as container at design time. This still remains the default case in whidbey too.</font></p> <p><font face="Arial">What should I do to make the control act as container at Design time?</font></p> <p><font face="Arial">This is easy to do.&nbsp; You need to change the designer on your user control:</font></p> <p><font face="Arial"><font size="2"><font color="#0000ff">[Designer(typeof(ParentControlDesigner))]</font></font></font></p> <p><font face="Arial" color="#0000ff" size="2">public class MyUserControl : UserControl {}</font></p> <p><font face="Arial">Once you do this, the user control can be edited on the form designer’s surface.If you want a region of “content” on your user control to be interactive at design time…</font></p> <p><font face="Arial">This is the more likely case – you have a control with some child controls on it, but one (or more) of the child controls needs to be a content area where the user can drop additional controls.&nbsp; Within this content area you want the user to be able to select, drag, drop and otherwise manipulate controls, but outside of the area you want the user control to be treated as a single entity. In whidbey, you need to do two things: </font></p> <p><font face="Arial">1) &nbsp;Add a public read-only property to your user control that exposes the child content control. Write a simple designer that enables the content control to be designed.&nbsp;<br /></font></p> <p><font face="Arial" color="#0000ff" size="2">[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]</font></p> <p><font face="Arial" color="#0000ff" size="2">public Panel MyChildPanel { get { return _myChildPanel; } }</font></p> <p><font face="Arial">The attribute on the property tells the code generator to write out code for the value contained in this property (normally, read-only properties are skipped).</font></p> <p><font face="Arial">2) Use EnableDesignMode method to plug in the designer for panel.</font></p> <p><font face="Arial" color="#0000ff" size="2">[Designer(typeof(MyUserControlDesigner))]</font></p> <p><font face="Arial" color="#0000ff" size="2">public class MyUserControl : UserControl {</font></p> <p><font face="Arial" color="#0000ff" size="2">}</font></p> <p><font face="Arial" color="#0000ff" size="2">class MyUserControlDesigner : ControlDesigner {</font></p> <p><font face="Arial" color="#0000ff" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public override void Initialize(IComponent comp) {</font></p> <p><font face="Arial" color="#0000ff" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;base.Initialize(comp);</font></p> <p><font face="Arial" color="#0000ff" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MyUserControl uc = (MyUserControl)comp;</font></p> <p><font face="Arial" color="#0000ff" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EnableDesignMode(uc.MyChildPanel, “MyChildPanel”);</font></p> <p><font face="Arial" color="#0000ff" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</font></p> <p><font face="Arial" color="#0000ff" size="2">}</font></p> <p><font face="Arial">Here I’ve created a designer (which can…and should be an internal class unless you specifically design for extensibility).&nbsp; In the initialize code for the designer I’ve called EnableDesignMode, passing the panel I want to enable (MyChildPanel), and a text name that will be shown to the user when the panel is selected (“MyChildPanel”).&nbsp; </font></p> <p><font face="Arial">Once you do this, the panel will work in the designer.&nbsp; If you click on it, it will be selected and you can set properties on it in the property window.&nbsp; The name for the selected panel will be a mix of the control’s name and the name you provided.&nbsp; For a control named myUserControl1, the panel’s name in the grid will show up as “myUserControl1.MyChildPanel”.</font></p> <p><font face="Arial">I will discuss the basics of EnableDesignMode in a separate blog entry. </font></p> <p>&nbsp;</p>]]></content:encoded>
    </item>
  </channel>
</rss>