Search found 11 matches

  • 1
  • 2
by daniilch
31 Jan 2023, 07:34
Forum: General Discussion
Replies: 5
Views: 4012

Re: NoesisApp.Behavior gets detached when manipulating UI from code

Sure, I filed a bug: https://www.noesisengine.com/bugs/view.php?id=2498 By the way, I've found a workaround: I can get AttachableObject.AttachmentProperty with reflection and use DependencyProperty.GetMetadata to replace original property change callback with my own. I wrapped this logic in a Dispos...
by daniilch
30 Jan 2023, 16:44
Forum: General Discussion
Replies: 5
Views: 4012

Re: NoesisApp.Behavior gets detached when manipulating UI from code

As it happens in WPF, the behavior is only Detached when it is removed from the associated object, or when the associated object is destroyed. As you can see in my sample code, it's not exactly like that. In WPF I can temporarily remove object from visual tree and add it back, add behaviours on thi...
by daniilch
26 Jan 2023, 14:37
Forum: General Discussion
Replies: 5
Views: 4012

NoesisApp.Behavior gets detached when manipulating UI from code

Hello, recently I've stumbled on a following problem: I have an ItemsControl in my UI and I wish to sort items in it. Items are created and added/removed from ItemsControl.Items from code-behind. Some items do have attached Behaviors. When sorting items I naturally have to remove and insert them to ...
by daniilch
13 Dec 2022, 06:59
Forum: General Discussion
Replies: 3
Views: 1202

Re: DependencyProperty.AddOwner registers multiple callbacks for single type

Sure, I filed a bug: https://www.noesisengine.com/bugs/view.php?id=2476

By the way if I find a bug is it better to create a forum post beforehand, or maybe I may create an issue in bugtracker directly?
by daniilch
08 Dec 2022, 11:57
Forum: General Discussion
Replies: 3
Views: 1202

DependencyProperty.AddOwner registers multiple callbacks for single type

Hello. I think, I found a bug in DependencyProperty.AddOwner implementation. Lets create two UserControls: UserControlA and UserControlB . UserControlA defines a dependency property Value with a default value and a change callback. UserControlB reuses this property with AddOwner , redefining its own...
by daniilch
15 Nov 2022, 16:24
Forum: General Discussion
Replies: 6
Views: 2844

Re: Unable to set binding with PolyLineSegment.Points property

Oh, you are right. Sorry, I was so sure that the Binding should work with any collection type, that didn't check it in WPF. Shame on me. Thanks for your time.
by daniilch
14 Nov 2022, 07:37
Forum: General Discussion
Replies: 6
Views: 2844

Re: Unable to set binding with PolyLineSegment.Points property

Yes, your code sample does work correctly. However, you use binding to PointCollection in your viewModel. I guess, collection binding should work with any collection type? Changing you sample code to the following one leads to binding fail: public class VM { public List<Noesis.Point> Points { get; }...
by daniilch
11 Nov 2022, 15:16
Forum: General Discussion
Replies: 6
Views: 2844

Re: Unable to set binding with PolyLineSegment.Points property

Addendum: by the way, I think there's a mistake somewhere in your SWIG configuration for PolyLineSegment class, because it generates a constructor with the following signature: public PolyLineSegment(ref Point points, uint numPoints, bool isStroked) which (I guess) is generated from C++ class receiv...
by daniilch
11 Nov 2022, 15:07
Forum: General Discussion
Replies: 6
Views: 2844

Unable to set binding with PolyLineSegment.Points property

Hello. I'm trying to implement sort of a painting utility, which allows a user to draw continuous line with mouse. To implement that I'm creating a viewmodel with `ICollection<Noesis.Point> Points` property and bind it in xaml in following way: <DataTemplate DataType="{x:Type vm:PolyLineViewMod...
by daniilch
10 Jun 2022, 13:51
Forum: General Discussion
Replies: 3
Views: 2766

Re: Crash when using EventManager in Unity editor play mode

our library provides a callback, Noesis.GUI.SetSoftwareKeyboardCallback()
Oh, that's neat! Thank you, I'll try to use that one. Sure, I'll file a bug.

UPD: done - https://www.noesisengine.com/bugs/view.php?id=2359
  • 1
  • 2