Topic Author
Posts: 5
Joined: 20 Aug 2019, 05:48

MenuItem with TextBox possible?

14 Feb 2020, 15:00

I'm new to WPF xaml.
I want to design customized MenuItem, so I try with some snippets like this
(reference: https://stackoverflow.com/questions/154 ... ving-mouse)
I designs a ContextMenu.
            <TextBox Width="50" Height="20"/>
It works in Blend project side, which appears like this way.

But in Unity editor, the ContextMenu with TextBox-MenuItem is also displayed correctly.
But when I click the TextBox trying to input something, it encounters exception.
[noesis] Visual is not a descendant of the specified ancestor
NoesisUnity:UnityLog(Int32, String) (at Assets/NoesisGUI/Plugins/NoesisUnity.cs:116)
Noesis.NoesisGUI_PINVOKE:Visual_TransformToAncestor(HandleRef, HandleRef)
Noesis.Visual:TransformToAncestor(Visual) (at Assets/NoesisGUI/Plugins/API/Proxies/Visual.cs:87)
IME:UpdateCursor() (at Assets/NoesisGUI/Plugins/NoesisUnity.cs:191)
IME:Open(UIElement) (at Assets/NoesisGUI/Plugins/NoesisUnity.cs:156)
NoesisUnity:SoftwareKeyboard(UIElement, Boolean) (at Assets/NoesisGUI/Plugins/NoesisUnity.cs:332)
Noesis.GUI:OnSoftwareKeyboard(IntPtr, Boolean) (at Assets/NoesisGUI/Plugins/API/Core/NoesisGUI.cs:267)
Noesis.View:Noesis_View_MouseButtonDown(HandleRef, Int32, Int32, Int32)
Noesis.View:MouseButtonDown(Int32, Int32, MouseButton) (at Assets/NoesisGUI/Plugins/API/Core/View.cs:126)
NoesisView:ProcessEvent(Event, Boolean, Boolean, Boolean) (at Assets/NoesisGUI/Plugins/NoesisView.cs:936)
NoesisView:OnGUI() (at Assets/NoesisGUI/Plugins/NoesisView.cs:1045)
So I want to ask if I'm doing something wrong?
Or this is not supported yet?
I am using NoesisGUI v2.2.4 now.

Topic Author
Posts: 5
Joined: 20 Aug 2019, 05:48

Re: MenuItem with TextBox possible?

15 Feb 2020, 12:08

After trying it seems like a bug of floating TextBox?

When I uses TextBox in a ToolBar with "ToolBar.OverflowMode"="AsNeeded", I get the same exception in Unity when that TextBox is in overflow mode.
And TextBox seems working fine as I get that exception.

Who is online

Users browsing this forum: No registered users and 1 guest