These are chat archives for AvaloniaUI/Avalonia

20th
Aug 2018
WojciechKrysiak
@WojciechKrysiak
Aug 20 2018 07:36
@ALIENQuake ReactiveCommand.Create from ReactiveUI
ALIENQuake
@ALIENQuake
Aug 20 2018 08:57
@WojciechKrysiak Thanks, but ReactiveUI is too much for me at this point
WojciechKrysiak
@WojciechKrysiak
Aug 20 2018 09:16
if you don't need automatic enable/disable functionality for commands, ReactiveCommand.Create is very similar to RoutedUICommand - the static methods takes a single Action<object> parameter
Wiesław Šoltés
@wieslawsoltes
Aug 20 2018 09:26
@ALIENQuake with AvaloniaUI you can bind commands directly to methods in VM
Binding To Methods chapter
WojciechKrysiak
@WojciechKrysiak
Aug 20 2018 09:31
@wieslawsoltes Ah yeah, that's even easier
Sergey
@PurpleGray
Aug 20 2018 10:53
@danwalmsley Thanks again for your AvalonStudio.Shell!
helps a lot
Guys, what is the most convenient way to publish Avalonia application to users? For wpf ClickOnce was OK solution for example.
MonkAlex
@MonkAlex
Aug 20 2018 11:09
I think Squirrel can be alternative app for publish, but need test.
Wiesław Šoltés
@wieslawsoltes
Aug 20 2018 17:52
@grokys How would I use double bang with this IsVisible="{Binding !!}" ?
this works IsVisible="{Binding !!$self.DataContext}" but it's to verbose for my taste
danwalmsley
@danwalmsley
Aug 20 2018 17:58
@wieslawsoltes what does !! mean?
Wiesław Šoltés
@wieslawsoltes
Aug 20 2018 17:58
A "double-bang" can be used to convert a non-boolean value to a boolean value. For example to hide a control when a collection is empty:
like IsVisible="{Binding !!#groups.SelectedItem}"
in my case it checks for null
if binding is null then evaluates to false, otherwise to true
previously I have used IValueConverter
danwalmsley
@danwalmsley
Aug 20 2018 18:00
pretty useful
Wiesław Šoltés
@wieslawsoltes
Aug 20 2018 18:00
for sure, you don't need to use converter
:smile:
the issue is it does no work with IsVisible="{Binding}"
I have to use this {Binding !!$self.DataContext}
still better than using converter :smile: