Drop onto Page/User Control

2 posts, 0 answers
  1. xav
    xav avatar
    15 posts
    Member since:
    Jul 2006

    Posted 23 Jun 2010 Link to this post

    I'm actually starting with your Window | First Look demo. What I want to do is this. I have list box at the top of my page. When I drag from the list box to the containing page (User Control) I want to programatically create a RadWindow based on the text of the Listbox.

    is this possible?  This is the XAML I'm starting with:

    <UserControl x:Class="CODYRecords.MainPage3" 
        d:DesignHeight="609" d:DesignWidth="1053" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">  
            <Style TargetType="ListBoxItem" x:Key="draggableListBoxItem">  
                <Setter Property="dragDrop:RadDragAndDropManager.AllowDrag" Value="True" /> 
                <Setter Property="dragDrop:RadDragAndDropManager.AllowDrop" Value="True" /> 
            <Style TargetType="ListBox" x:Key="draggableListBox">  
                <Setter Property="dragDrop:RadDragAndDropManager.AllowDrop" Value="True" /> 
                <Setter Property="ItemContainerStyle" Value="{StaticResource draggableListBoxItem}" /> 
        <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">  
                <RowDefinition Height="24*" /> 
                <RowDefinition Height="585*" /> 
            <telerik:RadExpander x:Name="radExpander" ExpandDirection="Down" VerticalAlignment="Top" 
                        HorizontalAlignment="Stretch" Collapsed="radExpander_Collapsed">  
                    <TextBlock x:Name="expanderCaption" Foreground="#FFFFFFFF" Text="RadExpander" 
                                Visibility="Visible" /> 
                    <ListBox Name="listBox1"  Style="{StaticResource draggableListBox}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"  /> 
  2. Tina Stancheva
    Tina Stancheva avatar
    3298 posts

    Posted 29 Jun 2010 Link to this post

    Hi xav,

    I prepared a sample project for you illustrating how to drag a ListBoxItem and when it's dropped onto a Grid, RadWindow is created and displayed. The RadWindow header is set to the ListBoxItem's Content.

    Please take a look at it and let me know if this is what you had in mind.

    Tina Stancheva
    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
  3. DevCraft R3 2016 release webinar banner
Back to Top