These are chat archives for AvaloniaUI/Avalonia

4th
Apr 2018
Jumar Macato
@jmacato
Apr 04 2018 00:25
@danwalmsley the whole window was transparent/blurred so you can make an avalonia app look like UWP apps, i just made a quick test on it thats why that example i gave looks as it is :) but then there is some ghosting artifacts (the previous frames are drawn over instead of being cleared) so it aint usable for now. And lastly, i don't think gtk# supports any composition API so i think we're stuck with windows on this one
Jumar Macato
@jmacato
Apr 04 2018 03:35
@danwalmsley you can activate it by copy-pasting the snippet i've linked in your MainWindow class, then activate it by calling 'EnableBlur()'
Did someone test this with AvaloniaUI app?
Jumar Macato
@jmacato
Apr 04 2018 11:14
i tested it last week
unfortunately my corert compiler is not behaving well in linux
i can't build in windows since VS c++ is too big for my sh*tty internet to handle but i guess it'll have better chances there @wieslawsoltes :)
Wiesław Šoltés
@wieslawsoltes
Apr 04 2018 11:16
You can setup appveyor CI to test windows builds.
Jumar Macato
@jmacato
Apr 04 2018 11:16
it'll always stop at libgssapi_krb5.so.2: error adding symbols: DSO missing from command line when you try building it in linux
Wiesław Šoltés
@wieslawsoltes
Apr 04 2018 11:17
Super easy with dotnet tooling.
Jumar Macato
@jmacato
Apr 04 2018 11:17
i see, i havent considered doing that, thanks for the heads up
yes, it is becoming more convienient :)
Jumar Macato
@jmacato
Apr 04 2018 11:21
okay thanks! i assumed appveyor only had linux images
i'll try it out later
Jumar Macato
@jmacato
Apr 04 2018 11:44
@wieslawsoltes It worked!
but i havent tried it running it yet,
Jumar Macato
@jmacato
Apr 04 2018 12:00
It seems that there was some assembly that was pruned, hence the xaml resolver failed, will try a debug build
Unhandled Exception: System.InvalidOperationException: Failed to compare two elements in the array. ---> System.MissingMethodException: No parameterless constructor defined for this object.
   at AvalonCoreRT!<BaseAddress>+0x622aa
   at System.ComponentModel.ReflectTypeDescriptionProvider.SearchIntrinsicTable(Hashtable, Type) + 0x2d3
   at System.ComponentModel.ReflectTypeDescriptionProvider.ReflectedTypeData.GetConverter(Object) + 0x1e5
   at System.ComponentModel.TypeDescriptor.TypeDescriptionNode.DefaultTypeDescriptor.System.ComponentModel.ICustomTypeDescriptor.GetConverter() + 0x40
   at System.ComponentModel.TypeDescriptor.GetConverter(Type) + 0x21
   at Portable.Xaml.XamlType.LookupTypeConverter() + 0x21e
   at Portable.Xaml.XamlType.get_TypeConverter() + 0x20
   at Portable.Xaml.XamlType.CanConvertFrom(XamlType) + 0x2f
   at Portable.Xaml.XamlMember.LookupRequiresChildNode() + 0x64
   at Portable.Xaml.XamlMember.get_RequiresChildNode() + 0x73
   at Portable.Xaml.TypeExtensionMethods.CompareMembers(XamlMember, XamlMember) + 0x126
   at AvalonCoreRT!<BaseAddress>+0x4a1d15
   at AvalonCoreRT!<BaseAddress>+0x4a1671
   at AvalonCoreRT!<BaseAddress>+0x4a134b

   --- End of inner exception stack trace ---
   at AvalonCoreRT!<BaseAddress>+0x4a13bc
   at System.Collections.Generic.List`1.Sort(Int32, Int32, IComparer`1) + 0x4c
   at Portable.Xaml.XamlType.GetAllMembers() + 0x66
   at Portable.Xaml.XamlType.LookupMember(String, Boolean) + 0x38
   at Portable.Xaml.XamlType.GetMember(String) + 0x86
   at Portable.Xaml.XamlXmlParser.<ReadMemberElement>d__29.MoveNext() + 0x145
   at Portable.Xaml.XamlXmlParser.<ReadMembers>d__18.MoveNext() + 0xf3
   at Portable.Xaml.XamlXmlParser.<ReadObjectElement>d__15.MoveNext() + 0xeaa
   at Portable.Xaml.XamlXmlParser.<Parse>d__13.MoveNext() + 0x12a
   at Portable.Xaml.XamlXmlReader.Read() + 0x7e
   at Portable.Xaml.XamlServices.Transform(XamlReader, XamlWriter, Boolean) + 0x54
   at Avalonia.Markup.Xaml.AvaloniaXamlLoaderPortableXaml.LoadFromReader(XamlReader, AvaloniaXamlContext) + 0x33
   at Avalonia.Markup.Xaml.AvaloniaXamlLoaderPortableXaml.Load(Stream, Object, Uri) + 0xb7
   at Avalonia.Markup.Xaml.AvaloniaXamlLoaderPortableXaml.Load(Type, Object) + 0x156
   at Avalonia.Markup.Xaml.AvaloniaXamlLoaderPortableXaml.Load(Object) + 0x4c
   at Avalonia.Controls.AppBuilderBase`1.Setup() + 0xda
   at AvalonCoreRT!<BaseAddress>+0x5561a0
   at AvalonCoreRT!<BaseAddress>+0x518592
Wiesław Šoltés
@wieslawsoltes
Apr 04 2018 12:01
maybe there is a way to control the prunning
Jumar Macato
@jmacato
Apr 04 2018 12:01
CoreRT targets must either be linux-x64 or win-x64
Matthijs ter Woord
@mterwoord
Apr 04 2018 12:01
I'd say you'll need linker hints
Wiesław Šoltés
@wieslawsoltes
Apr 04 2018 12:01
yes
I need to change
Jumar Macato
@jmacato
Apr 04 2018 12:02
i'll try to check which assemblies were pruned
I would start with this
Probably something in portable xaml
Jumar Macato
@jmacato
Apr 04 2018 12:05
alright
Jumar Macato
@jmacato
Apr 04 2018 12:38
sorry late reply, i can't debug any further because my bandwidth allocation for today is drying up
Wiesław Šoltés
@wieslawsoltes
Apr 04 2018 12:39
I am getting closer
Jumar Macato
@jmacato
Apr 04 2018 12:39
alright
Jumar Macato
@jmacato
Apr 04 2018 12:40
what's the latest exception?
Wiesław Šoltés
@wieslawsoltes
Apr 04 2018 12:54
I delete app :(
something with xaml type not found
Jumar Macato
@jmacato
Apr 04 2018 12:56
can you try this one
<Directives>
    <Application>
        <Assembly Name="AvalonCoreRT" Dynamic="Required All" />
        <Assembly Name="Avalonia.Themes.Default" Dynamic="Required All"/> 
        <Assembly Name="System.ComponentModel.TypeConverter"  Dynamic="Required All" />
        <Assembly Name="Avalonia.Markup.Xaml"  Dynamic="Required All" />
    </Application>
</Directives>
just replace the AvalonCoreRT with the
project name
Wiesław Šoltés
@wieslawsoltes
Apr 04 2018 13:01
ok
Wiesław Šoltés
@wieslawsoltes
Apr 04 2018 13:09
more errors :D
reflection
need to add all avalonia assemblies
Jumar Macato
@jmacato
Apr 04 2018 13:10
yeah i guess we have no choice but to add them all
Matthijs ter Woord
@mterwoord
Apr 04 2018 13:11
how about properties? i mean, do they get excluded if they arent being used?
Jumar Macato
@jmacato
Apr 04 2018 13:12
what kind of properties @mterwoord ?
Matthijs ter Woord
@mterwoord
Apr 04 2018 13:13
well in general, properties bound to using databinding, from xaml
with xamarin development, you need to specify some properties to be explicitly included
Jumar Macato
@jmacato
Apr 04 2018 13:15
i don't think Avalonia have those yet, simply because our xaml is not statically-linked and has to be determined at runtime on w/c assemblies to load, etc :(
Matthijs ter Woord
@mterwoord
Apr 04 2018 13:16
that's my point: you'll probably need to tell the linker explicitly to include certain xaml-used properties
Jumar Macato
@jmacato
Apr 04 2018 13:16
ahh, yeah we're currently trying it with runtime directives
Wiesław Šoltés
@wieslawsoltes
Apr 04 2018 13:16
well I tell to include my complete assembly :)
Jumar Macato
@jmacato
Apr 04 2018 13:16
as linked by @wieslawsoltes
Wiesław Šoltés
@wieslawsoltes
Apr 04 2018 13:16
I just want to see window for now
Jumar Macato
@jmacato
Apr 04 2018 13:16
@wieslawsoltes me too :(
that's why im trying it first on our avalonia.mvvm template
to reduce the error surface
Wiesław Šoltés
@wieslawsoltes
Apr 04 2018 13:28
False is not a valid value for Boolean.
   at System.ComponentModel.BooleanConverter.ConvertFrom(ITypeDescriptorContext, CultureInfo, Object) + 0xcc
   at Avalonia.Markup.Xaml.Converters.SetterValueTypeConverter.ConvertSetterValue(ITypeDescriptorContext, XamlSchemaContext, CultureInfo, Setter, Object) + 0x98
   at Avalonia.Markup.Xaml.PortableXaml.PropertyXamlMember.PropertyInvoker.SetValue(Object, Object) + 0x77
   at Portable.Xaml.XamlObjectWriterInternal.SetValue(XamlMember, Object, Object) + 0x4a

String was not recognized as a valid Boolean.
   at System.Boolean.Parse(ReadOnlySpan`1) + 0x4f
   at System.Boolean.Parse(String) + 0x2c
   at System.ComponentModel.BooleanConverter.ConvertFrom(ITypeDescriptorContext, CultureInfo, Object) + 0x4c
Jumar Macato
@jmacato
Apr 04 2018 13:28
we're missing the type converters in
Avalonia.Markup
try to add that perhaps
<Directives>
    <Application>
        <Assembly Name="System.ComponentModel.TypeConverter" Dynamic="Required All" />
        <Assembly Name="Avalonia.Animation" Dynamic="Required All" />
        <Assembly Name="Avalonia.Base" Dynamic="Required All" />
        <Assembly Name="Avalonia.Controls" Dynamic="Required All" />
        <Assembly Name="Avalonia.DesignerSupport" Dynamic="Required All" />
        <Assembly Name="Avalonia.Diagnostics" Dynamic="Required All" />
        <Assembly Name="Avalonia.Input" Dynamic="Required All" />
        <Assembly Name="Avalonia.Interactivity" Dynamic="Required All" />
        <Assembly Name="Avalonia.Layout" Dynamic="Required All" />
        <Assembly Name="Avalonia.Logging.Serilog" Dynamic="Required All" />
        <Assembly Name="Avalonia.Visuals" Dynamic="Required All" />
        <Assembly Name="Avalonia.Styling" Dynamic="Required All" />
        <Assembly Name="Avalonia.Themes.Default" Dynamic="Required All" />
        <Assembly Name="Avalonia.Markup" Dynamic="Required All" />
        <Assembly Name="Avalonia.Markup.Xaml" Dynamic="Required All" />
        <Assembly Name="Avalonia.DotNetCoreRuntime" Dynamic="Required All" />
        <Assembly Name="Avalonia.Win32" Dynamic="Required All" />
        <Assembly Name="Avalonia.Direct2D1" Dynamic="Required All" />
        <Assembly Name="Avalonia.Skia" Dynamic="Required All" />
        <Assembly Name="Avalonia.Gtk3" Dynamic="Required All" />
        <Assembly Name="Avalonia.MonoMac" Dynamic="Required All" />
        <Assembly Name="Core2D.Avalonia" Dynamic="Required All" />
        <Assembly Name="Newtonsoft.Json" Dynamic="Required All" />
    </Application>
</Directives>
Jumar Macato
@jmacato
Apr 04 2018 13:29
ohh.. hmm
Wiesław Šoltés
@wieslawsoltes
Apr 04 2018 13:29
This is my current rd.xml
Error loading xaml at resm:Avalonia.Themes.Default.CheckBox.xaml?assembly=Avalonia.Themes.Default
   at Avalonia.Markup.Xaml.AvaloniaXamlLoaderPortableXaml.Load(Uri, Uri, Object) + 0x143
   at Avalonia.Markup.Xaml.Styling.StyleInclude.get_Loaded() + 0x3b
   at Avalonia.Markup.Xaml.Styling.StyleInclude.Avalonia.Styling.ISetStyleParent.NotifyResourcesChanged(ResourcesChangedEventArgs) + 0xc
   at Avalonia.Styling.Styles.<.ctor>b__2_0(IStyle) + 0x62
   at Avalonia.Collections.AvaloniaListExtensions.<>c__DisplayClass1_0`1.<ForEachItem>g__Add|0(Int32, IList) + 0x92
   at Avalonia.Collections.AvaloniaList`1.NotifyAdd(IList, Int32) + 0x51
   at Core2D.Avalonia!<BaseAddress>+0x899b28
   at Core2D.Avalonia!<BaseAddress>+0x1c294c

Set value of member '{clr-namespace:Avalonia.Styling;assembly=Avalonia.Styling}Setter.Value' threw an exception
   at Portable.Xaml.XamlObjectWriterInternal.SetValue(XamlMember, Object, Object) + 0x8b
   at Portable.Xaml.XamlWriterInternalBase.WriteEndMember() + 0x1e
   at Portable.Xaml.XamlServices.Transform(XamlReader, XamlWriter, Boolean) + 0x4e
   at Avalonia.Markup.Xaml.AvaloniaXamlLoaderPortableXaml.LoadFromReader(XamlReader, AvaloniaXamlContext) + 0x33
   at Avalonia.Markup.Xaml.AvaloniaXamlLoaderPortableXaml.Load(Stream, Object, Uri) + 0xb7
   at Avalonia.Markup.Xaml.AvaloniaXamlLoaderPortableXaml.Load(Uri, Uri, Object) + 0x84

False is not a valid value for Boolean.
   at System.ComponentModel.BooleanConverter.ConvertFrom(ITypeDescriptorContext, CultureInfo, Object) + 0xcc
   at Avalonia.Markup.Xaml.Converters.SetterValueTypeConverter.ConvertSetterValue(ITypeDescriptorContext, XamlSchemaContext, CultureInfo, Setter, Object) + 0x98
   at Avalonia.Markup.Xaml.PortableXaml.PropertyXamlMember.PropertyInvoker.SetValue(Object, Object) + 0x77
   at Portable.Xaml.XamlObjectWriterInternal.SetValue(XamlMember, Object, Object) + 0x4a

String was not recognized as a valid Boolean.
   at System.Boolean.Parse(ReadOnlySpan`1) + 0x4f
   at System.Boolean.Parse(String) + 0x2c
   at System.ComponentModel.BooleanConverter.ConvertFrom(ITypeDescriptorContext, CultureInfo, Object) + 0x4c
Jumar Macato
@jmacato
Apr 04 2018 13:32
we're so close :(
Wiesław Šoltés
@wieslawsoltes
Apr 04 2018 13:34
I have to go for now, will try later :fire:
Jumar Macato
@jmacato
Apr 04 2018 13:34
alright, thank you for your insights :)
Steven Kirk
@grokys
Apr 04 2018 22:31
i don't know if anyone has checked out @jmacato's animation stuff, but it's seriously cool
AvaloniaUI/Avalonia#1461
2018-04-05_00-31-00.gif