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

RadSplitButton And DragDrop Manager

3 Answers 52 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
Rajesh
Top achievements
Rank 1
Rajesh asked on 11 Mar 2010, 09:31 AM
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.

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.

I also looked in the code thro' reflection and found that RadRibbonBarSplitButton and RadRibbonBarButton controls are not inherited from Button and didn't find any code for mouse capture.

-Rajesh

3 Answers, 1 is accepted

Sort by
0
Rajesh
Top achievements
Rank 1
answered on 11 Mar 2010, 01:23 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:18 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, 05:01 PM
Hi Ketaki,

Already answered TicketID: 288707

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
DragAndDrop
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