dwmkerr / consolecontrol

ConsoleControl is a C# class library that lets you embed a console in a WinForms or WPF application.
MIT License
726 stars 170 forks source link

WPF Sample doesn't work #5

Closed vladano closed 5 years ago

vladano commented 10 years ago

Excellent Windows Forms Sample, but WPF Sample doesn't work on my computer Win7 SP1 x64.

Best Regards

gandalf1819 commented 7 years ago

WPF Sample not working properly. Can you please look into this?

dwmkerr commented 7 years ago

Can you give more details of the issue- error message or screenshot or something?

vladano commented 7 years ago

When I start ConsoleControlSample.WPF, only button StartCommandPromptCommand and ClearOutputCommand buttons are working. After some time of testing different button on the form, I got error below:

at System.Windows.Documents.ValidationHelper.VerifyPosition(ITextContainer container, ITextPointer position, String paramName) at System.Windows.Documents.TextPointer.CompareTo(TextPointer position) at ConsoleControl.WPF.ConsoleControl.richTextBoxConsole_KeyDown(Object sender, KeyEventArgs e) in C:\brisi\consolecontrol-master\source\ConsoleControl.WPF\ConsoleControl.xaml.cs:line 101 at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args) at System.Windows.Input.InputManager.ProcessStagingArea() at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport) at System.Windows.Interop.HwndKeyboardInputProvider.ProcessKeyAction(MSG& msg, Boolean& handled) at System.Windows.Interop.HwndSource.CriticalTranslateAccelerator(MSG& msg, ModifierKeys modifiers) at System.Windows.Interop.HwndSource.OnPreprocessMessage(Object param) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler) at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs) at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg) at System.Windows.Interop.HwndSource.OnPreprocessMessageThunk(MSG& msg, Boolean& handled) at System.Windows.Interop.ThreadMessageEventHandler.Invoke(MSG& msg, Boolean& handled) at System.Windows.Interop.ComponentDispatcherThread.RaiseThreadMessage(MSG& msg) at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame) at System.Windows.Application.RunDispatcher(Object ignore) at System.Windows.Application.RunInternal(Window window) at ConsoleControlSample.WPF.App.Main() at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart()

vladano commented 7 years ago

Additional info for the previous message: This time I compiled sample on os windows 10 Pro x64

dwmkerr commented 7 years ago

Thanks for the info, I'll take a look in the next week, super busy at work at the moment so it'll be a few days

dwmkerr commented 5 years ago

Just fixed, will release shortly!