簡単なもの: LibraryContainer を Surface ScatterView に追加したい。回転/移動機能を取得するには、ScatterViewItem 内にコンテナーを追加する必要があることを知っています..しかし、SVI はコントロールの周りに長方形のボックスを追加し、サイズが正しくありません。簡単なものが欠けていると思いますが、理解できません...現在のXAMLは次のとおりです。
Background="{StaticResource WindowBackground}" AllowDrop="True" > . . .
ご意見をお待ちしております... ハウツー サンプルを見てきましたが、表示されているライブラリ コントロールは静的な項目です。(つまり、それらは移動できません)...
更新:
私はあなたが言っていることを理解しています. 理にかなっていますが、期待どおりに動作しません。以下は、のサンプル全体LibraryContainer
です。空ですが、私が得ている奇妙な動作を示しています。つまり、サイズ変更なし、自分で取り除くことができない背景の四角形..
任意の提案をいただければ幸いです。
< s:SurfaceWindow x:Class="SurfaceApplication1.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="SurfaceApplication1"
>
< s:SurfaceWindow.Resources>
< ImageBrush x:Key="WindowBackground" Stretch="None" Opacity="0.6" ImageSource="pack://application:,,,/Resources/WindowBackground.jpg"/>
< XmlDataProvider x:Key="MyData" XPath="CoverList" x:Name="xdpList">
</XmlDataProvider>
< !-- Describe teh data grouping and bind to the data above -->
< CollectionViewSource
x:Key="MySourceOfData"
Source="{Binding Source={StaticResource MyData}, XPath=Item}" >
< CollectionViewSource.GroupDescriptions>
< PropertyGroupDescription PropertyName="@Size" />
< /CollectionViewSource.GroupDescriptions>
< /CollectionViewSource>
< DataTemplate x:Key="MyDataTemp">
< Border BorderThickness="1" BorderBrush="White" Margin="3">
< Image Source="{Binding XPath=@Image}"></Image>
< /Border>
</DataTemplate>
</s:SurfaceWindow.Resources>
<Grid Background="{StaticResource WindowBackground}" >
<s:ScatterView>
<s:LibraryContainer Name="MainLibraryContainer"
Width="400" Height="200"
ViewingMode="Bar"
ItemsSource="{Binding Source={StaticResource MySourceOfData}}" CanSwitchViewingMode="False" IsActive="True">
<!-- Provide the view if a stack view select (not in use) -->
<s:LibraryContainer.StackView>
<s:StackView
NormalizedTransitionSize="1,1"
ItemTemplate="{StaticResource MyDataTemp}">
</s:StackView>
</s:LibraryContainer.StackView>
<!-- bar view of the data -->
<s:LibraryContainer.BarView>
<s:BarView
Rows="1"
ItemTemplate="{StaticResource MyDataTemp}">
</s:BarView>
</s:LibraryContainer.BarView>
</s:LibraryContainer>
</s:ScatterView>
</Grid>
</s:SurfaceWindow>