These are chat archives for AvaloniaUI/Avalonia

25th
Apr 2018
Nikita Tsukanov
@kekekeks
Apr 25 2018 10:54
Meanwhile in Rider
изображение.png
Matthijs ter Woord
@mterwoord
Apr 25 2018 11:01
nice!
how's that done?
Nikita Tsukanov
@kekekeks
Apr 25 2018 11:04
They've added mapping for Avalonia.Metadata.XmlnsDefinitionAttribute when root xmlns is https://github.com/avaloniaui
Matthijs ter Woord
@mterwoord
Apr 25 2018 11:05
awesome!!
that's a first step in first-class avalonia intellisense support imo
🕹️ Des Mayer
@DesmondMayer_twitter
Apr 25 2018 11:10
I am trying to replicate the InterlopTest but ran into an issue.
AppBuilder.Configure<App>().UseWin32().UseDirect2D1().SetupWithoutStarting(); give me a namespace error on <App>
FuadNagiyev
@FuadNagiyev
Apr 25 2018 11:13

Hi Guys,
i have some questions (because I'm struggeling at the moment a little bit with Avalonia):
I'm coding an loading indicator.

  1. Does Avalonia provide a possibility on User Control to fire Loaded and UnLoaded Events?
  2. When I get an Element from XAML in XAML.cs by this.Find<RotateTransform>("SpinnerRotate") - and change the value of its Angle - will the change passed to the XAML automatically, or do I have to tell the XAML, that the value of Angle has changed?
  3. Does Avalonia have an equivalent to WPF IsVisibleChanged?

Thanks in advance. :)

Nikita Tsukanov
@kekekeks
Apr 25 2018 11:25
@DesmondMayer_twitter you still need an App class
@FuadNagiyev
1) see attached/detached to visual tree events
2) XAML is only used for loading objects, everything you change goes straight to the object model
3) do you mean the "effective" visibility that propagates from the parent?
🕹️ Des Mayer
@DesmondMayer_twitter
Apr 25 2018 11:27
@kekekeks I am in the WinInterlopTest folder and cannot locate where the App class sits? I am missing something simple?
Oh, you mean win interop
It reuses the ControlCatalog project
This one
🕹️ Des Mayer
@DesmondMayer_twitter
Apr 25 2018 11:30
Would also explain why I am getting an error on MainView too
FuadNagiyev
@FuadNagiyev
Apr 25 2018 11:58
@kekekeks yes, I mean the effective "IsVisible" which will be typed in into the XAML.
Nikita Tsukanov
@kekekeks
Apr 25 2018 14:10
IsEffectivelyVisible
It's not bindable though
noah the goodra
@jfmherokiller
Apr 25 2018 14:25
@kekekeks is the xaml thing in the 2018.1 version of rider?
Nikita Tsukanov
@kekekeks
Apr 25 2018 14:27
Yep
Talking to devs on conferences does wonders
noah the goodra
@jfmherokiller
Apr 25 2018 14:28
ill check it out then since ive noticed rider uses slightly less cpu then visual studio for mac
Matthijs ter Woord
@mterwoord
Apr 25 2018 14:28
:)
noah the goodra
@jfmherokiller
Apr 25 2018 14:29
i just wish i could get it to stop complaining about winforms lol
could write a stub library lol
Matthijs ter Woord
@mterwoord
Apr 25 2018 14:29
complain about winforms?
noah the goodra
@jfmherokiller
Apr 25 2018 14:30
@mterwoord if your project uses winforms on a nonwindows os in rider it says it cant find System.Windows.Forms
Matthijs ter Woord
@mterwoord
Apr 25 2018 14:31
ahh, oke. cant you build against mono's winforms?
noah the goodra
@jfmherokiller
Apr 25 2018 14:32
well probably not on osx because winforms arent ported to mono64 yet
Matthijs ter Woord
@mterwoord
Apr 25 2018 14:33
ah oke
probably not allowed, but you could copy over a winforsm dll to mac osx, just for building.. probably
noah the goodra
@jfmherokiller
Apr 25 2018 14:35
yea but i just commented the code out for now
im mostly using the winforms as a temp till i get avalonia working
also @kekekeks the event subscription is not complete in rider yet i think
Click="btnNewGame_Click" has an unresolved symbol error
when i know the symbol is defined in the .xaml.cs file
Nikita Tsukanov
@kekekeks
Apr 25 2018 14:46
Do you have x:Class in your XAML? We don't support it since we aren't doing the code gen, but Rider expects you to have it
It also complains about DynamicResource being used with non-dependency properties and other things
The support is not complete, but at least it has some intellisense
For the first-class support in Rider Avalonia needs a significant user base
noah the goodra
@jfmherokiller
Apr 25 2018 16:21
@kekekeks I do not have x:Class
i guess add that to the Window tag?
noah the goodra
@jfmherokiller
Apr 25 2018 16:28
nvm even adding it doesnt satisfy the intellisense lol
noah the goodra
@jfmherokiller
Apr 25 2018 16:33
does main still need [STAThread] if running Avalonia?
Nikita Tsukanov
@kekekeks
Apr 25 2018 16:36
Might be needed for clipboard and dialogs
noah the goodra
@jfmherokiller
Apr 25 2018 16:44
so leave it?
because i have it there from when i was working on the Winforms temp interface
noah the goodra
@jfmherokiller
Apr 25 2018 18:19
but does anyone know how to build the previewer for mac?
Jacob Millward
@JacobMillward
Apr 25 2018 19:00
So this is a really simple question I'm sure. I'm playing with Avalonia and I'm having an error after adding a Button element after the TextBlock one in the template
Can a Window only have one child? (XAML)
jp2masa
@jp2masa
Apr 25 2018 19:06
yes
to have multiple controls you need a container
Jacob Millward
@JacobMillward
Apr 25 2018 19:06
Is there documentation on this anywhere?
jp2masa
@jp2masa
Apr 25 2018 19:10
not sure, that's how it works on WPF too
most WPF docs apply to Avalonia, except for styling I think
Jacob Millward
@JacobMillward
Apr 25 2018 19:11
Ah ok.
I've also just encountered a bug when the windows height is shrunk to nothing, then tried to be increased