This is a migrated thread and some comments may be shown as answers.

RadSplitButton and DragDrop Manager

8 Answers 87 Views
Buttons
This is a migrated thread and some comments may be shown as answers.
Rajesh
Top achievements
Rank 1
Rajesh asked on 10 Mar 2010, 02:09 PM
Hi

I am using RadSplitButton displayed in list box and want to do drag-drop for rad splitbutton and not for Listbox item.

I have following xaml code and when I try to drag the radsplitbutton it is not showing me any drag operation.

 

<ListBox ItemsSource="{Binding NavigationPanelMetaItems}" Tag="InfoPanel">

 

 

<ListBox.ItemTemplate>

 

 

<DataTemplate>

 

 

<!--<StackPanel Orientation="Horizontal">

 

<Image Stretch="Fill" Height="16" Width="16" Source="{Binding ImagePath}" />

<Path Data="{Binding ShapeGeometry}" Fill="{Binding Brush}" Stretch="Fill" Width="25" Height="25"/>

<TextBlock Text="{Binding Name, Mode=TwoWay}" Margin="5" />

</StackPanel> -->

 

<telerikRibbonBar:RadRibbonSplitButton DropDownIndicatorVisibility="{Binding ShowDropDown, Converter={StaticResource VisibilityConverter}}"

 

 

HorizontalContentAlignment="Center" VerticalContentAlignment="Center" dragDrop:RadDragAndDropManager.AllowDrag="True">

 

 

<telerikRibbonBar:RadRibbonSplitButton.Content>

 

 

<StackPanel Orientation="Horizontal">

 

 

<Path Data="{Binding ShapeGeometry}" Fill="{Binding Brush}" Stretch="Fill" Width="25" Height="25"/>

 

 

<TextBlock Text="{Binding Name, Mode=TwoWay}" Margin="5" />

 

 

</StackPanel>

 

 

</telerikRibbonBar:RadRibbonSplitButton.Content>

 

 

<telerikRibbonBar:RadRibbonSplitButton.DropDownContent>

 

 

<radNavigation:RadContextMenu BorderThickness="0">

 

 

<radNavigation:RadMenuItem Header="Shape1" Width="300">

 

 

</radNavigation:RadMenuItem>

 

 

<radNavigation:RadMenuItem Header="Shape2" Width="300">

 

 

</radNavigation:RadMenuItem>

 

 

</radNavigation:RadContextMenu>

 

 

</telerikRibbonBar:RadRibbonSplitButton.DropDownContent>

 

 

</telerikRibbonBar:RadRibbonSplitButton>

 

 

</DataTemplate>

 

 

</ListBox.ItemTemplate>

 

 

<ListBox.ItemContainerStyle>

 

 

<Style TargetType="ListBoxItem">

 

 

<Setter Property="Margin" Value="10,0,10,0" />

 

 

<Setter Property="Padding" Value="3"/>

 

 

<Setter Property="HorizontalContentAlignment" Value="Left"/>

 

 

<Setter Property="VerticalContentAlignment" Value="Top"/>

 

 

<Setter Property="Background" Value="Transparent"/>

 

 

<Setter Property="BorderThickness" Value="1"/>

 

 

<Setter Property="TabNavigation" Value="Local"/>

 

 

<Setter Property="Template">

 

 

<Setter.Value>

 

 

<ControlTemplate TargetType="ListBoxItem">

 

 

<Grid Background="{TemplateBinding Background}">

 

 

<ContentPresenter HorizontalAlignment="Left" Margin="{TemplateBinding Padding}" x:Name="contentPresenter" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/>

 

 

</Grid>

 

 

</ControlTemplate>

 

 

</Setter.Value>

 

 

</Setter>

 

 

</Style>

 

 

</ListBox.ItemContainerStyle>

 

 

</ListBox>

Can you help me in this so drag operation should get started. I have required code in ApplicationDragDrop.cs file which works properly for other controls like TreeView.

-Rajesh

 

8 Answers, 1 is accepted

Sort by
0
Rajesh
Top achievements
Rank 1
answered on 11 Mar 2010, 09:07 AM
Hi

In forum , after searching found that Drag-Drop not supported for Button since mouse is captured.

But in one of the reply i received it says Q3 release supports drag-drop even mouse is captured.
http://www.telerik.com/account/support-tickets/view-ticket.aspx?threadid=253160

In my application i need to display the main image in button and supported images in drop -down and dragging from those buttons is required.

-Rajesh
0
Rajesh
Top achievements
Rank 1
answered on 11 Mar 2010, 01:22 PM
Hi

I have uploaded a sample project in which one custom control is developed which contains "RadRibbonBarSplitButton"
http://cid-2b9bf77533900b84.skydrive.live.com/self.aspx/.Public/DragDropWithinControls.zip

I have implemented the drag-drop using Drag-Drop Manager for same. When this control is used on main page, drag-drop is working as expected. Placing same control in RadWindow, drag-drop doesn't work.

Both functionality is provided in the sample. Will you help me in fixing this issue.

-Rajesh
0
Ketaki
Top achievements
Rank 1
answered on 11 Mar 2010, 02:21 PM
Hi

One more additional thing : Instead of RadSplitButton dragging for list box works both from popup window and normal page.

So I don't think it has to do something with ParticipatingVisualRoots element.

-Rajesh
0
Miro Miroslavov
Telerik team
answered on 15 Mar 2010, 09:32 AM
Hello Ketaki,

Since the Buttons (RadSplitButton and all Buttons) captures the mouse on LeftMouseButtonDown, Drag and Drop from Button shouldn't work on both the MainPage and on Window (Popup). We strongly recommend you not to initiate Drag and Drop from button, because this appears to be bug in the Drag and Drop and could be fixed in next releases
If you have further question, please contact us.

All the best,
Miro Miroslavov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Rajesh
Top achievements
Rank 1
answered on 17 Mar 2010, 07:16 AM
Hi

I am not able to see the "LeftMouseButton" captured in RadRibbonSplitButton and RadSplitButton class. Viewed thro' reflection tool.

Can you tell me where it gets captured in these two classes.

Also, when the new version of telerik silverlight controls will be released where this functionality of drag-drop from splitbutton is possible? [ Just for your infomration, our company "Split~Vision" has already purchased the silverlight teleirk control toolkit.  and I need this functionality implemented in our software before 30th March. ]

I need to achive drag-drop from menus like shown in following link - 
http://www.bizagi.com/index.php?option=com_content&view=article&id=15&catid=5&Itemid=41  Click on 5 min or 25 min demo links.

-Rajesh
0
Miro Miroslavov
Telerik team
answered on 19 Mar 2010, 12:28 PM
Hello Rajesh,

The mouse is captured by the Microsoft's Button. The RadSplitButton is build from two normal Buttons. However we no longer check about the MouseCapture, so dragging from Button should work. According to the video, In my opinion you, you shouldn't use Buttons but something simpler like Border or Rectangles with TextBlocks, this will be more light-weight and will perform better.
If you have further question, please contact us.

Regards,
Miro Miroslavov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Rajesh
Top achievements
Rank 1
answered on 19 Mar 2010, 02:57 PM
Hi Miro Miroslavov

My initial post says that RadSplitButton and DragDrop manger doesn't function. Later on I found that it works but drag-drop doesn't work if i place my RadSplitButton in RadWindow control.

I have uploaded a sample project 
http://cid-2b9bf77533900b84.skydrive.live.com/self.aspx/.Public/DragDropWithinControls.zip

In this project, I developed one control which displays RadSplitButtons. If I place this control on my page.xaml file directly drag-drop works as expected. If I place one RadWindow control in page.xaml file and add the control as a child of this RadWindow, drag-drop doesn't function.

Will you provide help for me , how to fix this issue.

-Rajesh
0
Miro Miroslavov
Telerik team
answered on 24 Mar 2010, 01:17 PM
Hello Rajesh,

Thank you for reporting this problem. We'll fix it as soon as possible. You can track it's progress here.
Also we can suggest you not to drag buttons, but some non-clickable UIElements.

Best wishes,
Miro Miroslavov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Buttons
Asked by
Rajesh
Top achievements
Rank 1
Answers by
Rajesh
Top achievements
Rank 1
Ketaki
Top achievements
Rank 1
Miro Miroslavov
Telerik team
Share this question
or