These are chat archives for AvaloniaUI/Avalonia

Feb 2018
Jonas Jermann
Feb 28 2018 00:21
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at Portable.Xaml.XamlObjectWriterInternal.InitializeObjectIfRequired(Boolean waitForParameters, Boolean required)
at Portable.Xaml.XamlObjectWriterInternal.OnWriteStartObject()
at Portable.Xaml.XamlServices.Transform(XamlReader xamlReader, XamlWriter xamlWriter, Boolean closeWriter)
at Avalonia.Markup.Xaml.AvaloniaXamlLoaderPortableXaml.LoadFromReader(XamlReader reader, AvaloniaXamlContext context)
at Avalonia.Markup.Xaml.AvaloniaXamlLoaderPortableXaml.Load(Stream stream, Object rootInstance, Uri uri)
at Avalonia.Markup.Xaml.AvaloniaXamlLoaderPortableXaml.Load(Type type, Object rootInstance)
at Avalonia.Markup.Xaml.AvaloniaXamlLoaderPortableXaml.Load(Object obj)
@kekekeks Here is the stacktrace
Jonas Jermann
Feb 28 2018 00:26
at OxyPlot.Avalonia.PlotBase..ctor()
Steven Kirk
Feb 28 2018 00:41
@daggmano yeah sorry that sample isn't finished
you'd usually do it by having e.g. a ReactiveCommand on a page, then subscribing to that on the master view model
Darren Oster
Feb 28 2018 00:44
Thanks @grokys , I'll look into that.
Steven Kirk
Feb 28 2018 00:49
there's no really hard and fast way to do it though, it all depends on how many pages you have and how they're related really
one way is to wrap showing each page in a method which disposes of the current page's command subscription and adds a subscription to the command on the new page
a more advanced way is to have an interface with an observable which produces values which represent the page to move to: a URL for example
Feb 28 2018 17:03
I have an AutoCompleteBox almost ready to go. I should be able to submit a pull request early next week.
Digging around some code trying to figure out best practices and came across something that might be a bug
In the ItemsControl should the attaching of the INotifyCollectionChanged.CollectionChange handler be done through a weak subscription, or is there something happening internally that will prevent this from causing a memory leak if the collection out lives the control that binds to it?
Jonas Jermann
Feb 28 2018 18:09
@kekekeks: Ok it works now, it was a nuget cache issue
(I don't see the plot though ^^)
Jonas Jermann
Feb 28 2018 18:16
I got it working! :-)
Jonas Jermann
Feb 28 2018 18:31
is there a way to make sure the plot is shown (i.e. that it's not cut off because width/height are too small)?