c# 4.0 - How do i resolve the XamlParserException in WPF -


i'm getting xamlparserexception when try load application. exception not consistent.

please me in this.

here stacktrace of exception.

system.windows.markup.xamlparseexception: 'system.windows.baml2006.typeconvertermarkupextension' の値の指定時に例外がスローされました。 ---> system.argumentoutofrangeexception: インデックスが範囲を超えています。負でない値で、コレクションのサイズよりも小さくなければなりません。 パラメーター名: index    @ system.throwhelper.throwargumentoutofrangeexception()    @ system.collections.generic.list`1.get_item(int32 index)    @ system.windows.media.imaging.bitmapdecoder.setupframes(bitmapdecoder decoder, readonlycollection`1 frames)    @ system.windows.media.imaging.bitmapdecoder.initialize(bitmapdecoder decoder)    @ system.windows.media.imaging.bitmapdecoder..ctor(safemilhandle decoderhandle, bitmapdecoder decoder, uri baseuri, uri uri, stream stream, bitmapcreateoptions createoptions, bitmapcacheoption cacheoption, boolean insertindecodercache, boolean isoriginalwritable, stream uristream, unmanagedmemorystream unmanagedmemorystream, safefilehandle safefilehandle)    @ system.windows.media.imaging.pngbitmapdecoder..ctor(safemilhandle decoderhandle, bitmapdecoder decoder, uri baseuri, uri uri, stream stream, bitmapcreateoptions createoptions, bitmapcacheoption cacheoption, boolean insertindecodercache, boolean originalwritable, stream uristream, unmanagedmemorystream unmanagedmemorystream, safefilehandle safefilehandle)    @ system.windows.media.imaging.bitmapdecoder.createfromuriorstream(uri baseuri, uri uri, stream stream, bitmapcreateoptions createoptions, bitmapcacheoption cacheoption, requestcachepolicy uricachepolicy, boolean insertindecodercache)    @ system.windows.media.imaging.bitmapframe.createfromuriorstream(uri baseuri, uri uri, stream stream, bitmapcreateoptions createoptions, bitmapcacheoption cacheoption, requestcachepolicy uricachepolicy)    @ system.windows.media.imagesourceconverter.convertfrom(itypedescriptorcontext context, cultureinfo culture, object value)    @ system.windows.baml2006.typeconvertermarkupextension.providevalue(iserviceprovider serviceprovider)    @ ms.internal.xaml.runtime.clrobjectruntime.callprovidevalue(markupextension me, iserviceprovider serviceprovider)    --- 内部例外スタック トレースの終わり ---    @ system.windows.markup.wpfxamlloader.load(xamlreader xamlreader, ixamlobjectwriterfactory writerfactory, boolean skipjournaledproperties, object rootobject, xamlobjectwritersettings settings, uri baseuri)    @ system.windows.markup.wpfxamlloader.loadbaml(xamlreader xamlreader, boolean skipjournaledproperties, object rootobject, xamlaccesslevel accesslevel, uri baseuri)    @ system.windows.markup.xamlreader.loadbaml(stream stream, parsercontext parsercontext, object parent, boolean closestream)    @ system.windows.application.loadcomponent(object component, uri resourcelocator)    @ pensoft.printsubmenucontrol.initializecomponent()    @ pensoft.printsubmenucontrol..ctor(mainwindow parent)    @ pensoft.printsubmenucontrol..ctor(printeventargs args, mainwindow parent)    @ pensoft.mainwindow.createprintcontrol(int32 id)    @ pensoft.mainwindow.createsubmenucontrol(squaremenu squaremenu, subsquaremenu submenutype)    @ pensoft.classicmenucontrol.initlargeclassicmenu()    @ pensoft.mainwindow.window_loaded(object sender, routedeventargs e)    @ system.windows.routedeventhandlerinfo.invokehandler(object target, routedeventargs routedeventargs)    @ system.windows.eventroute.invokehandlersimpl(object source, routedeventargs args, boolean reraised)    @ system.windows.uielement.raiseeventimpl(dependencyobject sender, routedeventargs args)    @ system.windows.uielement.raiseevent(routedeventargs e)    @ system.windows.broadcasteventhelper.broadcastevent(dependencyobject root, routedevent routedevent)    @ system.windows.broadcasteventhelper.broadcastloadedevent(object root)    @ ms.internal.loadedorunloadedoperation.dowork()    @ system.windows.media.mediacontext.fireloadedpendingcallbacks()    @ system.windows.media.mediacontext.fireinvokeonrendercallbacks()    @ system.windows.media.mediacontext.rendermessagehandlercore(object resizedcompositiontarget)    @ system.windows.media.mediacontext.rendermessagehandler(object resizedcompositiontarget)    @ system.windows.media.mediacontext.resize(icompositiontarget resizedcompositiontarget)    @ system.windows.interop.hwndtarget.onresize()    @ system.windows.interop.hwndtarget.handlemessage(windowmessage msg, intptr wparam, intptr lparam)    @ system.windows.interop.hwndsource.hwndtargetfiltermessage(intptr hwnd, int32 msg, intptr wparam, intptr lparam, boolean& handled)    @ ms.win32.hwndwrapper.wndproc(intptr hwnd, int32 msg, intptr wparam, intptr lparam, boolean& handled)    @ ms.win32.hwndsubclass.dispatchercallbackoperation(object o)    @ system.windows.threading.exceptionwrapper.internalrealcall(delegate callback, object args, int32 numargs)    @ ms.internal.threading.exceptionfilterhelper.trycatchwhen(object source, delegate method, object args, int32 numargs, delegate catchhandler) 

any answers appreciated.

thanks, harish.

an xamlparseexception wraps exception, caused illegal operation in xaml. in case, it's argumentoutofrangeexception. it's message translates "index out of range. non-negative value, must less size of collection".

the stack trace points system.collections.generic.list1.get_item(int32 index). somewhere in xaml, you're referencing list illegal index.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -