<?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 : Document Interface UserControl</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : MarkupLabel Control : Document Interface UserControl]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 15 Apr 2026 08:38:48 +0000</pubDate>
  <lastBuildDate>Fri, 01 Nov 2013 03:36:21 +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=19812</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[Document Interface UserControl : Thank you  ]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=19812&amp;PID=71766&amp;title=document-interface-usercontrol#71766</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1298">cliv</a><br /><strong>Subject:</strong> 19812<br /><strong>Posted:</strong> 01 November 2013 at 3:36am<br /><br /><div>Thank you</div>]]>
   </description>
   <pubDate>Fri, 01 Nov 2013 03:36:21 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=19812&amp;PID=71766&amp;title=document-interface-usercontrol#71766</guid>
  </item> 
  <item>
   <title><![CDATA[Document Interface UserControl :                Hi,I...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=19812&amp;PID=68346&amp;title=document-interface-usercontrol#68346</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2960">Xander75</a><br /><strong>Subject:</strong> 19812<br /><strong>Posted:</strong> 25 May 2012 at 4:00am<br /><br />Hi,<br><br>I have been playing about with the MarkupLabel and find it can be very useful to create my own controls or interfaces. However it is lacking in some key areas and can be quite annoying to find that xaml code that works correctly doesn't work in this MarkupLabel control.<br><br>I have created a Document style UserControl interface that displays as a page with a dropshadow (<i>similar to MS Word</i>), the following two methods work perfectly in XamlPad:<br><table width="99%"><tr><td><pre class="BBcode">&lt;Page xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xmlns:sys='clr-namespace:System;assembly=mscorlib' <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml' &gt;<br><br>&nbsp;&nbsp;&nbsp; &lt;Grid Height='200' Margin='-2,-2,-6,-6' Width='500'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Rectangle Stroke='Black' Margin='6' RadiusX='0' RadiusY='0' /&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Rectangle Stroke='Black' Margin='5' RadiusX='1' RadiusY='1' Opacity='0.25'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Rectangle Stroke='Black' Margin='4' RadiusX='2' RadiusY='2' Opacity='0.2'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Rectangle Stroke='Black' Margin='3' RadiusX='3' RadiusY='3' Opacity='0.15'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Rectangle Stroke='Black' Margin='2' RadiusX='4' RadiusY='4' Opacity='0.1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Rectangle Stroke='Black' Margin='1' RadiusX='5' RadiusY='5' Opacity='0.05'/&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/Grid&gt;<br><br>&lt;/Page&gt;<br><br>or <br><br>&lt;Page xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xmlns:sys='clr-namespace:System;assembly=mscorlib' <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml' &gt;<br><br>&nbsp;&nbsp;&nbsp; &lt;Border BorderBrush='#000000' BorderThickness='1' Margin='10'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Border.Effect&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;DropShadowEffect Color='Black' Direction='270' BlurRadius='20' ShadowDepth='2' /&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/Border.Effect&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Grid Background='White' /&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/Border&gt;<br><br>&lt;/Page&gt;<br></pre></td></tr></table><br><img src="uploads/2960/XamlPad.png" border="0" /><br><br>However because the CJ Markup doesn't support Border.Effect, DropShadowEffect and Opacity I have had to change this to:<br><table width="99%"><tr><td><pre class="BBcode">&lt;Grid Height='200' Width='1000'&gt;<br>&nbsp;&nbsp;&nbsp; &lt;Rectangle Fill='#FFFFFF' Stroke='Black' Margin='5' RadiusX='0' RadiusY='0'/&gt;<br>&nbsp;&nbsp;&nbsp; &lt;Rectangle Stroke='#AFAFAF' Margin='4' RadiusX='1' RadiusY='1'/&gt;<br>&nbsp;&nbsp;&nbsp; &lt;Rectangle Stroke='#BFBFBF' Margin='3' RadiusX='2' RadiusY='2'/&gt;<br>&nbsp;&nbsp;&nbsp; &lt;Rectangle Stroke='#CFCFCF' Margin='2' RadiusX='3' RadiusY='3'/&gt;<br>&nbsp;&nbsp;&nbsp; &lt;Rectangle Stroke='#DFDFDF' Margin='1' RadiusX='4' RadiusY='4'/&gt;<br>&nbsp;&nbsp;&nbsp; &lt;Rectangle Stroke='#EFEFEF' Margin='0' RadiusX='5' RadiusY='5'/&gt;<br>&lt;/Grid&gt; <br></pre></td></tr></table><br>This gives the same kind of effect, but the Border.Effect, DropShadowEffect and Opacity properties would be better as this would add transparency to the dropshadow.<br><br>Will CJ be adding support for this in the future as well as many others?<br><br>Below is the VB6 UserControl code for creating the Document style interface, just add a MarkupLabel control to the UserControl and paste the following code:<br><table width="99%"><tr><td><pre class="BBcode"><font color="#000099">Option Explicit</font><br><br><font color="#000099">Private Sub</font> CreateMarkupDocument()<br>&nbsp;&nbsp;&nbsp; <font color="#000099">Dim </font>ctx <font color="#000099">As </font>MarkupContext, doc <font color="#000099">As </font>MarkupGrid, docShadow <font color="#000099">As </font>MarkupRectangle<br>&nbsp;&nbsp;&nbsp; <font color="#000099">Dim </font>i <font color="#000099">As Long</font>, m <font color="#000099">As </font><font color="#000099">Long</font>, r <font color="#000099">As </font><font color="#000099">Long</font>, ShadowColor <font color="#000099">As </font>OLE_COLOR<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; <font color="#000099">Set </font>ctx = UserControl.MarkupLabel.MarkupContext<br>&nbsp;&nbsp;&nbsp; <font color="#000099">With </font>ctx<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#000099">Set </font>doc = .CreateObject("Grid")<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#000099">With </font>doc<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#000099">For </font>i = 0 <font color="#000099">To </font>5<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#000099">Select Case</font> i<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#000099">Case</font> 0: m = 4: r = 10: ShadowColor = &amp;H9F9F9F<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#000099">Case</font> 1: m = 3: r = 11: ShadowColor = &amp;HAFAFAF<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#000099">Case</font> 2: m = 2: r = 12: ShadowColor = &amp;HBFBFBF<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#000099">Case</font> 3: m = 1: r = 13: ShadowColor = &amp;HC6C6C6<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#000099">Case</font> 4: m = 0: r = 14: ShadowColor = &amp;HCFCFCF<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#000099">Case</font> 5: m = 5: r = 0: ShadowColor = &amp;H0&amp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#000099">End Select</font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#000099">Set </font>docShadow = ctx.CreateObject("Rectangle")<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#000099">With </font>docShadow<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#000099">If </font>i = 0 <font color="#000099">Then Set </font>.Fill = ctx.CreateSolidBrush(&amp;HFFFFFF)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#000099">Set </font>.Margin = ctx.CreateThickness(m, m, m, m)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#000099">Set </font>.Stroke = ctx.CreateSolidBrush(ShadowColor)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .RadiusX = r<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .RadiusY = r<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#000099">End </font><font color="#000099">With </font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; doc.Children.Add docShadow<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#000099">Next</font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#000099">End </font><font color="#000099">With </font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; <font color="#000099">End </font><font color="#000099">With </font><br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; <font color="#000099">Set </font>UserControl.MarkupLabel.MarkupUIElement = doc<br><font color="#000099">End Sub</font><br><br><font color="#000099">Private </font><font color="#000099">Sub </font>UserControl_Initialize()<br>&nbsp;&nbsp;&nbsp; <font color="#000099">Call </font>CreateMarkupDocument<br><font color="#000099">End Sub</font><br><br><font color="#000099">Private </font><font color="#000099">Sub</font> UserControl_Resize()<br>&nbsp;&nbsp;&nbsp; <font color="#000099">On Error Resume Next</font><br>&nbsp;&nbsp;&nbsp; UserControl.MarkupLabel.Move 0, 0, UserControl.ScaleWidth, UserControl.ScaleHeight<br><font color="#000099">End Sub</font><br></pre></td></tr></table><br><br>Don't forget to set "UserControl.ControlContainer = True", so you can drop controls on it. Heads up though, Labels don't display when dropped on it, to get round this place a picture box in first and set it to be as high and wide as the document display remove the border and set as white, then you can see the Labels correctly.<br><br><img src="uploads/2960/MarkupLabel_&#068;ocument_Interface.png" height="647" width="777" border="0" /><br>]]>
   </description>
   <pubDate>Fri, 25 May 2012 04:00:43 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=19812&amp;PID=68346&amp;title=document-interface-usercontrol#68346</guid>
  </item> 
 </channel>
</rss>