Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have made a list of stickers from assets. Now i want that if i selected any image one or more from that listview of stickers it display on my canvas and i also drag and drop that images on my canvas.

What I have tried:

I have no idea about this so please help me
private void Stickers1_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
my_canvas.Clip = new RectangleGeometry();
my_canvas.Clip.Rect = new Rect(0, 0, my_canvas.ActualWidth, my_canvas.ActualHeight);

{
Stickers1.Visibility = Visibility.Collapsed;

}
my_canvas.Visibility = Visibility.Visible;
}

<listview x:name="Stickers1" visibility="Collapsed" xmlns:x="#unknown"> SelectionChanged="Stickers1_SelectionChanged"
ScrollViewer.VerticalScrollMode="Enabled"
ScrollViewer.VerticalScrollBarVisibility="Hidden" BorderThickness="50"
FontSize="36" Margin="0" ItemTemplate="{StaticResource
listStickersDataTemplate}">
<listview.itemspanel> <itemspaneltemplate>
<wrapgrid orientation="Horizontal">
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>

<datatemplate x:key="listStickersDataTemplate" xmlns:x="#unknown">
<grid>
<Image Source="{Binding Imageurl}" Stretch="Fill" Height="200" Width="200"/>

`
Posted
Updated 1-Jun-16 22:33pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900