These are chat archives for AvaloniaUI/Avalonia

5th
Jun 2018
Manuel
@CommonGuy
Jun 05 2018 05:05
@Gillibald The last few pull request are all failing with possible NullReferenceExceptions...
ahopper
@ahopper
Jun 05 2018 05:49
@jkoritzinsky thanks very much
Florian
@boombuler
Jun 05 2018 07:16
@danwalmsley about the release event: which DragSource are you using?
Callum
@CallumDev
Jun 05 2018 08:33
Hm
How difficult would it be to write another backend to avalonia?
I think it'd be nice to have avalonia for my game engine's user interface
assuming there'd be a way to test mouse hits
danwalmsley
@danwalmsley
Jun 05 2018 08:52
@boombuler ill have to find that out, in the end I awaited DoDragDrop then used that to reset state. I'm going to see how wpf behaves to see if mouse events also stop
William Humphreys
@WHumphreys
Jun 05 2018 11:01
Wiesław Šoltés
@wieslawsoltes
Jun 05 2018 15:36
@grokys Is this supported in Avalonia: IsChecked="{Binding Path=(local:Attached.Test), Mode=TwoWay, RelativeSource={RelativeSource Self}}"
I am getting: Invalid attached property name.
   at Avalonia.Data.Core.Parsers.ExpressionParser.ParseAttachedProperty(Reader r, List`1 nodes) in C:\projects\Avalonia\src\Avalonia.Base\Data\Core\Parsers\ExpressionParser.cs:line 137
   at Avalonia.Data.Core.Parsers.ExpressionParser.Parse(Reader r) in C:\projects\Avalonia\src\Avalonia.Base\Data\Core\Parsers\ExpressionParser.cs:line 41
   at Avalonia.Data.Core.ExpressionNodeBuilder.Build(String expression, Boolean enableValidation) in C:\projects\Avalonia\src\Avalonia.Base\Data\Core\ExpressionNodeBuilder.cs:line 20
   at Avalonia.Data.Binding.CreateSourceObserver(Object source, String path, Boolean enableDataValidation) in C:\projects\Avalonia\src\Markup\Avalonia.Markup\Data\Binding.cs:line 269
   at Avalonia.Data.Binding.Initiate(IAvaloniaObject target, AvaloniaProperty targetProperty, Object anchor, Boolean enableDataValidation) in C:\projects\Avalonia\src\Markup\Avalonia.Markup\Data\Binding.cs:line 105
   at Avalonia.AvaloniaObjectExtensions.Bind(IAvaloniaObject target, AvaloniaProperty property, IBinding binding, Object anchor) in C:\projects\Avalonia\src\Avalonia.Base\AvaloniaObjectExtensions.cs:line 211
   at Avalonia.Markup.Data.DelayedBinding.BindingEntry.Apply(IStyledElement control) in C:\projects\Avalonia\src\Markup\Avalonia.Markup\Markup\Data\DelayedBinding.cs:line 132
   at Avalonia.Markup.Data.DelayedBinding.ApplyBindings(IStyledElement control) in C:\projects\Avalonia\src\Markup\Avalonia.Markup\Markup\Data\DelayedBinding.cs:line 97
   at Avalonia.Markup.Data.DelayedBinding.ApplyBindings(Object sender, EventArgs e) in C:\projects\Avalonia\src\Markup\Avalonia.Markup\Markup\Data\DelayedBinding.cs:line 110
   at Avalonia.Markup.Xaml.PortableXaml.AvaloniaXamlObjectWriter.DelayedValuesHelper.ApplyAll() in C:\projects\Avalonia\src\Markup\Avalonia.Markup.Xaml\PortableXaml\AvaloniaXamlObjectWriter.cs:line 198
   at Avalonia.Markup.Xaml.PortableXaml.AvaloniaXamlObjectWriter.OnAfterProperties(Object value) in C:\projects\Avalonia\src\Markup\Avalonia.Markup.Xaml\PortableXaml\AvaloniaXamlObjectWriter.cs:line 85
   at Portable.Xaml.XamlObjectWriterInternal.OnWriteEndObject() in C:\projects\Avalonia\src\Markup\Avalonia.Markup.Xaml\PortableXaml\portable.xaml.github\src\Portable.Xaml\Portable.Xaml\XamlObjectWriter.cs:line 398
   at Portable.Xaml.XamlWriterInternalBase.WriteEndObject() in C:\projects\Avalonia\src\Markup\Avalonia.Markup.Xaml\PortableXaml\portable.xaml.github\src\Portable.Xaml\Portable.Xaml\XamlWriterInternalBase.cs:line 260
   at Portable.Xaml.XamlServices.Transform(XamlReader xamlReader, XamlWriter xamlWriter, Boolean closeWriter) in C:\projects\Avalonia\src\Markup\Avalonia.Markup.Xaml\PortableXaml\portable.xaml.github\src\Portable.Xaml\Portable.Xaml\XamlServices.cs:line 128
   at Avalonia.Markup.Xaml.AvaloniaXamlLoader.LoadFromReader(XamlReader reader, AvaloniaXamlContext context, IAmbientProvider parentAmbientProvider) in C:\projects\Avalonia\src\Markup\Avalonia.Markup.Xaml\AvaloniaXamlLoader.cs:line 208
   at Avalonia.Markup.Xaml.AvaloniaXamlLoader.Load(Stream stream, Assembly localAssembly, Object rootInstance, Uri uri) in C:\projects\Avalonia\src\Markup\Avalonia.Markup.Xaml\AvaloniaXamlLoader.cs:line 184
   at Avalonia.Markup.Xaml.AvaloniaXamlLoader.Load(Type type, Object rootInstance) in C:\projects\Avalonia\src\Markup\Avalonia.Markup.Xaml\AvaloniaXamlLoader.cs:line 89
   at Avalonia.Markup.Xaml.AvaloniaXamlLoader.Load(Object obj) in C:\projects\Avalonia\src\Markup\Avalonia.Markup.Xaml\AvaloniaXamlLoader.cs:line 57
   at AvaloniaDemo.MainWindow.InitializeComponent() in C:\DOWNLOADS\GitHub\Dock\samples\AvaloniaDemo\MainWindow.xaml.cs:line 134
   at AvaloniaDemo.MainWindow..ctor() in C:\DOWNLOADS\GitHub\Dock\samples\AvaloniaDemo\MainWindow.xaml.cs:line 20
Same result with IsChecked="{Binding $self.(local:Attached.Test)}"
Jeremy Koritzinsky
@jkoritzinsky
Jun 05 2018 17:44
We don't support the XAML namespaces. Just use Attached.Test and it should work.
Benedikt Schroeder
@Gillibald
Jun 05 2018 18:02
Is there a reason PathFigure.IsFilled is true by default? This should Probably false by default.
Jeremy Koritzinsky
@jkoritzinsky
Jun 05 2018 18:20
What's the default in WPF and UWP? We should match whatever they default to.
Benedikt Schroeder
@Gillibald
Jun 05 2018 18:23
The default in WPF is false and UWP has it set to true by default...
I am asking because my PathMarkupParser has to set it to false every time a figure is created
Rayyan Tahir
@RayyanTahir
Jun 05 2018 18:32
@ahopper I got that very same exception when running my avalonia app on Ubuntu 14.04 VM, after shifting to 16.04 VM it worked fine...
ahopper
@ahopper
Jun 05 2018 19:08
@RayyanTahir thanks, I did get it working here on 16.04 WSL after installing gtk3 ( although I then hit this WSL bug Microsoft/WSL#2868) without gtk3 installed I think it was the same error. I'll report back when we get to the bottom of it.
Splitwirez
@Splitwirez
Jun 05 2018 19:11

```C:\Program Files\dotnet\sdk\2.1.102\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(167,5): error : Assets file 'C:\Users\Splitwirez\Documents\Important\Start9\AvaloniaTest\GridFileBrowser\GridFileBrowser\GridFileBrowser\obj\project.assets.json' doesn't have a target for '.NETFramework,Version=v4.6.1/win7-x86'. Ensure that restore has run and that you have included 'net461' in the TargetFrameworks for your project. You may also need to include 'win7-x86' in your project's RuntimeIdentifiers.

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2052,5): warning MSB3243: No way to resolve conflict between "Avalonia.Remote.Protocol, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" and "Avalonia.Remote.Protocol, Version=0.6.2.0, Culture=neutral, PublicKeyToken=null". Choosing "Avalonia.Remote.Protocol, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" arbitrarily.

CSC : error CS1704: An assembly with the same simple name 'Avalonia.Remote.Protocol' has already been imported. Try removing one of the references (e.g. 'C:\Users\Splitwirez.nuget\packages\avalonia.gtk3\0.6.1\lib\netstandard2.0\Avalonia.Remote.Protocol.dll') or sign them to enable side-by-side.```

I am confusion

Steven Kirk
@grokys
Jun 05 2018 21:02
@Splitwirez oh god yeah that error. i don't know what causes it either
sometimes closing and reopening VS fixes it
danwalmsley
@danwalmsley
Jun 05 2018 21:04
@grokys any ideas whats happened with ci builds?
Steven Kirk
@grokys
Jun 05 2018 21:05
not sure, no - @jmacato pointed out that they're failing
i don't have resharper installed on this machine so i can't investigate it right now
(it's resharper throwing the error)
danwalmsley
@danwalmsley
Jun 05 2018 21:06
ok
I couldn't determine the commit that caused it
Jeremy Koritzinsky
@jkoritzinsky
Jun 05 2018 21:06
I'm working on cleaning stuff up wrt the build failure.
Steven Kirk
@grokys
Jun 05 2018 21:07
no not sure either. maybe was an update to resharper?
thanks @jkoritzinsky - i'm in meetings until thursday so not going to get much time until friday probably (and then i'll be on the flight back, so no internet!)
Jeremy Koritzinsky
@jkoritzinsky
Jun 05 2018 21:08
Yeah. Looks like the inspector decided that Debug.Assert and string.IsNullOrWhitespace doesn't prevent the PossibleNullReferenceException analysis result.
While fixing that I did a little cleanup in the calendar code.
Steven Kirk
@grokys
Jun 05 2018 21:09
sounds like a resharper bug?
Jeremy Koritzinsky
@jkoritzinsky
Jun 05 2018 21:09
Yeah but one that's easy to work around
@grokys Once the new (non) nullable references feature comes out and we update Avalonia to use it, can we drop the JetBrains inspector? That's all we use it for as far as I can tell.
Steven Kirk
@grokys
Jun 05 2018 21:15
yeah! if that feature comes out!
Splitwirez
@Splitwirez
Jun 05 2018 21:35
@grokys Thanks. After updating to the latest nightly packages, that...actually worked. First time that's happened... .-.
Steven Kirk
@grokys
Jun 05 2018 21:49
yeah, it's weird. i can't even repro it well enough to file an issue
Splitwirez
@Splitwirez
Jun 05 2018 21:49
:thinking: