1

私は現在、フリップをスキャッタービュー アイテムで動作させようとしていますが、Thriple ( http://thriple.codeplex.com/ ) というプラグインを使用して、概念的に問題が発生しています。

基本的に、両面トリプル コントロールは次のようになります。

<thriple:ContentControl3D
  xmlns:thriple="http://thriple.codeplex.com/"
  Background="LightBlue"
  BorderBrush="Black"
  BorderThickness="2"
  MaxWidth="200" MaxHeight="200"
 >
<thriple:ContentControl3D.Content>
<Button 
  Content="Front Side"
  Command="thriple:ContentControl3D.RotateCommand"
  Width="100" Height="100"
  />
</thriple:ContentControl3D.Content>
<thriple:ContentControl3D.BackContent>
<Button 
  Content="Back Side"
  Command="thriple:ContentControl3D.RotateCommand"
  Width="100" Height="100"
  />
</thriple:ContentControl3D.BackContent>
</thriple:ContentControl3D>

私が把握するのに苦労しているのは、必要なデータにバインドするために 2 つの個別の ScatterView テンプレートを作成する必要がある場合で、それぞれが scatterview アイテムの「前面」と「背面」になるか、または 2 つの個別の ScatterView を作成する必要があるかどうかです。必要なデータにバインドされたアイテムは、メインの ScatterView アイテムの「背面」と「前面」にバインドされますか?

ScatterViewItem でフリップ アニメーションを行うためのより良い方法があれば、それも素晴らしいでしょう!

ありがとう!

4

1 に答える 1

0

データ用に2つの別々のテンプレートを作成します。ユーザーにとっては、それはまだ同じscatterviewitem(2つの側面を持つ)であるため、2つの別々のアイテムとしてそれらを持っていることはほとんど意味がありません。ContentControl3Dクラスのプロパティで、前面と背面に使用するテンプレートを指定できます。(タイプですDataTemplate

コード的には、次のようになります。

<thriple:ContentControl3D
  xmlns:thriple="http://thriple.codeplex.com/"
  Background="LightBlue"
  BorderBrush="Black"
  BorderThickness="2"
  MaxWidth="200" MaxHeight="200"
  Content="{Binding MyData}"
  BackContent="{Binding MyData}"
  ContentTemplate="{StaticResource MyFrontTemplate}"
  BackContentTemplate="{StaticResource MyBackTemplate}"   
 />

コントロールの宣言でコンテンツを直接指定することもできます(上のボタンがあるように)。これにより、コンテンツのデータテンプレートを作成する必要がなくなります。

<thriple:ContentControl3D
  xmlns:thriple="http://thriple.codeplex.com/"
  Background="LightBlue"
  BorderBrush="Black"
  BorderThickness="2"
  MaxWidth="200" MaxHeight="200"
 >

<thriple:ContentControl3D.Content>
  <Grid>
    <TextBlock Text="I'm the front" />
    <TextBlock Text="{Binding SomeDataProperty}" />
    <Button 
        Content="Flip"
        Command="thriple:ContentControl3D.RotateCommand"
        Width="100" Height="100"
        />
  </Grid>
<thriple:ContentControl3D.BackContent>
  <Grid>
    <TextBlock Text="I'm the back" />
    <TextBlock Text="{Binding SomeOtherDataProperty}" />
    <Button 
        Content="Flip"
        Command="thriple:ContentControl3D.RotateCommand"
        Width="100" Height="100"
        />
  </Grid>
</thriple:ContentControl3D.BackContent>
</thriple:ContentControl3D>
于 2010-05-04T17:49:34.743 に答える