We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

'System.Windows.Documents.Run' is not a Visual or Visual3D."

Hello!

After updating to release 21.1.39 I get the exception:  'System.Windows.Documents.Run' is not a Visual or Visual3D." when selecting an item from an AutoCompleteItemsSource. When reverting back to 21.1.38 the exception dissapears. What could be causing this? It seems something in your control has changed that causes the error, since my code is unchanged.

Kind regards,


Niels van Strien


21 Replies 1 reply marked as answer

HB Helmut Basler April 18, 2023 05:14 AM UTC

Hello,

similar to me.

I dynamical added Views via Scrollviewer and ListBox, By clicking on ButtonAdv in this views i get the exception 'System.Windows.Documents.Run' is not a Visual or Visual3D." Clicking on ButtonAdv outside the labeltext works as expected.

I revert to 21.1.38.


mfG

Helmut Basler



AK Arunachalam Kandasamy Raja Syncfusion Team April 20, 2023 04:25 AM UTC

Hi Strien,

 

We have fixed the reported issue "SfTextBoxExt throws System.InvalidOperationException: 'System.Windows.Documents.Run' is not a Visual or Visual3D" in WPF.

 

 

Kindly get the fixed Assembly and Nuget using the link provided below. If you require any further information, please do not hesitate to let us know. This fix will be included on May 9th, 2023. We appreciate your patience until then.

 

 

Assembly version: 21.1.35

 

 

Assembly Link: https://syncfusion.com/Installs/support/patch/21.1.35/1116105/T456007/SyncfusionPatch_21.1.35_1116105_4192023060922438_T456007.zip

 

 

Nuget :

https://syncfusion.com/Installs/support/patch/21.1.35/1116105/T456007/SyncfusionNuget_21.1.35_1116105_4192023060922438_T456007.zip

 

 

Disclaimer:

Please note that we have created this patch for version 21.1.35 specifically, to resolve the issue reported in this incident. If you have received other patches for the same version for other products, please apply all patches in the order received.

 

 

Note: Please refer to the below link to apply the custom assembly

 

https://www.syncfusion.com/kb/8279/how-to-apply-the-custom-assemblies-when-configured-the-project-with-syncfusion-nuget

 

Note: Please clear the NuGet cache, before using the latest one.

 

https://www.syncfusion.com/kb/6987/how-to-clear-nuget-cache

 

 

Regards,

Arunachalam K


Marked as answer

NV NM van Strien April 20, 2023 09:37 AM UTC

Hi Arunachalam,


Thank you so much for looking into this.  I will wait for the new release on May 9th.

Kind regards,


Niels van Strien

ps: If you have anything on the other issue I am experiencing, I would appreciate it,

https://www.syncfusion.com/forums/181775/designer-not-showing-preview-in-vs2022


Note that Microsoft is also going to look into that issue.



AK Arunachalam Kandasamy Raja Syncfusion Team April 21, 2023 02:11 PM UTC

Hi Strien,

 

Thank you for the details. We will let you know once the changes was included. 

 

Regarding the WPF ticket please follow the same ticket. The respective team will validate and update it.

 

Regards,

Arunachalam K



AK Aleksandar Kirilov April 27, 2023 07:36 AM UTC

Hello,


This issue happens also in my solution, after updating to the latest version, even without having an interaction with syncfusion controls.


I use standard windows System.Windows.Controls.Menu, in combination with different SfTextBoxExt​. Clicking on some of the MenuItem ​throws the exception, which probably is somehow related to the syncfusion controls present in the visual tree.


I hope the next release would fix this also.


Regards,

Aleksandar




NV NM van Strien April 27, 2023 03:57 PM UTC

I have downgraded to 21.1.35  and installed the patch provided on this page. This works for me.


Kind regards,


Niels van Strien



MP Michael Pillwax May 22, 2023 02:33 PM UTC

This is still happening on 2.1.38, 2.1.39

This is the stack trace:


   at MS.Internal.Media.VisualTreeUtils.AsVisual(DependencyObject element, Visual& visual, Visual3D& visual3D)

   at MS.Internal.Media.VisualTreeUtils.AsNonNullVisual(DependencyObject element, Visual& visual, Visual3D& visual3D)

   at System.Windows.Media.VisualTreeHelper.GetParent(DependencyObject reference)

   at Syncfusion.Windows.Controls.Input.SfTextBoxExt.FindVisualParent[parentItem](DependencyObject obj)

   at Syncfusion.Windows.Controls.Input.SfTextBoxExt.MainWindow_PreviewMouseLeftButtonDown(Object sender, MouseButtonEventArgs e)

   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)

   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.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)

   at System.Windows.UIElement.OnPreviewMouseDownThunk(Object sender, MouseButtonEventArgs e)

   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)

   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.ContentElement.RaiseTrustedEvent(RoutedEventArgs args)

   at System.Windows.Input.InputManager.ProcessStagingArea()

   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)

   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)

   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)

   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)

   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)


Had to revert back to 2.1.38 after having issues with the DataGrid and DetailsView throwing an exception on 21.2.



AK Arunachalam Kandasamy Raja Syncfusion Team May 23, 2023 06:57 AM UTC

Hi Michael,

 

We have already fixed the issue and moved to the latest version 21.2.4 which is available at ( https://www.nuget.org/ ).  Kindly ensure that you are using the latest version. However, if you still require versions 21.1.38 and 21.1.39 with this fix, please elaborate on the reasons and necessities for using these specific versions.

 

Regards,

Arunachalam K



PI Pablo Islas June 19, 2023 07:01 PM UTC

This still seems to be happening in 21.2.10


System.InvalidOperationException

HResult=0x80131509

Message='System.Windows.Documents.Run' is not a Visual or Visual3D.

Source=PresentationCore

StackTrace:

at MS.Internal.Media.VisualTreeUtils.AsVisual(DependencyObject element, Visual& visual, Visual3D& visual3D)

at System.Windows.Media.VisualTreeHelper.GetParent(DependencyObject reference)

at Syncfusion.Windows.Controls.Input.SfTextBoxExt.FindVisualParent[parentItem](DependencyObject obj)

at Syncfusion.Windows.Controls.Input.SfTextBoxExt.MainWindow_PreviewMouseWheel(Object sender, MouseWheelEventArgs e)

at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)

at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)

at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)

at System.Windows.ContentElement.RaiseTrustedEvent(RoutedEventArgs args)

at System.Windows.Input.InputManager.ProcessStagingArea()

at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)

at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)

at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)

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 MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)

at MS.Win32.UnsafeNativeMethods.DispatchMessage(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 MMI.App.Main()




AK Arunachalam Kandasamy Raja Syncfusion Team June 20, 2023 01:16 PM UTC

Hi Pablo,

 

After conducting tests with version 21.2.10, we were unable to reproduce the reported scenario on our end. In order to better understand the root cause and provide an effective resolution, we kindly request that you provide more detailed information about the scenario in which our control was used.

 

To assist you further, it would be highly beneficial if you could share a simple sample that demonstrates the issue, along with the replication steps. This will enable us to closely analyze the problem and offer a more accurate solution. Please let us know if you have any other queries.

 

Regards,

Arunachalam K



PI Pablo Islas replied to Arunachalam Kandasamy Raja June 21, 2023 06:03 PM UTC

Installed 22.1.34 and verified the issue still exists. It appears to be related to the runs that are created when setting TextHighlightMode, typing something that causes a highlight, and then simply scrolling the mouse wheel with multiple items...I do have to scroll the wheel quickly up and down for a bit...if I just do a small scroll, it works sometimes and not others.


            <sf:SfTextBoxExt Grid.Column="0"

                             Grid.Row="0"

                             Margin="2"

                             VerticalContentAlignment="Center"

                             AutoCompleteMode="Suggest"

                             SuggestionMode="Contains"

                             MultiSelectMode="None"

                             ShowClearButton="True"

                             ShowDropDownButton="True"

                             ShowSuggestionsOnFocus="True"

                             SearchItemPath="DisplayText"

                             ValueMemberPath="ARMKEY"

                             Text="{Binding SearchCustomerNotesValue}"

                             SelectedItem="{Binding SelectedSearchBarData, Mode=TwoWay}"

                             AutoCompleteSource="{Binding SearchBarData}">

                <!--

                TODO JPI: Add these back to SfTextBoxExt when sf fixes the issues with mouse wheel scrolling...

                TextHighlightMode="MultipleOccurrence"

                HighlightedTextColor="Yellow"

                -->

                <sf:SfTextBoxExt.AutoCompleteItemTemplate>

                    <DataTemplate>

                        <StackPanel Orientation="Horizontal">

                            <TextBlock FontWeight="Bold" Text="{Binding DisplayText}" Margin="5,2"/>

                            <sf:SfBadge Shape="Oval"

                                        Content="{Binding NumberOfNotes}"

                                        Visibility="{Binding NumberOfNotes, Converter={StaticResource IntToVisibilityConverter}}">

                            </sf:SfBadge>

                        </StackPanel>

                    </DataTemplate>

                </sf:SfTextBoxExt.AutoCompleteItemTemplate>

            </sf:SfTextBoxExt>



AK Arunachalam Kandasamy Raja Syncfusion Team June 22, 2023 01:23 PM UTC

Hi Pablo,

 

Thank you for providing the code snippet. We have thoroughly examined it and attempted to replicate the reported issue using the provided steps. However, our attempts to reproduce the problem were unsuccessful.

 

In order to further investigate the issue, we kindly request you review the attached sample and make any necessary modifications to ensure the problem can be replicated. Once you have made the adjustments, please share the updated sample with us. This will greatly assist us in conducting a more in-depth investigation.

 

Thank you for your cooperation.


Attachment: TextBoxExtWPFF181833_5c854bb7.zip


PI Pablo Islas replied to Arunachalam Kandasamy Raja June 22, 2023 02:38 PM UTC

Untitled.png I actually am able to reproduce this issue using your example.


1.) Start the example

2.) Place the cursor over one of the highlighted names

3.) scroll the mouse wheel quickly up and down


I would be happy to do a remote view and show someone how to reproduce if needed?



PI Pablo Islas June 26, 2023 05:30 PM UTC

Hi, I just wanted to touch base and see if there is anything else you might need from me?



PI Pablo Islas replied to Arunachalam Kandasamy Raja July 5, 2023 03:16 PM UTC

Hi, I just wanted to touch base and see if there is anything else you might need from me? 



AJ AhamedAliNishad JahirHussain Syncfusion Team July 6, 2023 12:47 PM UTC

Hi Pablo,

 

Sorry for the inconvenience,

 

We are able to reproduce the reported issue in our provided sample. Currently, we are analyzing the issue at the source level and will update the details on July 10, 2023. We appreciate your patience until then.

 

Regards,

Ahamed Ali Nishad.



AJ AhamedAliNishad JahirHussain Syncfusion Team July 10, 2023 01:10 PM UTC

 

Hi Pablo,

 

We have fixed the reported issue "System.InvalidOperationException occurs when scrolling the items in SfTextboxExt through the mouse wheel".Kindly get the fixed Assembly and Nuget using the link provided below. If you require any further information, please don't hesitate to contact us. Fix for the reported issue will be included in our upcoming weekly release on July 18, 2023. We appreciate your patience until then.

 

Assembly version: 22.1.34

 

Assembly Link:  https://syncfusion.com/Installs/support/patch/22.1.34/181833/F181833/SyncfusionPatch_22.1.34_181833_7102023083612441_F181833.zip

 

Nuget :  https://syncfusion.com/Installs/support/patch/22.1.34/181833/F181833/SyncfusionNuget_22.1.34_181833_7102023083612441_F181833.zip

 

Disclaimer:

 

Please note that we have created this patch for version 22.1.34 specifically, to resolve the issue reported in this. If you have received other patches for the same version for other products, please apply all patches in the order received.

 

Note: Please refer to the below link to apply the custom assembly

 

https://www.syncfusion.com/kb/8279/how-to-apply-the-custom-assemblies-when-configured-the-project-with-syncfusion-nuget

 

Note: Please clear the NuGet cache, before using the latest one.

 

https://www.syncfusion.com/kb/6987/how-to-clear-nuget-cache

 

Regards,

Ahamed Ali Nishad



PI Pablo Islas replied to AhamedAliNishad JahirHussain July 10, 2023 02:40 PM UTC

Great thank you very much.



AJ AhamedAliNishad JahirHussain Syncfusion Team July 18, 2023 01:00 PM UTC

Hi Pablo,

 

Thanks for your patience. 

 

We have included the fix in our latest weekly NuGet release v22.1.39 which is available for download

https://www.nuget.org/ ). We thank you for your support and appreciate your patience in waiting for this update. Please get in touch with us if you would require any further assistance.

 

Regards,

Ahamed Ali Nishad.



PI Pablo Islas replied to AhamedAliNishad JahirHussain July 18, 2023 01:15 PM UTC

Thank you, I can confirm that the latest nuget does fix the issue I was having. Much appreciated!



PR Preethi Rajakandham Syncfusion Team July 19, 2023 06:39 AM UTC

Hi Pablo Islas,

You're welcome. We are glad to know that the reported problem has been resolved at your end. Please let us know if you have any further queries on this. We are happy to help.

Regards,

Preethi R


Loader.
Up arrow icon