<?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 : MarkupLabel Drag &amp; Drop List Sample &amp; Questions</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Controls : MarkupLabel Drag &amp; Drop List Sample &amp; Questions]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 09:49:17 +0000</pubDate>
  <lastBuildDate>Tue, 17 Mar 2009 13:20:43 +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=13709</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[MarkupLabel Drag &amp; Drop List Sample &amp; Questions : I&amp;#039;m posting this here for...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13709&amp;PID=46808&amp;title=markuplabel-drag-drop-list-sample-questions#46808</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 13709<br /><strong>Posted:</strong> 17 March 2009 at 1:20pm<br /><br />I'm posting this here for 2 reasons:<br><br>1) I'm not sure anyone ever looks at the Markup board :)<br>2) I'll be running a bug/question list based on the results of this continuing experiment.<br><br>First, I'll describe my requirements:<br><br>1) Create a list of attachments (with markup support) that supports OLE Drag &amp; Drop from Windows Explorer<br>2) Allow the list of attachments to be reorganized via internal drag &amp; drop<br>3) Dragging outside of the visible area of the list should automatically scroll the list items if required.<br><br>An example of what an attachment list item might look like is:<br><br><img src="uploads/20090317_131721_attachmentxaml.jpg" height="191" width="657" border="0"><br><br>Originally, I had hoped to use the ReportControl for this task since it supports markup and OLE Drag &amp; Drop (with a nice insert point marker). Unfortunately, the markup support is only aesthetic, as UI items are non-interactive. So instead, I've attempted to use the MarkupLabel control to achieve these goals, but I've encountered some other limitations:<br><br>1) The MarkupLabel has no OLE Drag &amp; Drop support.<br>2) There doesn't seem to be a way to tell when MouseUp has occurred outside of the control area.<br>3) I haven't figured out a way to track when the mouse has left the control area to automatically scroll up and down the list while dragging.<br><br>I imagine subclassing could fix #1, and a timer with mouse position checking could likely fix #2 &amp; #3, but these are ugly solutions. Nicer would be:<br><br>1) CJ could add the standard OLE Drag &amp; Drop events to the MarkupLabel.<br>2) The LostMouseCaptureEvent could fire when the mouse button has been released outside of the object that the mouse button was originally depressed over. But maybe I am misunderstanding the purpose of this event?<br><br>Here's a demo of what I have got working so far:<br><br><a href="uploads/20090317_131915_XamlAttachments.zip" target="_blank">uploads/20090317_131915_XamlAttachments.zip</a><br><br>There are some known limitations &amp; bugs:<br><br>1) While dragging, if the mouse button is released over the insertion point, the item won't be dropped and the drag operation will get stuck until a text item is clicked.<br>2) While dragging, if the mouse is released outside of the control area, the item won't be dropped and the drag operation will get stuck until a text item is clicked.<br>3) There is no auto-scroll when dragging items. Anyone have any good ideas on how to achieve this?<br>4) The "attachment" items are just TextBlocks right now, but it should be easy enough to add nicer looking markup items (as in my screenshot)<br>5) The code uses an ugly naming/id system that requires string handling. I will be updating this to use a class system in the Tag property I think...<br><br>Anyway, feedback and ideas are welcome, and I'll post updates as they are available.]]>
   </description>
   <pubDate>Tue, 17 Mar 2009 13:20:43 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13709&amp;PID=46808&amp;title=markuplabel-drag-drop-list-sample-questions#46808</guid>
  </item> 
 </channel>
</rss>