RadSplitButton And DragDrop Manager

4 posts, 0 answers
  1. Rajesh
    Rajesh avatar
    25 posts
    Member since:
    Dec 2007

    Posted 11 Mar 2010 Link to this post

    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

  2. Rajesh
    Rajesh avatar
    25 posts
    Member since:
    Dec 2007

    Posted 11 Mar 2010 Link to this post

    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
  3. DevCraft banner
  4. Ketaki
    Ketaki avatar
    26 posts
    Member since:
    Apr 2009

    Posted 11 Mar 2010 Link to this post

    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
  5. Miro Miroslavov
    Admin
    Miro Miroslavov avatar
    588 posts

    Posted 15 Mar 2010 Link to this post

    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.
Back to Top