2010-04-02 5 views
1

현재 스 캐플보기 항목으로 작업 할 플립을 얻으려고하고 있는데, Thriple (http://thriple.codeplex.com/)이라는 플러그인을 사용하여 개념적으로 문제가 있습니다.Microsoft Surface - Flip & Scatter보기 항목

기본적으로 2는 thriple 제어는 다음과 같습니다 양면 : 다음 각 내가 원하는 데이터에 바인딩이 별도의 ScatterView 템플릿을 제작하고, 할 필요가있는 경우

<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> 

내가 파악하기 위해 사투를 벌인거야 것은 하나는 scatterview 항목의 "앞"과 "뒤"입니다. 또는 내가 원하는 데이터에 바인딩 된 2 개의 분리 된 ScatterView 항목을 만들어야합니다.이 항목들은 주 ScatterView 항목의 "뒤"와 "앞"에 바인딩됩니다 ?

ScatterViewItem을 사용하여 플립 애니메이션을 사용하는 더 좋은 방법이 있다면 멋질 것입니다.

감사합니다.

+0

MS 표면 용으로 개발할 수 있습니까? 맵시 있는! – Moshe

답변

0

데이터에 대해 두 개의 별도 템플릿을 만들 것입니다. 사용자에게 그것은 여전히 ​​동일한 scatterviewitem (양면 포함)이므로 별도의 두 항목을 갖는 것이 거의 의미가 없습니다. ContentControl3D 클래스의 속성에서 front-back에 사용할 템플릿을 지정할 수 있습니다. 당신이 당신의 버튼이 같은

<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}" 
/> 

또한 단지 (컨트롤의 선언에 직접 내용을 지정할 수 있습니다 :

코드 - 현명한, 그것은 다음과 같이 보일 것 (그들은 DataTemplate이 유형입니다) 위의) 만약 당신에게 더 이해가된다면. 따라서 콘텐츠 용 데이터 템플릿을 만들지 않아도됩니다.

<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> 
관련 문제