Home Forums WPF controls Xceed DataGrid for WPF Problem with "Image" (or icon) column

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #23838 |

    I have a grid column that is defined as follows:

    <xcdg:Column FieldName=”AssociatedIcon” MinWidth=”32″ MaxWidth=”32″ ReadOnly=”True”>
    <xcdg:Column.CellContentTemplate>
    <DataTemplate>
    <Image Name=”EntityIcon” VerticalAlignment=”Center” HorizontalAlignment=”Center”
    Source=”{Binding Path=.}” Stretch=”None”/>
    </DataTemplate>
    </xcdg:Column.CellContentTemplate>
    </xcdg:Column>

    The grid as a whole has an ItemSource that is an ObservableCollection with an AssociatedIcon property that returns an ImageSource. The image displays, but after getting a list that extends past the end of the visual grid and scrolling up and down, I get the following error (stack trace follows).

    Any ideas on what is wrong??

    at MS.Utility.FrugalObjectList`1.get_Item(Int32 index)
    at System.Windows.Freezable.GetChangeHandlersAndInvalidateSubProperties(EventStorage& calledHandlers)
    at System.Windows.Freezable.FireChanged()
    at System.Windows.Freezable.WritePostscript()
    at System.Windows.Media.Imaging.BitmapSource.remove_DownloadCompleted(EventHandler value)
    at System.Windows.Controls.Image.OnSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
    at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
    at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
    at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
    at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)
    at System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp)
    at System.Windows.StyleHelper.InvalidatePropertiesOnTemplateNode(DependencyObject container, FrameworkObject child, Int32 childIndex, FrugalStructList`1& childRecordFromChildIndex, Boolean isDetach, FrameworkElementFactory templateRoot)
    at System.Windows.StyleHelper.ClearTemplateChain(HybridDictionary[] instanceData, FrameworkElement feContainer, FrameworkContentElement fceContainer, List`1 templateChain, FrameworkTemplate oldFrameworkTemplate)
    at System.Windows.StyleHelper.ClearGeneratedSubTree(HybridDictionary[] instanceData, FrameworkElement feContainer, FrameworkContentElement fceContainer, FrameworkTemplate oldFrameworkTemplate)
    at System.Windows.StyleHelper.DoTemplateInvalidations(FrameworkElement feContainer, FrameworkTemplate oldFrameworkTemplate)
    at System.Windows.Controls.ContentPresenter.OnTemplateChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
    at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
    at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
    at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
    at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)
    at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, OperationType operationType, Boolean isInternal)
    at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
    at System.Windows.Controls.ContentPresenter.OnContentChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
    at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
    at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
    at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
    at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)
    at System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp)
    at System.Windows.Data.BindingExpression.Invalidate(Boolean isASubPropertyChange)
    at System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange)
    at System.Windows.Data.BindingExpression.ScheduleTransfer(Boolean isASubPropertyChange)
    at MS.Internal.Data.ClrBindingWorker.NewValueAvailable(Boolean dependencySourcesChanged, Boolean initialValue, Boolean isASubPropertyChange)
    at MS.Internal.Data.PropertyPathWorker.UpdateSourceValueState(Int32 k, ICollectionView collectionView, Object newValue, Boolean isASubPropertyChange)
    at MS.Internal.Data.PropertyPathWorker.OnDependencyPropertyChanged(DependencyObject d, DependencyProperty dp, Boolean isASubPropertyChange)
    at MS.Internal.Data.ClrBindingWorker.OnSourceInvalidation(DependencyObject d, DependencyProperty dp, Boolean isASubPropertyChange)
    at System.Windows.Data.BindingExpression.HandlePropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
    at System.Windows.Data.BindingExpression.OnPropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
    at System.Windows.DependentList.InvalidateDependents(DependencyObject source, DependencyPropertyChangedEventArgs sourceArgs)
    at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
    at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)
    at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, OperationType operationType, Boolean isInternal)
    at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
    at Xceed.Wpf.DataGrid.Cell.set_ActualContent(Object value)
    at Xceed.Wpf.DataGrid.Cell.OnContentChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
    at System.Windows.PropertyChangedCallback.Invoke(DependencyObject d, DependencyPropertyChangedEventArgs e)
    at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
    at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
    at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
    at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDefer

    Imported from legacy forums. Posted by Lori (had 1278 views)

    Xceed Support
    Member
    Post count: 5658

    We already made several tests using Images, and up to now, we never experienced this behavior…

    Would it be possible to send us a repro application for this issue?

    If you can, you can send it to support@xceedsoft.com… Don’t forget to reference this forum thread and indicate it is for Marc.

    Imported from legacy forums. Posted by Marcus [Xceed] (had 327 views)

    User (Old forums)
    Member
    Post count: 23064

    Hi Marc,

    I sent a repro solution to support@xceedsoft.com late yesterday.

    Imported from legacy forums. Posted by Lori (had 375 views)

    User (Old forums)
    Member
    Post count: 23064

    Could someone confirm that the repro was received and routed to the appropriate person?

    Imported from legacy forums. Posted by Lori (had 879 views)

    Xceed Support
    Member
    Post count: 5658

    Yes, the repro was received. We are currently working on this issue. It is a little more complicated than expected.

    Imported from legacy forums. Posted by CharlesB (had 464 views)

    User (Old forums)
    Member
    Post count: 23064

    Is there a potential for a workaround using the current version of the grid?

    Imported from legacy forums. Posted by Lori (had 637 views)

    User (Old forums)
    Member
    Post count: 23064

    This has become a VERY hot item for us now. I need to know if there is a workaround that can be implemented using the current version of the grid.

    Imported from legacy forums. Posted by Lori (had 342 views)

    User (Old forums)
    Member
    Post count: 23064

    We found out what the issue was, and it was an issue with the Framework (fixed in the framework 3.5). We just sent you a work around for it, please let us know if it helped!

    Imported from legacy forums. Posted by Matt (had 335 views)

    User (Old forums)
    Member
    Post count: 23064

    The workaround worked great – thanks so much!

    Imported from legacy forums. Posted by Lori (had 6548 views)

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.