Esempio n. 1
0
    public FixedCellPanel()
    {
      // None of the Visual children of the FixedCellPanel will scroll. The needed scrolling
      // as demanded by the parent ScrollViewer will be manually transferred to the 
      // content (m_scrollingPanel) of the ScrollingCellsDecorator below.

      m_fixedPanel = new FixedCellSubPanel( this );

      m_splitter = new FixedColumnSplitter();

      m_scrollingPanel = new VirtualizingFixedCellSubPanel( this );

      m_scrollingCellsDecorator = new ScrollingCellsDecorator();
      m_scrollingCellsDecorator.Child = m_scrollingPanel;

      this.AddVisualChild( m_fixedPanel );
      this.AddVisualChild( m_splitter );
      this.AddVisualChild( m_scrollingCellsDecorator );

      // Used to get the correct item depending of the ZIndex
      m_visualChildren.Add( m_fixedPanel );
      m_visualChildren.Add( m_splitter );
      m_visualChildren.Add( m_scrollingCellsDecorator );

    }
Esempio n. 2
0
        private static void OnAreColumnsBeingReorderedChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
        {
            ScrollingCellsDecorator decorator = sender as ScrollingCellsDecorator;

            if (decorator == null)
            {
                return;
            }


            if (( bool )e.NewValue)
            {
                decorator.SetSplitterOffsetBinding();
            }
            else
            {
                decorator.ClearSplitterOffsetBinding();
            }
        }