<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : XAML button in ReportControl</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : XAML Snippets : XAML button in ReportControl]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 19:10:30 +0000</pubDate>
  <lastBuildDate>Fri, 22 Feb 2013 09:17:02 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=20596</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[XAML button in ReportControl : Yes, this is possible. First make...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=20596&amp;PID=69749&amp;title=xaml-button-in-reportcontrol#69749</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 20596<br /><strong>Posted:</strong> 22 February 2013 at 9:17am<br /><br />Yes, this is possible. First make sure that you are using the latest version of the ReportControl (15.3.1), as I believe there were bugs in earlier implementations that prevented this from working (although you are free to try with an older version, I may be mistaken).<br><br>Next you need to make call the ReportControl.MarkupContext.SetHandler method. The value you pass depends on your language. In VB6, you would call ReportControl1.MarkupContext.SetHandler Me, but other languages will be different (I can't help you if you aren't using VB6).<br><br>Next, you need to include the Click event in your button XAML (something like "&lt;Button Click='ClickButton'&gt;ButtonTest&lt;/Button&gt;")<br><br>Next, you need to create a Public method in your handler object that will accept the button click event from the reportcontrol. In VB6 the declaration would be Public Sub ClickButton(po_Sender As Object, po_Args As Object). Other languages will be different of course.<br><br>Then everything should work.&nbsp; Here's a VB6 sample that you can examine and possibly translate to the language of your choice:<br><br><table width="99%"><tr><td><pre class="BBcode"><br>Option Explicit<br><br>Private Sub Form_Load()<br>&nbsp;&nbsp; With Me.ReportControl1<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; With .Columns.Add(0, "Test", 100, True)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End With<br>&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .EnableMarkup = True<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .MarkupContext.SetHandler Me<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; With .Records.Add<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; With .AddItem("")<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Caption = "&lt;StackPanel&gt;&lt;Button Click='ClickButton' Margin='2' Cursor='Hand'&gt;&lt;TextBlock HorizontalAlignment='Center'&gt;Test&lt;/TextBlock&gt;&lt;/Button&gt;&lt;/StackPanel&gt;"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End With<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End With<br>&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Populate<br>&nbsp;&nbsp; End With<br>End Sub<br><br>Public Sub ClickButton(po_Sender As Object, po_Args As Object)<br>&nbsp;&nbsp; MsgBox "Button Clicked!"<br>End Sub<br></pre></td></tr></table><br><br><b>NOTE: </b>This sub-forum is typically used for XAML snippets - e.g. samples, ideas, experiments, etc... If you post to the ReportControl forum (ActiveX or MFC depending on your library type), you will likely see a quicker response to your questions.<br>]]>
   </description>
   <pubDate>Fri, 22 Feb 2013 09:17:02 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=20596&amp;PID=69749&amp;title=xaml-button-in-reportcontrol#69749</guid>
  </item> 
  <item>
   <title><![CDATA[XAML button in ReportControl : I&amp;#039;d like to use XAML to add...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=20596&amp;PID=69677&amp;title=xaml-button-in-reportcontrol#69677</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5025">Pidi</a><br /><strong>Subject:</strong> 20596<br /><strong>Posted:</strong> 06 February 2013 at 3:46pm<br /><br />I'd like to use XAML to add a button to my ReportControl.<br /><br />I tried something like this:<br /><br /><table width="99%"><tr><td><pre class="BBcode"><br />'&lt;StackPanel&gt;' + ;<br />'&lt;Button Margin="2" Cursor="Hand"&gt;' + ;<br />'&lt;TextBlock HorizontalAlignment="Center"&gt;' + sString + '&lt;/TextBlock&gt;' + ;<br />'&lt;/Button&gt;'  + ;<br />'&lt;/StackPanel&gt;'<br /></pre></td></tr></table><br /><br />This works fine, however, it doesn't "function" as a button. When clicked upon, it doesn't press down.<br /><br />Is it possible what I want?<br />]]>
   </description>
   <pubDate>Wed, 06 Feb 2013 15:46:24 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=20596&amp;PID=69677&amp;title=xaml-button-in-reportcontrol#69677</guid>
  </item> 
 </channel>
</rss>