コード例 #1
0
    internal DataGridCollectionViewBaseDataProvider( DataGridCollectionViewSourceBase parentSource )
      : base()
    {
      if( parentSource == null )
        throw new ArgumentNullException( "parentSource" );

      m_parentSource = parentSource;
    }
コード例 #2
0
        internal DataGridCollectionViewBaseDataProvider(DataGridCollectionViewSourceBase parentSource)
            : base()
        {
            if (parentSource == null)
            {
                throw new ArgumentNullException("parentSource");
            }

            m_parentSource = parentSource;
        }
コード例 #3
0
        internal static void OnDataGridCollectionViewSourceBaseDependencyPropertyChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
        {
            DataGridCollectionViewSourceBase source = o as DataGridCollectionViewSourceBase;

            if (source == null)
            {
                return;
            }

            source.AdviseForwardedPropertyChanged();
        }
コード例 #4
0
        internal static void OnDataGridCollectionViewSourceChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
        {
            DataGridCollectionViewSourceBase source = o as DataGridCollectionViewSourceBase;

            if (source == null)
            {
                return;
            }

            if (source.m_dataSourceProvider != null)
            {
                source.m_dataSourceProvider.DelayRefresh(source.Dispatcher, System.Windows.Threading.DispatcherPriority.DataBind);
            }
        }
コード例 #5
0
        private static void OnQueryableSourcePropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
        {
            DataGridCollectionViewSourceBase source = sender as DataGridCollectionViewSourceBase;

            if (source == null)
            {
                return;
            }

            source.AdviseForwardedPropertyChanged();

            if (source.DataSourceProvider != null)
            {
                source.DataSourceProvider.DelayRefresh(source.Dispatcher, System.Windows.Threading.DispatcherPriority.DataBind);
            }
        }
コード例 #6
0
        private static object OnSourceCoerceValue(DependencyObject d, object newValue)
        {
            if (newValue is DataGridCollectionViewBaseDataProvider)
            {
                return(newValue);
            }

            DataGridCollectionViewSourceBase collectionViewSourceBase = ( DataGridCollectionViewSourceBase )d;

            collectionViewSourceBase.m_originalSource = newValue;

            if (collectionViewSourceBase.m_dataSourceProvider == null)
            {
                collectionViewSourceBase.m_dataSourceProvider = collectionViewSourceBase.CreateDataProvider();
            }
            else
            {
                collectionViewSourceBase.m_dataSourceProvider.DelayRefresh(collectionViewSourceBase.Dispatcher, System.Windows.Threading.DispatcherPriority.DataBind);
            }

            return(collectionViewSourceBase.m_dataSourceProvider);
        }