These are chat archives for AvaloniaUI/Avalonia

13th
Feb 2017
Igor Gritsenko
@Igor_Gritsenko_twitter
Feb 13 2017 00:49

System.ArgumentException: 'Invalid value for Property 'Background': 'Avalonia.Media.LinearGradientBrush' (Avalonia.Media.LinearGradientBrush)'

<controls:Border x:Name="HueGradient" > <controls:Border.Background> <media:LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1.0"> <media:GradientStop Color="#FFFF0000" /> <media:GradientStop Color="#FEFFFF00" Offset="0.167" />

And also no luck when I set it from code behind
I also tried SolidColorBrush
any tips how to do it properly?
Nikita Tsukanov
@kekekeks
Feb 13 2017 07:34
Do you have a full stack trace?
in error.txt - error details and callstack copy from visual studio
Nikita Tsukanov
@kekekeks
Feb 13 2017 08:24
That looks like a bug, since Background property accepts IBrush and LinearGradientBrush accepts it
BTW, why do you need that controls namespace?
Avalonia types are imported to default one
Why are you using xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" as default namespace?
Igor Gritsenko
@Igor_Gritsenko_twitter
Feb 13 2017 08:26
I don't) I just copied this xaml from my winrt library and there was XamlIntelliSenseFileGenerator in custom tool, so resharper just suggested me to import all namespaces
Nikita Tsukanov
@kekekeks
Feb 13 2017 08:26
It doesn't work that way
And resharper knows nothing about avalonia, unfortunately
Igor Gritsenko
@Igor_Gritsenko_twitter
Feb 13 2017 08:26
but it shows me intellisence in 2017 vs)
Nikita Tsukanov
@kekekeks
Feb 13 2017 08:27
Broken one
You can use our VS extension
It provides some intellisense and previewer
Igor Gritsenko
@Igor_Gritsenko_twitter
Feb 13 2017 08:27
I didn't find it for vs 2017
Nikita Tsukanov
@kekekeks
Feb 13 2017 08:29
Hm
Probably need to build from source
Igor Gritsenko
@Igor_Gritsenko_twitter
Feb 13 2017 08:30
ok, i'll try
Try this build
I've added <InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[15.0]" />
Not sure if it will work properly
Igor Gritsenko
@Igor_Gritsenko_twitter
Feb 13 2017 08:33
I have enterpritse at the moment only...
installing anyway
Nikita Tsukanov
@kekekeks
Feb 13 2017 08:37
Enterprise satisfies Community installation target dependencies
You should get something like that:
You need to reference avalonia and your NETStandard/PCL libs from a regular windows executable project, through
Previewer won't be able to setup environment otherwise
Intellisense also needs compiled binaries
Igor Gritsenko
@Igor_Gritsenko_twitter
Feb 13 2017 08:43
it doesn't open xaml files now... no reaction to "Open" or double click
Nikita Tsukanov
@kekekeks
Feb 13 2017 08:44
Known issue with greedy xaml editor in visual studio
Rename to "paml"
Igor Gritsenko
@Igor_Gritsenko_twitter
Feb 13 2017 08:44
if I do "open with" -> Automatic Editor Selector (xml) default or any other selectors - ---------------------------

Microsoft Visual Studio

Unable to cast object of type 'Microsoft.VisualStudio.Editor.Implementation.VsCodeWindowAdapter' to type 'Microsoft.VisualStudio.Shell.WindowPane'.

OK

Nikita Tsukanov
@kekekeks
Feb 13 2017 08:44
wow
Something related to infrastructure changes, I guess
Igor Gritsenko
@Igor_Gritsenko_twitter
Feb 13 2017 08:45
after renaming it started to say me that after double click...
fortuanely old wpf xamls opens normally
Nikita Tsukanov
@kekekeks
Feb 13 2017 08:53
According to decompiler VsCodeWindowAdapter inherits WindowPane
weird
Nikita Tsukanov
@kekekeks
Feb 13 2017 08:58
Try this one (uninstall previous version first)
Igor Gritsenko
@Igor_Gritsenko_twitter
Feb 13 2017 09:01
with xaml extension it opened just in normal xml editor
when i renamed to paml

Microsoft Visual Studio

An unexpected exception occurred while binding a dynamic operation

OK

Nikita Tsukanov
@kekekeks
Feb 13 2017 09:03
Mkay, something changed in VS code editor
I need to update to the latest version to investigate that
Igor Gritsenko
@Igor_Gritsenko_twitter
Feb 13 2017 09:26
When I removed those prefixes (<controls: ) error of type conversion to IBrush was gone...
there is still one moment... EndPoint="0.5,1.0" makes gradient with 1 pixel height
and I believe that it should be 100% height
Nikita Tsukanov
@kekekeks
Feb 13 2017 09:48
There should be mode option, I think
Oh, there isn't
Steven Kirk
@grokys
Feb 13 2017 09:50
yeah, there are problems with the gradient brushes. i had to fix a few on scenegraph branch
Nikita Tsukanov
@kekekeks
Feb 13 2017 09:50
You need to somehow specify relative points
Instead of absolute
Nikita Tsukanov
@kekekeks
Feb 13 2017 20:21
@jkoritzinsky Let's put on hold the issue with modules for a while, an acquaintance of mine claims to have a general-purpose module management solution and promises to publish it soon
Jeremy Koritzinsky
@jkoritzinsky
Feb 13 2017 20:33
Ok :+1: works for me
Nikita Tsukanov
@kekekeks
Feb 13 2017 20:34
BTW, the issue isn't with modules themselves, but with dynamic assembly loading
We were foolish to rely on it
That's the problem
Jeremy Koritzinsky
@jkoritzinsky
Feb 13 2017 20:35
Yeah I get that
Nikita Tsukanov
@kekekeks
Feb 13 2017 20:38
@jkoritzinsky https://github.com/AvaloniaUI/Avalonia/pull/896/files - this approach seems to be the best for non-generic requirements checks
And we'll need smarter system with dependency graphs for proper resolution anyway
Jeremy Koritzinsky
@jkoritzinsky
Feb 13 2017 20:39
I think that design works well.
The dependency graph would have to account for the different possible module implementations with possibly varying dependencies