These are chat archives for AvaloniaUI/Avalonia

6th
Dec 2017
Sergey
@PurpleGray
Dec 06 2017 14:26
Hi guys, need help. Screenshots: https://imgur.com/a/GYOgn
On 2nd img i had included some resources in App.xaml
And problem is with BaseDark resource (1st image)
When im trying to use some resource by key (3rd image) I got this exception on app start:
Nikita Tsukanov
@kekekeks
Dec 06 2017 14:28
ensure that all of your assemblies are loaded before initializing avalonia
Sergey
@PurpleGray
Dec 06 2017 14:28
изображение.png
Nikita Tsukanov
@kekekeks
Dec 06 2017 14:28
we are currently using AppDomain.Current.GetAssemblies()
And we are calling it only once
So it might fail to find your MetroWindow control
Sergey
@PurpleGray
Dec 06 2017 14:29
Yes, I moved resources into main assembly to check this case
Not helped
Matthijs ter Woord
@mterwoord
Dec 06 2017 14:30
the System.Private.CoreLib is correct?
Sergey
@PurpleGray
Dec 06 2017 14:30
If i comment this line everything will be fine (BaseDark style will affect app controls)
изображение.png
the System.Private.CoreLib is correct?
Nikita Tsukanov
@kekekeks
Dec 06 2017 14:31
according to the stack trace Portable.Xaml doesn't recognize the type of some XML element
Sergey
@PurpleGray
Dec 06 2017 14:31
Hm, i'll try to remove it
for test
looks like it cant recognize sys:Double
Matthijs ter Woord
@mterwoord
Dec 06 2017 14:40
i would think its in mscorlib...
ye
see xmlns:sys="clr-namespace:System;assembly=mscorlib"
Sergey
@PurpleGray
Dec 06 2017 14:43
I've tried, nothing changed (also tried to remove sys and its using from .xaml entirely). Ok, i'll leave it for later...
Sergey
@PurpleGray
Dec 06 2017 15:45
How to subscribe to UserControl size change? (wpf analog is SizeChanged) I can get Observable from Width and Height, but its not quite the same.
Nikita Tsukanov
@kekekeks
Dec 06 2017 15:53
You can subscribe to Bounds
Sergey
@PurpleGray
Dec 06 2017 16:13
Ok, thx