private void RecycleContainer( ICustomItemContainerGenerator generator, LayoutedContainerInfo containerInfo )
    {
      Debug.Assert( containerInfo != null );

      var index = containerInfo.RealizedIndex;
      if( ( generator != null ) && ( index >= 0 ) )
      {
        try
        {
          var position = generator.GeneratorPositionFromIndex( index );
          generator.Remove( position, 1 );
        }
        catch
        {
          Debug.Fail( "Unable to remove container for containerIndex " + index );
        }
      }

      this.ClearContainer( containerInfo.Container );
    }
    private void RecycleContainer( ICustomItemContainerGenerator generator, int containerIndex, UIElement container )
    {
      if( ( generator != null ) && ( containerIndex != -1 ) )
      {
        try
        {
          GeneratorPosition position = generator.GeneratorPositionFromIndex( containerIndex );
          generator.Remove( position, 1 );
        }
        catch
        {
          Debug.Fail( "Unable to remove container for containerIndex " + containerIndex );
        }
      }

#if DEBUG
      TableflowViewItemsHost.SetRealizedIndex( container, -1 );
#endif //DEBUG
      TableflowViewItemsHost.ClearIsSticky( container );
      container.ClearValue( UIElement.ClipProperty );

      this.DisableElementNavigation( container );
      this.FreeRowSelector( container );

      m_layoutedContainersToRecycle.Add( container );
    }
Esempio n. 3
0
    private void RecycleContainer( ICustomItemContainerGenerator generator, int containerIndex, UIElement container )
    {
      if( ( generator != null ) && ( containerIndex != -1 ) )
      {
        try
        {
          GeneratorPosition position = generator.GeneratorPositionFromIndex( containerIndex );
          generator.Remove( position, 1 );
        }
        catch
        {
          Debug.Fail( "Unable to remove container for containerIndex " + containerIndex );
        }
      }

      this.DisableElementNavigation( container );
      this.FreeRowSelector( container );
    }