بسیار سپاسگذارم
۱۱ سال و ۱۰ ماه قبل، دوشنبه ۱۳ آذر ۱۳۹۱، ساعت ۱۴:۲۴
((System.ComponentModel.ISupportInitialize)(this.axAcroPDF1)).EndInit();
Cannot create an instance of "ViewModel".
public bool IsDesignTime { get { return (Application.Current == null) || (Application.Current.GetType() == typeof(Application)); } } //Constructor public ViewModelClass() { if(IsDesignTime == false) { //Your Code } }
System.Windows.Markup.XamlParseException occurred HResult=-2146233087 Message=The invocation of the constructor on type 'DemosBrowser.ViewModels.BrowserViewModel' that matches the specified binding constraints threw an exception. Source=PresentationFramework LineNumber=0 LinePosition=0 StackTrace: at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri) at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri) at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream) at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator) at DemosBrowser.Views.Browser.InitializeComponent() in ...\pdfreport-27009\Samples\DemosBrowser\Views\Browser.xaml:line 1 at DemosBrowser.Views.Browser..ctor() in ...\pdfreport-27009\Samples\DemosBrowser\Views\Browser.xaml.cs:line 8 InnerException: System.Runtime.InteropServices.COMException HResult=-2147221164 Message=Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)) Source=System.Windows.Forms ErrorCode=-2147221164 StackTrace: at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid) at System.Windows.Forms.AxHost.CreateWithoutLicense(Guid clsid) at System.Windows.Forms.AxHost.CreateWithLicense(String license, Guid clsid) at System.Windows.Forms.AxHost.CreateInstanceCore(Guid clsid) at System.Windows.Forms.AxHost.CreateInstance() at System.Windows.Forms.AxHost.GetOcxCreate() at System.Windows.Forms.AxHost.TransitionUpTo(Int32 state) at System.Windows.Forms.AxHost.CreateHandle() at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.AxHost.EndInit() at DemosBrowser.Toolkit.AcrobatReader.AcroPdf.InitializeComponent() in ...27009\Samples\DemosBrowser\Toolkit\AcrobatReader\AcroPdf.Designer.cs:line 53 at DemosBrowser.Toolkit.AcrobatReader.AcroPdf..ctor(String fileName) in ...\pdfreport-27009\Samples\DemosBrowser\Toolkit\AcrobatReader\AcroPdf.cs:line 10 at DemosBrowser.ViewModels.BrowserViewModel.setupAcrobatReader() in ...\pdfreport-27009\Samples\DemosBrowser\ViewModels\BrowserViewModel.cs:line 253 at DemosBrowser.ViewModels.BrowserViewModel..ctor() in ...\pdfreport-27009\Samples\DemosBrowser\ViewModels\BrowserViewModel.cs:line 36 InnerException:
Error1Cannot create an instance of "Browser"....\Samples\DemosBrowser\MainWindow.xaml99DemosBrowser
Could not find a part of the path 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Pdf\AccountingBalanceSample.pdf'. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at PdfRpt.FluentInterface.DataTemplate.get_PdfStreamOutput() in ...\Lib\FluentInterface\DataTemplate.cs:line 605 at PdfRpt.PdfReportDocument.createPdf() in ...\Lib\PdfReportDocument.cs:line 119 at PdfRpt.PdfReportDocument.<runInReleaseMode>b__0(Document pdfDisposable) in ...\Lib\PdfReportDocument.cs:line 113 at PdfRpt.Core.Helper.Guard.SafeUsingBlock[TDisposable,T](TDisposable disposable, Action`1 action, Func`2 unwrapper) in ...\Lib\Core\Helper\Guard.cs:line 91 at PdfRpt.Core.Helper.Guard.SafeUsingBlock[TDisposable](TDisposable disposable, Action`1 action) in ...\Lib\Core\Helper\Guard.cs:line 58 at PdfRpt.PdfReportDocument.runInReleaseMode() in ...\Lib\PdfReportDocument.cs:line 105 at PdfRpt.PdfReportDocument.GeneratePdf(Boolean debugMode) in ...\Lib\PdfReportDocument.cs:line 87 at PdfRpt.FluentInterface.PdfReport.Generate(Action`1 pdfRptFileBuilder, Boolean debugMode) in ...\Lib\FluentInterface\PdfReport.cs:line 90 at PdfReportSamples.AccountingBalanceColumn.AccountingBalanceColumnPdfReport.CreatePdfReport() in ...\Samples\PdfReportSamples\AccountingBalanceColumn\AccountingBalanceColumnPdfReport.cs:line 17
Warning4Could not resolve this reference. Could not locate the assembly "System.Windows.Controls.Toolkit, Version=4.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.SlPdf
Warning5Could not resolve this reference. Could not locate the assembly "System.Windows.Controls.Toolkit.Internals, Version=4.0.5.0, Culture=neutral, PublicKeyToken=2c5c654d367bf4a7". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.SlPdf
Error1The type or namespace name 'BusyIndicator' could not be found (are you missing a using directive or an assembly reference?)...\Samples\SlPdf\SlPdf\obj\Debug\MainPage.g.i.cs3818SlPdf
Warning2The variable 'ex' is declared but never used...\Samples\DemosBrowser\Converters\ShellThumbnailConverter.cs4030DemosBrowser