2014-10-19 3 views
0

내 WP 8.1 응용 프로그램에서 내 목록을 다음 목록에 바인딩 할 때 원하지 않는 타일이 애니메이션으로 표시됩니다.바인딩 된 정적 HubTile

나는 튜토리얼 here을 따라 가고 있지만 정적 인 타일은 하드 목록에 바인딩되어있어 동적 목록을 바인딩하고 타일을 정적으로 유지하거나 애니메이션으로 유지하고 싶지 않습니다. 그것을 할 방법이 있습니까?

<ListBox Grid.Row="0" x:Name="listboxDataBinding" ItemsSource="{Binding}"> 
       <ListBox.ItemsPanel> 
        <ItemsPanelTemplate> 
         <toolkit:WrapPanel Orientation="Horizontal" /> 
        </ItemsPanelTemplate> 
       </ListBox.ItemsPanel> 
       <ListBox.ItemTemplate> 
        <DataTemplate> 
         <toolkit:HubTile Margin="12,12,0,0"            
          Title="{Binding Title}" 
          Message="{Binding ViewName}" 
          Source="{Binding IconUrl}" 
          GroupTag="StaticHubTile"> 
         </toolkit:HubTile> 
        </DataTemplate> 
       </ListBox.ItemTemplate> 
      </ListBox> 

답변

0

그냥 <Style> 템플릿에 모든 애니메이션을 제거 :

문서 개요> 마우스 오른쪽 버튼으로 클릭 HubTitle> 편집 템플릿 -> 편집 사본

<phone:PhoneApplicationPage.Resources> 
    <toolkit:TileSizeToHeightConverter x:Key="HeightConverter"/> 
    <toolkit:TileSizeToWidthConverter x:Key="WidthConverter"/> 
    <Style x:Key="HubTileStyle1" TargetType="toolkit:HubTile"> 
     <Setter Property="Height" Value="173"/> 
     <Setter Property="Width" Value="173"/> 
     <Setter Property="Background" Value="{StaticResource PhoneAccentBrush}"/> 
     <Setter Property="Foreground" Value="#FFFFFFFF"/> 
     <Setter Property="Template"> 
      <Setter.Value> 
       <ControlTemplate TargetType="toolkit:HubTile"> 
        <Border x:Name="Container"> 
         <Border.Resources> 
          <CubicEase x:Key="HubTileEaseOut" EasingMode="EaseOut"/> 
         </Border.Resources> 
         <Border.Height> 
          <Binding Converter="{StaticResource HeightConverter}" Path="Size" RelativeSource="{RelativeSource TemplatedParent}"/> 
         </Border.Height> 
         <VisualStateManager.VisualStateGroups> 
          <VisualStateGroup x:Name="ImageStates"> 
           <VisualStateGroup.Transitions> 
            <VisualTransition x:Name="ExpandedToSemiexpanded" From="Expanded"> 
            </VisualTransition> 
            <VisualTransition x:Name="SemiexpandedToExpanded" From="Semiexpanded"> 
            </VisualTransition> 
            <VisualTransition x:Name="SemiexpandedToCollapsed" From="Semiexpanded" > 
            </VisualTransition> 
            <VisualTransition x:Name="CollapsedToExpanded" From="Collapsed" > 
            </VisualTransition> 
            <VisualTransition x:Name="ExpandedToFlipped" From="Expanded" > 
            </VisualTransition> 
            <VisualTransition x:Name="FlippedToExpanded" From="Flipped" > 
            </VisualTransition> 
           </VisualStateGroup.Transitions> 
           <VisualState x:Name="Expanded"> 
           </VisualState> 
           <VisualState x:Name="Semiexpanded"> 
           </VisualState> 
           <VisualState x:Name="Collapsed"/> 
           <VisualState x:Name="Flipped"> 
           </VisualState> 
          </VisualStateGroup> 
         </VisualStateManager.VisualStateGroups> 
         <Border.Width> 
          <Binding Converter="{StaticResource WidthConverter}" Path="Size" RelativeSource="{RelativeSource TemplatedParent}"/> 
         </Border.Width> 
         <StackPanel x:Name="Viewport" Height="{Binding Size, Converter={StaticResource HeightConverter}, RelativeSource={RelativeSource TemplatedParent}}" Width="{Binding Size, Converter={StaticResource WidthConverter}, RelativeSource={RelativeSource TemplatedParent}}"> 
          <StackPanel.Projection> 
           <PlaneProjection x:Name="ViewportProjection" CenterOfRotationY="0.25"/> 
          </StackPanel.Projection> 
          <Grid x:Name="TitlePanel" Height="{Binding Size, ConverterParameter=2, Converter={StaticResource HeightConverter}, RelativeSource={RelativeSource TemplatedParent}}" RenderTransformOrigin="0.5,0.5" Width="{Binding Size, Converter={StaticResource WidthConverter}, RelativeSource={RelativeSource TemplatedParent}}"> 
           <Grid.RowDefinitions> 
            <RowDefinition/> 
            <RowDefinition/> 
           </Grid.RowDefinitions> 
           <Grid.RenderTransform> 
            <CompositeTransform/> 
           </Grid.RenderTransform> 
           <Border Background="{TemplateBinding Background}" Grid.Row="0"> 
            <TextBlock Foreground="{TemplateBinding Foreground}" FontSize="41" FontFamily="{StaticResource PhoneFontFamilyNormal}" LineStackingStrategy="BlockLineHeight" LineHeight="39" Margin="10,0,0,6" TextWrapping="NoWrap" Text="{TemplateBinding Title}" VerticalAlignment="Bottom"/> 
           </Border> 
           <Grid x:Name="BackPanel" Background="{TemplateBinding Background}" Height="{Binding Size, Converter={StaticResource HeightConverter}, RelativeSource={RelativeSource TemplatedParent}}" Grid.Row="1" Visibility="Collapsed" Width="{Binding Size, Converter={StaticResource WidthConverter}, RelativeSource={RelativeSource TemplatedParent}}"> 
            <Grid.Projection> 
             <PlaneProjection CenterOfRotationY="0.5" RotationX="180"/> 
            </Grid.Projection> 
            <Grid.RowDefinitions> 
             <RowDefinition Height="*"/> 
             <RowDefinition Height="Auto"/> 
            </Grid.RowDefinitions> 
            <TextBlock x:Name="NotificationBlock" Foreground="{TemplateBinding Foreground}" FontSize="{StaticResource PhoneFontSizeLarge}" FontFamily="{StaticResource PhoneFontFamilyNormal}" LineStackingStrategy="BlockLineHeight" LineHeight="32" Margin="8,8,0,6" Grid.Row="0" TextWrapping="NoWrap" Text="{TemplateBinding Notification}"/> 
            <TextBlock x:Name="MessageBlock" Foreground="{TemplateBinding Foreground}" FontSize="{StaticResource PhoneFontSizeNormal}" FontFamily="{StaticResource PhoneFontFamilyNormal}" LineStackingStrategy="BlockLineHeight" LineHeight="23.333" Margin="10,10,10,6" Grid.Row="0" TextWrapping="Wrap" Text="{TemplateBinding Message}"/> 
            <TextBlock x:Name="BackTitleBlock" Foreground="{TemplateBinding Foreground}" FontSize="{StaticResource PhoneFontSizeNormal}" FontFamily="{StaticResource PhoneFontFamilySemiBold}" Margin="10,0,0,6" Grid.Row="1" TextWrapping="NoWrap" VerticalAlignment="Bottom"/> 
           </Grid> 
           <Border x:Name="Image" Background="{TemplateBinding Background}" Grid.Row="1"> 
            <Image Height="{Binding Size, Converter={StaticResource HeightConverter}, RelativeSource={RelativeSource TemplatedParent}}" Source="{TemplateBinding Source}" Stretch="UniformToFill" Width="{Binding Size, Converter={StaticResource WidthConverter}, RelativeSource={RelativeSource TemplatedParent}}"/> 
           </Border> 
          </Grid> 
         </StackPanel> 
        </Border> 
       </ControlTemplate> 
      </Setter.Value> 
     </Setter> 
    </Style> 
</phone:PhoneApplicationPage.Resources> 

<toolkit:HubTile Title="Test2" Style="{StaticResource HubTileStyle1}"></toolkit:HubTile>