Intersoft ClientUI 8 > ClientUI Fundamentals > Drag-drop Framework Overview > Drag-drop Framework Walkthroughs > Walkthrough: Customize Drag-able Area using DragDropPoint |
This walkthrough shows you how to create customize drag-able area using DragDropPoint.
In this walkthrough, you perform the following tasks:
The first step is to create a new ClientUI Application project using Intersoft ClientUI Application project template in Visual Studio.
This section shows you how to create drag point during drag and drop.
Sample Code |
Copy Code
|
---|---|
<Intersoft:UXPage... xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" > </Intersoft:UXPage> |
Property | Value |
---|---|
Width | 300 |
Height | 150 |
VerticalAlignment | Top |
Margin | 0 22 0 0 |
IsActive | True |
IsClientVisible | True |
Header | My Document |
XAML |
Copy Code
|
---|---|
<Grid x:Name="LayoutRoot"> <Grid> <Intersoft:UXWindow Width="300" Height="150" VerticalAlignment="Top" Margin="0 22 0 0" IsActive="True" IsClientVisible="True" Header="My Document"> <Intersoft:UXScrollViewer> </Intersoft:UXScrollViewer> </Intersoft:UXWindow> </Grid></Grid> |
XAML |
Copy Code
|
---|---|
<Intersoft:UXWindow... > <Intersoft:UXScrollViewer> <Intersoft:WrapPanel Background="White"> ... </Intersoft:WrapPanel> </Intersoft:UXScrollViewer> </Intersoft:UXWindow> |
XAML |
Copy Code
|
---|---|
<Intersoft:WrapPanel... > <i:Interaction.Behaviors> <Intersoft:DropTargetBehavior TooltipText="Move" /> </i:Interaction.Behaviors> </Intersoft:WrapPanel> |
XAML |
Copy Code
|
---|---|
<Intersoft:WrapPanel... > <i:Interaction.Behaviors> ... </i:Interaction.Behaviors> <StackPanel Orientation="Vertical"> </StackPanel> </Intersoft:WrapPanel> |
XAML |
Copy Code
|
---|---|
<StackPanel... > <i:Interaction.Behaviors> <Intersoft:DragDropBehavior DragEffect="Move" IsDragable="False" /> </i:Interaction.Behaviors> </StackPanel> |
XAML |
Copy Code
|
---|---|
<StackPanel... > <i:Interaction.Behaviors> ... </i:Interaction.Behaviors> <Image Source="/CustomizeDrag-ableAreaUsingDragPoint;component/Images/Text.png" Width="64" Height="64"> </Image> </StackPanel> |
XAML |
Copy Code
|
---|---|
<Image... > <i:Interaction.Behaviors> <Intersoft:DragDropPointBehavior /> </i:Interaction.Behaviors> </Image> |
XAML |
Copy Code
|
---|---|
<StackPanel... > ... <Image... > ... </Image> <Intersoft:EllipsisText Text="Text" /> </StackPanel> |
XAML |
Copy Code
|
---|---|
<StackPanel Orientation="Vertical"> <i:Interaction.Behaviors> <Intersoft:DragDropBehavior DragEffect="Move" IsDragable="False" /> </i:Interaction.Behaviors> <Image Source="/CustomizeDrag-ableAreaUsingDragPoint;component/Images/Text.png" Width="64" Height="64"> <i:Interaction.Behaviors> <Intersoft:DragDropPointBehavior /> </i:Interaction.Behaviors> </Image> <Intersoft:EllipsisText Text="Text" /> </StackPanel> <StackPanel Orientation="Vertical"> <i:Interaction.Behaviors> <Intersoft:DragDropBehavior DragEffect="Move" IsDragable="False" /> </i:Interaction.Behaviors> <Image Source="/CustomizeDrag-ableAreaUsingDragPoint;component/Images/Download.png" Width="64" Height="64"> <i:Interaction.Behaviors> <Intersoft:DragDropPointBehavior /> </i:Interaction.Behaviors> </Image> <Intersoft:EllipsisText Text="Download" /> </StackPanel> <StackPanel Orientation="Vertical"> <i:Interaction.Behaviors> <Intersoft:DragDropBehavior DragEffect="Move" IsDragable="False" /> </i:Interaction.Behaviors> <Image Source="/CustomizeDrag-ableAreaUsingDragPoint;component/Images/Picture.png" Width="64" Height="64"> <i:Interaction.Behaviors> <Intersoft:DragDropPointBehavior /> </i:Interaction.Behaviors> </Image> <Intersoft:EllipsisText Text="Picture" /> </StackPanel> |
XAML |
Copy Code
|
---|---|
<Intersoft:UXWindow Width="300" Height="150" VerticalAlignment="Bottom" Margin="0 0 0 22" IsClientVisible="True" Header="D:\Data"> <Intersoft:UXScrollViewer> <Intersoft:WrapPanel Background="White"> <i:Interaction.Behaviors> <Intersoft:DropTargetBehavior TooltipText="Move" /> </i:Interaction.Behaviors> <StackPanel Orientation="Vertical" > <i:Interaction.Behaviors> <Intersoft:DragDropBehavior DragEffect="Move" IsDragable="False" /> </i:Interaction.Behaviors> <Image Source="/CustomizeDrag-ableAreaUsingDragPoint;component/Images/Document.png" Width="64" Height="64"> <i:Interaction.Behaviors> <Intersoft:DragDropPointBehavior /> </i:Interaction.Behaviors> </Image> <Intersoft:EllipsisText Text="Document" /> </StackPanel> <StackPanel Orientation="Vertical" > <i:Interaction.Behaviors> <Intersoft:DragDropBehavior DragEffect="Move" IsDragable="False" /> </i:Interaction.Behaviors> <Image Source="/CustomizeDrag-ableAreaUsingDragPoint;component/Images/Report.png" Width="64" Height="64"> <i:Interaction.Behaviors> <Intersoft:DragDropPointBehavior /> </i:Interaction.Behaviors> </Image> <Intersoft:EllipsisText Text="Report" /> </StackPanel> <StackPanel Orientation="Vertical" > <i:Interaction.Behaviors> <Intersoft:DragDropBehavior DragEffect="Move" IsDragable="False" /> </i:Interaction.Behaviors> <Image Source="/CustomizeDrag-ableAreaUsingDragPoint;component/Images/Favorite.png" Width="64" Height="64"> <i:Interaction.Behaviors> <Intersoft:DragDropPointBehavior /> </i:Interaction.Behaviors> </Image> <Intersoft:EllipsisText Text="Favorite" /> </StackPanel> </Intersoft:WrapPanel> </Intersoft:UXScrollViewer> </Intersoft:UXWindow> |
In this walkthrough, you have learned how to create ClientUI project using project template. You also learned how to using drag drop point behavior.
This section lists the complete code used in this walkthrough.
XAML |
Copy Code
|
---|---|
<Intersoft:UXPage xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" xmlns:Intersoft="http://intersoft.clientui.com/schemas" x:Class="CustomizeDrag_ableAreaUsingDragPoint.MainPage" xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" Title="MainPage Page"> <Grid x:Name="LayoutRoot"> <Grid> <Intersoft:UXWindow Width="300" Height="150" VerticalAlignment="Top" Margin="0 22 0 0" IsActive="True" IsClientVisible="True" Header="My Documents"> <Intersoft:UXScrollViewer> <Intersoft:WrapPanel Background="White"> <i:Interaction.Behaviors> <Intersoft:DropTargetBehavior TooltipText="Move" /> </i:Interaction.Behaviors> <StackPanel Orientation="Vertical"> <i:Interaction.Behaviors> <Intersoft:DragDropBehavior DragEffect="Move" IsDragable="False" /> </i:Interaction.Behaviors> <Image Source="/CustomizeDrag-ableAreaUsingDragPoint;component/Images/Text.png" Width="64" Height="64"> <i:Interaction.Behaviors> <Intersoft:DragDropPointBehavior /> </i:Interaction.Behaviors> </Image> <Intersoft:EllipsisText Text="Text" /> </StackPanel> <StackPanel Orientation="Vertical"> <i:Interaction.Behaviors> <Intersoft:DragDropBehavior DragEffect="Move" IsDragable="False" /> </i:Interaction.Behaviors> <Image Source="/CustomizeDrag-ableAreaUsingDragPoint;component/Images/Download.png" Width="64" Height="64"> <i:Interaction.Behaviors> <Intersoft:DragDropPointBehavior /> </i:Interaction.Behaviors> </Image> <Intersoft:EllipsisText Text="Download" /> </StackPanel> <StackPanel Orientation="Vertical"> <i:Interaction.Behaviors> <Intersoft:DragDropBehavior DragEffect="Move" IsDragable="False" /> </i:Interaction.Behaviors> <Image Source="/CustomizeDrag-ableAreaUsingDragPoint;component/Images/Picture.png" Width="64" Height="64"> <i:Interaction.Behaviors> <Intersoft:DragDropPointBehavior /> </i:Interaction.Behaviors> </Image> <Intersoft:EllipsisText Text="Picture" /> </StackPanel> </Intersoft:WrapPanel> </Intersoft:UXScrollViewer> </Intersoft:UXWindow> <Intersoft:UXWindow Width="300" Height="150" VerticalAlignment="Bottom" Margin="0 0 0 22" IsClientVisible="True" Header="D:\Data"> <Intersoft:UXScrollViewer> <Intersoft:WrapPanel Background="White"> <i:Interaction.Behaviors> <Intersoft:DropTargetBehavior TooltipText="Move" /> </i:Interaction.Behaviors> <StackPanel Orientation="Vertical" > <i:Interaction.Behaviors> <Intersoft:DragDropBehavior DragEffect="Move" IsDragable="False" /> </i:Interaction.Behaviors> <Image Source="/CustomizeDrag-ableAreaUsingDragPoint;component/Images/Document.png" Width="64" Height="64"> <i:Interaction.Behaviors> <Intersoft:DragDropPointBehavior /> </i:Interaction.Behaviors> </Image> <Intersoft:EllipsisText Text="Document" /> </StackPanel> <StackPanel Orientation="Vertical" > <i:Interaction.Behaviors> <Intersoft:DragDropBehavior DragEffect="Move" IsDragable="False" /> </i:Interaction.Behaviors> <Image Source="/CustomizeDrag-ableAreaUsingDragPoint;component/Images/Report.png" Width="64" Height="64"> <i:Interaction.Behaviors> <Intersoft:DragDropPointBehavior /> </i:Interaction.Behaviors> </Image> <Intersoft:EllipsisText Text="Report" /> </StackPanel> <StackPanel Orientation="Vertical" > <i:Interaction.Behaviors> <Intersoft:DragDropBehavior DragEffect="Move" IsDragable="False" /> </i:Interaction.Behaviors> <Image Source="/CustomizeDrag-ableAreaUsingDragPoint;component/Images/Favorite.png" Width="64" Height="64"> <i:Interaction.Behaviors> <Intersoft:DragDropPointBehavior /> </i:Interaction.Behaviors> </Image> <Intersoft:EllipsisText Text="Favorite" /> </StackPanel> </Intersoft:WrapPanel> </Intersoft:UXScrollViewer> </Intersoft:UXWindow> </Grid> </Grid> </Intersoft:UXPage> |