RadSplitButton and DragDrop Manager

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

    Posted 10 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.

    -Rajesh

     

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

    Posted 11 Mar 2010 Link to this post

    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
  3. DevCraft banner
  4. 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
  5. 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
  6. Miro Miroslavov
    Admin
    Miro Miroslavov avatar
    588 posts

    Posted 15 Mar 2010 Link to this post

    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.
  7. Rajesh
    Rajesh avatar
    25 posts
    Member since:
    Dec 2007

    Posted 17 Mar 2010 Link to this post

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

    Posted 19 Mar 2010 Link to this post

    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.
  9. Rajesh
    Rajesh avatar
    25 posts
    Member since:
    Dec 2007

    Posted 19 Mar 2010 Link to this post

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

    Posted 24 Mar 2010 Link to this post

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