<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: programmatically refer to ink picture in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/76951.aspx</link><pubDate>Wed, 28 Mar 2012 23:19:02 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:76951</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/76951.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=76951</wfw:commentRss><description>&lt;p&gt;You bet, glad you have it working!&lt;/p&gt;</description></item><item><title>Re: programmatically refer to ink picture in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/76950.aspx</link><pubDate>Wed, 28 Mar 2012 23:09:10 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:76950</guid><dc:creator>Marlena</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/76950.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=76950</wfw:commentRss><description>&lt;p&gt;Sure, I get it now. Thanks again.&lt;/p&gt;</description></item><item><title>Re: programmatically refer to ink picture in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/76949.aspx</link><pubDate>Wed, 28 Mar 2012 22:49:58 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:76949</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/76949.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=76949</wfw:commentRss><description>&lt;p&gt;Here&amp;#39;s the issue - rows is at my:&lt;strong&gt;Images&lt;/strong&gt;, so you need relative XPath for the rest:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;nbsp;while (rows.MoveNext())&lt;br /&gt;{&lt;br /&gt;string s = rows.Current.SelectSingleNode(&lt;strong&gt;&amp;quot;my:InkImage&amp;quot;&lt;/strong&gt;, NamespaceManager).Value;&lt;br /&gt;Image drawnImage = Base64ToImage(s);&lt;br /&gt;Image resizedImage = ResizeImage(drawnImage, new Size(100, 100));&lt;br /&gt;s = ImageToBase64(resizedImage, System.Drawing.Imaging.ImageFormat.Png);&lt;br /&gt;DeleteNil(rows.Current.SelectSingleNode(&lt;strong&gt;&amp;quot;my:ShrunkenImage&amp;quot;&lt;/strong&gt;, NamespaceManager));&lt;br /&gt;rows.Current.SelectSingleNode(&lt;strong&gt;&amp;quot;my:ShrunkenImage&amp;quot;&lt;/strong&gt;, NamespaceManager).SetValue(s);&lt;br /&gt;}&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: programmatically refer to ink picture in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/76948.aspx</link><pubDate>Wed, 28 Mar 2012 22:30:22 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:76948</guid><dc:creator>Marlena</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/76948.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=76948</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void btnShrink_Clicked(object sender, ClickedEventArgs e)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XPathNavigator nav = CreateNavigator();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XPathNodeIterator rows = nav.Select(&amp;quot;/dfs:myFields/my:Detail/my:Images&amp;quot;, NamespaceManager);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (rows.MoveNext())&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string s = rows.Current.SelectSingleNode(&amp;quot;/dfs:myFields/my:Detail/my:Images/my:InkImage&amp;quot;, NamespaceManager).Value;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Image drawnImage = Base64ToImage(s);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Image resizedImage = ResizeImage(drawnImage, new Size(100, 100));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; s = ImageToBase64(resizedImage, System.Drawing.Imaging.ImageFormat.Png);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DeleteNil(rows.Current.SelectSingleNode(&amp;quot;/dfs:myFields/my:Detail/my:Images/my:ShrunkenImage&amp;quot;, NamespaceManager));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rows.Current.SelectSingleNode(&amp;quot;/dfs:myFields/my:Detail/my:Images/my:ShrunkenImage&amp;quot;, NamespaceManager).SetValue(s);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve changed my code like this and it goes thru my while loop twice but it still doesn&amp;#39;t display. The first row is ok, but the second one never displays the smaller image.&amp;nbsp; I get the xpath by clicking the control and going to the datasource and selecting Copy XPath. Do you see a problem? Thx for your help.&lt;/p&gt;</description></item><item><title>Re: programmatically refer to ink picture in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/76917.aspx</link><pubDate>Wed, 28 Mar 2012 00:45:58 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:76917</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/76917.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=76917</wfw:commentRss><description>&lt;p&gt;Let&amp;#39;s say my:Images is your repeating node - I figure that would be a good guess....&lt;/p&gt;
&lt;p&gt;You&amp;#39;d want to create an XPathNodeIterator pointing to your repeating my:Images, and then loop through them, using relative paths from there &amp;quot;my:InkImage&amp;quot;, &amp;quot;my:ShrunkenImage&amp;quot;, etc. &lt;a href="http://msdn.microsoft.com/en-us/library/system.xml.xpath.xpathnodeiterator.aspx"&gt;Here&amp;#39;s&lt;/a&gt; an MSDN page with a code sample that should get you started....&lt;/p&gt;</description></item><item><title>programmatically refer to ink picture in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/76916.aspx</link><pubDate>Tue, 27 Mar 2012 23:49:56 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:76916</guid><dc:creator>Marlena</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/76916.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=76916</wfw:commentRss><description>&lt;p&gt;In a repeating table, I&amp;nbsp;have an ink picture where the user draws. On a button click, I resize their drawing and display it in a picture control. When the user adds a 2nd ink picture, I can&amp;#39;t seem to get it to display the resized image. I don&amp;#39;t get an error but it doesn&amp;#39;t seem to do anything either. I&amp;#39;ve traced with the debugger and&amp;nbsp;it gets in here and executes everything. &amp;nbsp;Here&amp;#39;s my code:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string s = MainDataSource.CreateNavigator().SelectSingleNode(&amp;quot;/dfs:myFields/my:Detail/my:Images/my:InkImage&amp;quot;, NamespaceManager).Value;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Image drawnImage = Base64ToImage(s);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Image shrunkenImage=ResizeImage(drawnImage, new Size(100, 100));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; s = ImageToBase64(shrunkenImage, System.Drawing.Imaging.ImageFormat.Png);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DeleteNil(MainDataSource.CreateNavigator().SelectSingleNode(&amp;quot;/dfs:myFields/my:Detail/my:Images/my:ShrunkenImage&amp;quot;, NamespaceManager));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MainDataSource.CreateNavigator().SelectSingleNode(&amp;quot;/dfs:myFields/my:Detail/my:Images/my:ShrunkenImage&amp;quot;, NamespaceManager).SetValue(s);&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Is the XPath of the 2nd image different?&lt;/p&gt;</description></item></channel></rss>