These are chat archives for AvaloniaUI/Avalonia

6th
Jul 2016
Steven Kirk
@grokys
Jul 06 2016 12:13
This message was deleted
This message was deleted
Andrey Kunchev
@donandren
Jul 06 2016 13:30
@kekekeks the customized avalonia designer that you've made (with additionl check for IsBuilding) for me is working much better, still there are dll locks occasionally, but around 10 times less frequent are the locks. And if there is a lock, if you build with F6 (build without start with debug) it's successfull
@grokys you're fast with #578, hope it will not break AlwaysSelectedMode of the listbox
Steven Kirk
@grokys
Jul 06 2016 13:55
yeah, actually thinking about it, it could...
though... only with the auto scroll to selected item option enabled
the first item will always get selected fine, though it might not get scrolled into view
however, it's the first item so i don't think that should be a problem
as the first item will always be displayed when initialized
Nikita Tsukanov
@kekekeks
Jul 06 2016 15:00
@grokys
do we have a planned date for the next release?
Steven Kirk
@grokys
Jul 06 2016 15:01
nope, but we should try to do it this month if possible i think
i've got to go away for 2 weeks starting Saturday though so not before I get back...
Darnell Williams
@Seeker1437
Jul 06 2016 15:21
@grokys before we talked about being able to get a reference to the UIThreads Thread, but I never thought to ask you, do you have any objects that enforce the thread access? If so can you point me to it, or better yet if not, what is the best way you recommend enforcing thread access?
I can't think of a way that would work inside of a library.
Nikita Tsukanov
@kekekeks
Jul 06 2016 15:24
AvaloniaObject checks for being in the UIThread
When you set property values
Look for CheckAccess calls
Darnell Williams
@Seeker1437
Jul 06 2016 17:39
wow that actually made it really simple
THanks guys, idk why I didn't think to look at Dispatcher
Amer Koleci
@amerkoleci
Jul 06 2016 18:55
Guys we should add docking to Avalonia
I found another nice one library
Steven Kirk
@grokys
Jul 06 2016 18:56
i think @Seeker1437 was trying to make a docking library
Amer Koleci
@amerkoleci
Jul 06 2016 18:56
I know but he never reporting nothing about his progress
Steven Kirk
@grokys
Jul 06 2016 18:56
it should definitely be a separate library to avalonia though - avalonia itself is already big enough!
Amer Koleci
@amerkoleci
Jul 06 2016 18:57
Indeed I agree
Steven Kirk
@grokys
Jul 06 2016 18:57
but having said that, it would be a fantastic thing to have
Nikita Tsukanov
@kekekeks
Jul 06 2016 19:02
There was some support for dragging custom-bordered windows using mouse
@Seeker1437 asked for this to get docking working, I think
Steven Kirk
@grokys
Jul 06 2016 19:09
yeah, i think @danwalmsley makes use of this in AvalonStudio as that is a borderless window
Wiesław Šoltés
@wieslawsoltes
Jul 06 2016 19:43
@grokys I'm getting this exception when I use my CachedContentPresenter, but it does not throw consistently:
Exception thrown: 'System.InvalidOperationException' in Avalonia.Interactivity.dll
Core2D.Avalonia.Skia.vshost.exe Error: 0 : The control already has a visual parent.
   w Avalonia.Visual.ValidateVisualChild(IVisual c)
   w Avalonia.Collections.AvaloniaList`1.Add(T item)
   w Avalonia.Controls.Presenters.ContentPresenter.UpdateChild()
   w Avalonia.Controls.Presenters.ContentPresenter.ApplyTemplate()
   w Avalonia.Controls.Mixins.ContentControlMixin.<>c__DisplayClass1_0`1.<Attach>b__0(Object s, RoutedEventArgs ev)
--- Koniec śladu stosu z poprzedniej lokalizacji, w której wystąpił wyjątek ---
   w Avalonia.Interactivity.RoutedEvent.<>c__DisplayClass25_0.<AddClassHandler>b__0(Tuple`2 args)
   w System.Reactive.AnonymousObserver`1.OnNextCore(T value)
   w System.Reactive.ObserverBase`1.OnNext(T value)
   w System.Reactive.Observer`1.OnNext(T value)
   w Avalonia.Interactivity.Interactive.RaiseEventImpl(RoutedEventArgs e)
   w Avalonia.Interactivity.Interactive.RaiseEvent(RoutedEventArgs e)
   w Avalonia.Controls.Primitives.TemplatedControl.OnTemplateApplied(TemplateAppliedEventArgs e)
   w Avalonia.Controls.Primitives.TemplatedControl.ApplyTemplate()
   w Avalonia.Layout.Layoutable.MeasureCore(Size availableSize)
   w Avalonia.Layout.Layoutable.Measure(Size availableSize)
   w Avalonia.Controls.Presenters.ContentPresenter.MeasureOverride(Size availableSize)
   w Avalonia.Layout.Layoutable.MeasureCore(Size availableSize)
   w Avalonia.Layout.Layoutable.Measure(Size availableSize)
   w Avalonia.Layout.LayoutManager.Measure(ILayoutable control)
   w Avalonia.Layout.LayoutManager.ExecuteMeasurePass()
   w Avalonia.Layout.LayoutManager.ExecuteLayoutPass()
   w Avalonia.Threading.JobRunner.RunJobs()
   w Avalonia.Win32.Win32Platform.WndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam)
   w Avalonia.Win32.Interop.UnmanagedMethods.DispatchMessage(MSG& lpmsg)
   w Avalonia.Win32.Win32Platform.RunLoop(CancellationToken cancellationToken)
   w Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken)
   w Avalonia.Application.Run(ICloseable closable)
   w Core2D.Avalonia.App.Start(IFileSystem fileIO, ILog log, ImmutableArray`1 writers) w C:\DOWNLOADS\GitHub-Core2D\Core2D\src\Core2D.Avalonia\App.xaml.cs:wiersz 181
Steven Kirk
@grokys
Jul 06 2016 19:43
it means something is trying to reparent a control that already has a parent
Steven Kirk
@grokys
Jul 06 2016 19:44
it could be that you're setting ContentControl.Content to a control that is parented elsewhere?
without a repro though it's hard to say
Wiesław Šoltés
@wieslawsoltes
Jul 06 2016 19:45
Its pretty easy to reproduce as it happens a lot
just draw few different shapes in Core2D and mouse over them few times
Steven Kirk
@grokys
Jul 06 2016 19:47
ok, i need to leave soon, but could you try adding on that line a check to see if the control's visual parent is already set?
Wiesław Šoltés
@wieslawsoltes
Jul 06 2016 19:47
what is best way to check for visual parent
Steven Kirk
@grokys
Jul 06 2016 19:48
using Avalonia.VisualTree; control.GetVisualParent()
Wiesław Šoltés
@wieslawsoltes
Jul 06 2016 19:50
vp is null
vp is null
vp is set
vp is set
vp is null
vp is null
vp is null
vp is null
vp is null
Exception thrown: 'System.InvalidOperationException' in Avalonia.Interactivity.dll
Core2D.Avalonia.Skia.vshost.exe Error: 0 : The control already has a visual parent.
Steven Kirk
@grokys
Jul 06 2016 19:51
ok, so it's not there
Wiesław Šoltés
@wieslawsoltes
Jul 06 2016 19:53
tested again:
vp is null
vp is null
vp is null
vp is set
vp is set
vp is set
vp is set
vp is null
vp is set
vp is set
Exception thrown: 'System.InvalidOperationException' in Avalonia.Interactivity.dll
different result
Darnell Williams
@Seeker1437
Jul 06 2016 19:57
@amerkoleci @kekekeks @grokys I needed a way to detect other windows below the cursor in a xplat manner, right now it would only work on windows.
Steven Kirk
@grokys
Jul 06 2016 19:57
get it working on windows then worry about other platforms i'd say
Wiesław Šoltés
@wieslawsoltes
Jul 06 2016 19:58
vp is null
vp is null
vp is set Core2D.Avalonia.Presenters.CachedContentPresenter
vp is set Core2D.Avalonia.Presenters.CachedContentPresenter
vp is set Core2D.Avalonia.Presenters.CachedContentPresenter
vp is null
Exception thrown: 'System.InvalidOperationException' in Avalonia.Interactivity.dll
Steven Kirk
@grokys
Jul 06 2016 19:58
ok @wieslawsoltes it looks like that's not it
i need to go now, will take a look hopefully tomorrow - if you could file a bug to remind me that would be useful
Wiesław Šoltés
@wieslawsoltes
Jul 06 2016 19:59
somehow ContentPresenter is assigned to VisualParent
ok
will create issue
Darnell Williams
@Seeker1437
Jul 06 2016 20:07
I will do :3
Arkadiusz Wójcik
@arkadiuszwojcik
Jul 06 2016 20:35
Hi guys, do you think it worth using Cake build system in Avalonia project ? I could start some initial work with it.
Darnell Williams
@Seeker1437
Jul 06 2016 20:48
I was curious, in the SelectionChangedEventArgs what advantage do we have using an IList over an ICollection?
Nikita Tsukanov
@kekekeks
Jul 06 2016 21:26

I needed a way to detect other windows below the cursor in a xplat manner, right now it would only work on windows.

I'm not sure you can do that

What exactly do you need it for

Hi guys, do you think it worth using Cake build system in Avalonia project ? I could start some initial work with it.

What benefit is in that?

MSBuild is doing pretty fine job, I think
Darnell Williams
@Seeker1437
Jul 06 2016 21:30
@kekekeks it can be done on windows, that technique is used for window tearing/docking
I've only seen it accomplished with WPF though, so I am going to see if I can do it here too
Also I made some live templates for AvaloniaProperty Generation
not that I think anyone would really need them atm
Darnell Williams
@Seeker1437
Jul 06 2016 21:36
DO you want me to make it using that system?
Darnell Williams
@Seeker1437
Jul 06 2016 23:28
@grokys what's our errm receptibility with Ms-PL?
Steven Kirk
@grokys
Jul 06 2016 23:31
reception ground
Darnell Williams
@Seeker1437
Jul 06 2016 23:32
?
hehe
Steven Kirk
@grokys
Jul 06 2016 23:32
i figured i'd start speaking in riddles like you ;)
Darnell Williams
@Seeker1437
Jul 06 2016 23:32
AH sorry hehe, I suck at this
I am pulling portions of my code from a project covered under the Ms-PL, is this okay?
(For submission to master)
Steven Kirk
@grokys
Jul 06 2016 23:35
i think so, from a quick google, yeah
i think we'd need to add an attribution though
but that's no problem
Darnell Williams
@Seeker1437
Jul 06 2016 23:37
Makes sense. :) Yeah I was curious because I noticed we haven't really needed to and I didn't want to start making licensing more difficult without bring it up to you first
Before I put in any work
I am pulling some of the functionality of my controls from Moonlight for example, these sources are covered under Ms-PL
Steven Kirk
@grokys
Jul 06 2016 23:43
yeah, always best to ask
Darnell Williams
@Seeker1437
Jul 06 2016 23:45
How would you do the attibution? so I can add it as part of the PR
Steven Kirk
@grokys
Jul 06 2016 23:49
not sure - look around and see how other projects do it, maybe it's added to LICENCE.md?