Using LibraryStacks in a ScatterView on Surface
Posted
by HappyCodeMonkey
on Stack Overflow
See other posts from Stack Overflow
or by HappyCodeMonkey
Published on 2009-10-27T18:52:42Z
Indexed on
2010/03/15
20:59 UTC
Read the original article
Hit count: 1041
We're trying to figure out how to drag an item from a LibraryStack container onto a ScatterView, like how the photo viewer sample applications work. Currently, the item just flies back into the LibraryStack after we drag it out. We can drag and drop items into other LibraryStacks or LibraryBars.
Here's a sample of what we're trying:
<s:SurfaceWindow x:Class="Idia_seminar.SurfaceWindow1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:s="http://schemas.microsoft.com/surface/2008"
Title="Idia_seminar"
>
<s:SurfaceWindow.Resources>
<ImageBrush x:Key="WindowBackground" Stretch="None" Opacity="0.6" ImageSource="pack://application:,,,/Resources/WindowBackground.jpg"/>
</s:SurfaceWindow.Resources>
<Grid Background="{StaticResource WindowBackground}" >
<s:ScatterView Name="scatterView1" AllowDrop="True">
<s:SurfaceButton Name="surfaceButton1">Button</s:SurfaceButton>
<s:LibraryStack AllowDrop="True">
<s:LibraryStackItem Content="hello"></s:LibraryStackItem>
</s:LibraryStack>
</s:ScatterView>
</Grid>
</s:SurfaceWindow>
Thanks!
© Stack Overflow or respective owner