﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - ClientUI - UXStackButton-OnDelete</title><link>http://www.intersoftsolutions.com/Community/ClientUI/UXStackButton-OnDelete/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>UXStackButton-OnDelete</title><link>http://www.intersoftsolutions.com/Community/ClientUI/UXStackButton-OnDelete/</link><pubDate>Mon, 22 Nov 2010 03:22:22 GMT</pubDate><dc:creator>MarTin</dc:creator><category>uxstackbutton</category><description>&lt;p&gt;Hello Andre,&lt;/p&gt;
&lt;p&gt;First of all, you can add the following namespace into you code-behind:&lt;/p&gt;&lt;pre&gt;using Intersoft.Client.UI.Aqua.UXStackMenu;&lt;/pre&gt;
&lt;p&gt;Next, add the following code in order to get the selected item that is being removed:&lt;/p&gt;&lt;pre&gt;String item = ((UXStackItem)(data.SourceElement)).Text;&lt;/pre&gt;
&lt;p&gt;Here is the complete code to obtain the removed item:&lt;/p&gt;&lt;pre&gt;private void UXStackButton1_Drop(object sender, Intersoft.Client.UI.Controls.Interactivity.DragEventArgs e)
{
   DragDropEventData data = e.Data as DragDropEventData;            
   String item = ((UXStackItem)(data.SourceElement)).Text;
            
   if (data != null &amp;amp;&amp;amp; !data.Cancel)
   {
      if (data.Sender.IsRemove())
      {
         MessageBox.Show(item &amp;#43;" is removed.");
      }
      else
         MessageBox.Show(item &amp;#43; " is moved.");
   }
}&lt;/pre&gt;
&lt;p&gt;Hope this helps. Thank you.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;-Martin-&lt;/p&gt;</description></item><item><title>UXStackButton-OnDelete</title><link>http://www.intersoftsolutions.com/Community/ClientUI/UXStackButton-OnDelete/</link><pubDate>Fri, 19 Nov 2010 16:51:12 GMT</pubDate><dc:creator>Andre</dc:creator><category>uxstackbutton</category><description>&lt;p&gt;HI, just one more question.  using the code:&lt;/p&gt;&lt;pre&gt;private void UXStackButton1_Drop(object sender, Intersoft.Client.UI.Controls.Interactivity.DragEventArgs e)
{
   DragDropEventData data = e.Data as DragDropEventData;
   if (data != null &amp;amp;&amp;amp; !data.Cancel)
   {
      if (data.Sender.IsRemove())
      {
         MessageBox.Show("The item is removed.");
      }
      else
         MessageBox.Show("The item is moved.");
      }
}&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;How do i find what element was deleted?  &lt;/pre&gt;&lt;pre&gt;I have created my own template and i have added a Navigation button.  on click to find the sender of the click event i use this.&lt;pre style="font-family: consolas"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: #2b91af"&gt;UXNavigationButton&lt;/span&gt;&amp;nbsp;s&amp;nbsp;=&amp;nbsp;sender&amp;nbsp;&lt;span style="color: blue"&gt;as&lt;/span&gt;&amp;nbsp;&lt;span style="color: #2b91af"&gt;UXNavigationButton&lt;/span&gt;;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue"&gt;var&lt;/span&gt;&amp;nbsp;ss&amp;nbsp;=&amp;nbsp;s.DataContext&amp;nbsp;&lt;span style="color: blue"&gt;as&lt;/span&gt;&amp;nbsp;&lt;span style="color: #2b91af"&gt;myobject&lt;/span&gt;;&lt;/pre&gt;&lt;pre style="font-family: consolas"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="font-family: consolas"&gt;but the code you sent me the sender is the stack button. I need to know find what control was removed so I an update the database.  thanks&lt;/pre&gt;&lt;/pre&gt;</description></item><item><title>UXStackButton-OnDelete</title><link>http://www.intersoftsolutions.com/Community/ClientUI/UXStackButton-OnDelete/</link><pubDate>Thu, 18 Nov 2010 10:08:05 GMT</pubDate><dc:creator>Andre</dc:creator><category>uxstackbutton</category><description>&lt;p&gt;&lt;img style="border-bottom: medium none; border-left: medium none; border-top: medium none; border-right: medium none" src="http://www.intersoftpt.com/WebResources/Images/Community/Editor/smiley2.gif" /&gt; &lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;</description></item><item><title>UXStackButton-OnDelete</title><link>http://www.intersoftsolutions.com/Community/ClientUI/UXStackButton-OnDelete/</link><pubDate>Thu, 18 Nov 2010 02:52:02 GMT</pubDate><dc:creator>MarTin</dc:creator><category>uxstackbutton</category><description>&lt;p&gt;Hello Andre,&lt;/p&gt;
&lt;p&gt;Thank you for your patient.&lt;/p&gt;
&lt;p&gt;I found out how to trigger the event when we remove an item from UXStackButton. You can use &lt;strong&gt;ISDragDrop.DragEndEvent&lt;/strong&gt; that is available in &lt;strong&gt;Routed Events&lt;/strong&gt; architecture. To learn more about the events, please refer to the following link:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.intersoftpt.com/Support/ClientUI/Documentation/#url=Drag-dropFrameworkOverview.html"&gt;http://www.intersoftpt.com/Support/ClientUI/Documentation/#url=Drag-dropFrameworkOverview.html&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You might want to know about routed events, please refer to the following link:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.intersoftpt.com/Support/ClientUI/Documentation/#url=RoutedEventsOverview.html"&gt;http://www.intersoftpt.com/Support/ClientUI/Documentation/#url=RoutedEventsOverview.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Use &lt;strong&gt;ISEventManager&lt;/strong&gt; to register the event handler like following:&lt;/p&gt;&lt;pre&gt;public UXStackButton()
{
   InitializeComponent();

   ISEventManager.RegisterInstanceHandler(
      this.UXStackButton1,
      ISDragDrop.DragEndEvent,
      new Intersoft.Client.UI.Controls.Interactivity.DragEventHandler(UXStackButton1_Drop), true);
}&lt;/pre&gt;
&lt;p&gt;Then, you can customize any operation you want to perform in the following code:&lt;/p&gt;&lt;pre&gt;private void UXStackButton1_Drop(object sender, Intersoft.Client.UI.Controls.Interactivity.DragEventArgs e)
{
   DragDropEventData data = e.Data as DragDropEventData;
   if (data != null &amp;amp;&amp;amp; !data.Cancel)
   {
      if (data.Sender.IsRemove())
      {
         MessageBox.Show("The item is removed.");
      }
      else
         MessageBox.Show("The item is moved.");
      }
}&lt;/pre&gt;
&lt;p&gt;Hope this helps. Thank you.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;-Martin-&lt;/p&gt;</description></item><item><title>UXStackButton-OnDelete</title><link>http://www.intersoftsolutions.com/Community/ClientUI/UXStackButton-OnDelete/</link><pubDate>Mon, 15 Nov 2010 04:31:17 GMT</pubDate><dc:creator>MarTin</dc:creator><category>uxstackbutton</category><description>&lt;p&gt;Hello Andre,&lt;/p&gt;
&lt;p&gt;I am currently investigating the event that will be triggered after we remove the stack item. So far, I've been trying to use DragEnter, DragLeave, Drop events with no luck. Those events does not get invoked when we remove an item.&lt;/p&gt;
&lt;p&gt;Then, I tried StackOpened and StackClosed, but these events will be triggered when we open/close the stack button.&lt;/p&gt;
&lt;p&gt;I will let you know the progress. Thank you for your patient.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;-Martin-&lt;/p&gt;</description></item><item><title>UXStackButton-OnDelete</title><link>http://www.intersoftsolutions.com/Community/ClientUI/UXStackButton-OnDelete/</link><pubDate>Fri, 12 Nov 2010 07:28:55 GMT</pubDate><dc:creator>Andre</dc:creator><category>uxstackbutton</category><description>&lt;p&gt;HI After I drag and drop the Item outside the uxstackbutton, what will tell me that an Item was removed? After it's been removed I need to update the database so I will need to know when to update and what Item was removed from the collection.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;I was looking for an event that would tigger, like Click event would fire after a click, what event will be raised after remove?&lt;/p&gt;</description></item><item><title>UXStackButton-OnDelete</title><link>http://www.intersoftsolutions.com/Community/ClientUI/UXStackButton-OnDelete/</link><pubDate>Fri, 12 Nov 2010 05:59:06 GMT</pubDate><dc:creator>MarTin</dc:creator><category>uxstackbutton</category><description>&lt;p&gt;Hello Andre,&lt;/p&gt;
&lt;p&gt;If you enable AllowRemoveItem property, you will be able to remove the item in UXStackButton.&lt;/p&gt;
&lt;p&gt;To remove the item, simply drag and drop the item outsite the UXStackButton area.&lt;/p&gt;
&lt;p&gt;I am not clear enough with your question. Could you explain it in more details? Do you want to know what event is triggered when AllowRemoveItem is executed, or do you want to know the code/method to execute remove item?&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;-Martin-&lt;/p&gt;</description></item><item><title>UXStackButton-OnDelete</title><link>http://www.intersoftsolutions.com/Community/ClientUI/UXStackButton-OnDelete/</link><pubDate>Thu, 11 Nov 2010 15:08:45 GMT</pubDate><dc:creator>Andre</dc:creator><category>uxstackbutton</category><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;UXStackButton under Interactivity has a check box that says AllowRemoveItem.  What even fires when when a item is removed?  Also, who do i know what item was removed?&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Andre&lt;/p&gt;</description></item></channel></rss>