Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
380
Infragistics Images in the DefaultStyles directory do not work
posted

In order to override some of the control themes for the WPF controls, I added the existing theme files and the images from the "%Program Files%\Infragistics\NetAdvantage 2009.2\WPF\DefaultStyles\" directory to my solution. However, I got the exception below. It turns out the images that are present in the installation directory do not work. I cannot see them using "Windows Picture and Fax Viewer" or Paint.Net. Other PNGs or BMPs that are from other programs or from the internet have no issues loaded in these programs.

 

Has anyone else reported this problem? The version for my WPF Infragistics assemblies are 9.2.20092.2049 Feel free to contact me if you need additional information.

 

Here are the exception details. Occurs when the Custom Filter for the XamDataGrid is launched:

Error System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Windows.Markup.XamlParseException: Cannot convert string 'Images/IconAdd.png' in attribute 'Source' to object of type 'System.W
   --- End of inner exception stack trace ---
   at System.Windows.Media.Imaging.BitmapDecoder.SetupDecoderFromUriOrStream(Uri uri, Stream stream, BitmapCacheOption cacheOption, Guid& clsId, Boolean& isOriginalWritable, Stream& uriStream, UnmanagedMemoryStream& unmanagedMemoryStream, SafeFileHandle& safeFilehandle)
   at System.Windows.Media.Imaging.BitmapDecoder.CreateFromUriOrStream(Uri baseUri, Uri uri, Stream stream, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption, RequestCachePolicy uriCachePolicy, Boolean insertInDecoderCache)
   at System.Windows.Media.Imaging.BitmapFrame.CreateFromUriOrStream(Uri baseUri, Uri uri, Stream stream, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption, RequestCachePolicy uriCachePolicy)
   at System.Windows.Media.ImageSourceConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
   at System.ComponentModel.TypeConverter.ConvertFromString(ITypeDescriptorContext context, CultureInfo culture, String text)
   at System.Windows.Markup.XamlTypeMapper.ParseProperty(Object targetObject, Type propType, String propName, Object dpOrPiOrFi, ITypeDescriptorContext typeContext, ParserContext parserContext, String value, Int16 converterTypeId)
   --- End of inner exception stack trace ---
   at System.Windows.Markup.XamlParseException.ThrowException(String message, Exception innerException, Int32 lineNumber, Int32 linePosition, Uri baseUri, XamlObjectIds currentXamlObjectIds, XamlObjectIds contextXamlObjectIds, Type objectType)
   at System.Windows.Markup.XamlParseException.ThrowException(ParserContext parserContext, Int32 lineNumber, Int32 linePosition, String message, Exception innerException)
   at System.Windows.Markup.XamlTypeMapper.ParseProperty(Object targetObject, Type propType, String propName, Object dpOrPiOrFi, ITypeDescriptorContext typeContext, ParserContext parserContext, String value, Int16 converterTypeId)
   at System.Windows.Markup.OptimizedTemplateContent.ParseDependencyProperty(String attribValue, Int16 attributeId, Int16 converterTypeId, DependencyProperty& dp, Object& propertyValue)
   at System.Windows.Markup.OptimizedTemplateContent.LookForShareableRecord(BamlRecord bamlRecord, DependencyProperty& dp, Object& dpValue)
   at System.Windows.Markup.OptimizedTemplateContent.ReadPotentiallyShareableRecord(BamlRecord bamlRecord)
   at System.Windows.Markup.OptimizedTemplateContent.ReadRecord(BamlRecord bamlRecord)
   at System.Windows.Markup.OptimizedTemplateContent.AddContentRecord(BamlRecord bamlRecord)
   at System.Windows.Markup.TemplateBamlRecordReader.AddContentRecord(BamlRecord bamlRecord)
   at System.Windows.Markup.TemplateBamlRecordReader.ReadRecord(BamlRecord bamlRecord)
   at System.Windows.Markup.BamlRecordReader.Read(Boolean singleRecord)
   at System.Windows.Markup.TemplateTreeBuilderBamlTranslator.ParseFragment()
   at System.Windows.Markup.TreeBuilder.Parse()
   at System.Windows.Markup.XamlTemplateSerializer.ConvertBamlToObject(BamlRecordReader reader, BamlRecord bamlRecord, ParserContext context)
   at System.Windows.Markup.BamlRecordReader.ReadElementStartRecord(BamlElementStartRecord bamlElementRecord)
   at System.Windows.Markup.StyleBamlRecordReader.ReadElementStartRecord(BamlElementStartRecord bamlElementRecord)
   at System.Windows.Markup.BamlRecordReader.ReadRecord(BamlRecord bamlRecord)
   at System.Windows.Markup.StyleBamlRecordReader.ReadRecord(BamlRecord bamlRecord)
   at System.Windows.Markup.BamlRecordReader.Read(Boolean singleRecord)
   at System.Windows.Markup.StyleTreeBuilderBamlTranslator.ParseFragment()
   at System.Windows.Markup.TreeBuilder.Parse()
   at System.Windows.Markup.XamlStyleSerializer.ConvertBamlToObject(BamlRecordReader reader, BamlRecord bamlRecord, ParserContext context)
   at System.Windows.Markup.BamlRecordReader.ReadElementStartRecord(BamlElementStartRecord bamlElementRecord)
   at System.Windows.Markup.BamlRecordReader.ReadRecord(BamlRecord bamlRecord)
   at System.Windows.Markup.BamlRecordReader.ReadElement(Int64 startPosition, XamlObjectIds contextXamlObjectIds, Object dictionaryKey)
   at System.Windows.ResourceDictionary.CreateObject(Int32 valuePosition, Object key)
   at System.Windows.ResourceDictionary.RealizeDeferContent(Object key, Object& value, Boolean& canCache)
   at System.Windows.ResourceDictionary.GetValueWithoutLock(Object key, Boolean& canCache)
   at System.Windows.ResourceDictionary.GetValue(Object key, Boolean& canCache)
   at System.Windows.ResourceDictionary.GetValueWithoutLock(Object key, Boolean& canCache)
   at System.Windows.ResourceDictionary.GetValue(Object key, Boolean& canCache)
   at System.Windows.ResourceDictionary.GetValueWithoutLock(Object key, Boolean& canCache)
   at System.Windows.ResourceDictionary.GetValue(Object key, Boolean& canCache)
   at System.Windows.ResourceDictionary.GetValueWithoutLock(Object key, Boolean& canCache)
   at System.Windows.ResourceDictionary.GetValue(Object key, Boolean& canCache)
   at System.Windows.ResourceDictionary.GetValueWithoutLock(Object key, Boolean& canCache)
   at System.Windows.ResourceDictionary.GetValue(Object key, Boolean& canCache)
   at System.Windows.ResourceDictionary.GetValueWithoutLock(Object key, Boolean& canCache)
   at System.Windows.ResourceDictionary.GetValue(Object key, Boolean& canCache)
   at System.Windows.ResourceDictionary.GetValueWithoutLock(Object key, Boolean& canCache)
   at System.Windows.ResourceDictionary.GetValue(Object key, Boolean& canCache)
   at System.Windows.ResourceDictionary.FetchResource(Object resourceKey, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference, Boolean& canCache)
   at System.Windows.Application.FindResourceInternal(Object resourceKey, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference)
   at System.Windows.FrameworkElement.FindResourceInternal(FrameworkElement fe, FrameworkContentElement fce, DependencyProperty dp, Object resourceKey, Object unlinkedParent, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference, DependencyObject boundaryEl
   at System.Windows.FrameworkElement.FindImplicitStyleResource(FrameworkElement fe, Object resourceKey, Object& source)
   at System.Windows.FrameworkElement.GetRawValue(DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry& entry)
   at System.Windows.FrameworkElement.EvaluateBaseValueCore(DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry& newEntry)
   at System.Windows.DependencyObject.EvaluateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry newEntry, OperationType operationType)
   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.FrameworkElement.UpdateStyleProperty()
   at System.Windows.FrameworkElement.OnInitialized(EventArgs e)
   at System.Windows.FrameworkElement.TryFireInitialized()
   at System.Windows.FrameworkElement.ChangeLogicalParent(DependencyObject newParent)
   at MS.Internal.FrameworkObject.ChangeLogicalParent(DependencyObject newParent)
   at System.Windows.FrameworkElement.AddLogicalChild(Object child)
   at System.Windows.Controls.ContentControl.OnContentChanged(Object oldContent, Object newContent)
   at Infragistics.Windows.Controls.ToolWindow.OnContentChanged(Object oldContent, Object newContent)
   at System.Windows.Controls.ContentControl.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.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.ContentControl.set_Content(Object value)
   at Infragistics.Windows.DataPresenter.FieldLayout.ShowCustomFilterSelectionControl(RecordFilter recordFilter, RecordManager recordManager)
   at Infragistics.Windows.DataPresenter.CustomFilterAction.Execute(Object parameter)
   at Infragistics.Windows.DataPresenter.RecordFilter.OnExecuteCommand(ICommand command)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)













  • 25
    Suggested Answer
    posted

    Yes. As it turns out, they moved the images into the assemblies so you need to use something like redgade reflector to pull the images out the dll files they ship.

    For whatever reason, they left images in the program files dir. I suspect for compatibility with older versions but they are broken.