These are chat archives for AvaloniaUI/Avalonia

18th
Jan 2017
Paul Cunningham
@PumpkinPaul
Jan 18 2017 08:17
Morning all - question regarding behaviour of Avalonia.Controls.TextBox. In the OnKeyDown method, Key.Enter is always handled no matter what the setting of 'AcceptsReturn' - this means that if I add an KeyDown handler to an instance of a TextBox my handler never receives the event for the enter key- is this expected behaviour? I am to just handle KeyUp instead which does receive the event?
danwalmsley
@danwalmsley
Jan 18 2017 10:24
@jkoritzinsky do you remember the work you did on the loading icon from image?
I cant get it to work on skia, it just gives null reference exception
did you implement it for skia?
danwalmsley
@danwalmsley
Jan 18 2017 10:30
image.png
@PumpkinPaul hey
you might want to try changing the routing strategy that you use... here is an example
disposables.Add(AddHandler(KeyDownEvent, OnKeyDown, RoutingStrategies.Bubble));
routing strategy can be Tunnel or Bubble or Direct (Ithink)
it effects who gets the events in which order
this was how I solved the exact same issue
Paul Cunningham
@PumpkinPaul
Jan 18 2017 10:41
@danwalmsley - thanks for that - I'll take a look.
Jeremy Koritzinsky
@jkoritzinsky
Jan 18 2017 15:08
@danwalmsley it worked on skia totally fine for me. I can't replicate your error.
danwalmsley
@danwalmsley
Jan 18 2017 17:53
@jkoritzinsky I will build avalonia locally and try and debug the problem, as soon as I go back to direct2d it all works fine
Steven Kirk
@grokys
Jan 18 2017 18:02
@PumpkinPaul that sounds like a bug - could you create an issue?
Jeremy Koritzinsky
@jkoritzinsky
Jan 18 2017 19:43
@danwalmsley I put an icon example in control catalog on the image page. Take a look and see if that one works. It worked for me.