These are chat archives for AvaloniaUI/Avalonia

19th
Aug 2018
Marian Šámal
@mariansam
Aug 19 2018 13:33
Hello, in your Contributing page, you say "DO NOT USE #REGIONS full stop.". What is #REGION full stop? I tried asking Google, but I didn't find any answer.
Marian Šámal
@mariansam
Aug 19 2018 14:00
@jmacato, yeah, I know what is #region, but I don't know what is the full stop
Jumar Macato
@jmacato
Aug 19 2018 14:01
Ahh, that implies you must never use the #regions directive on your future contributions on Avalonia :)
The language on that page should be made a bit clearer i suppose
Marian Šámal
@mariansam
Aug 19 2018 14:03
Okey, I never use them at all
Jumar Macato
@jmacato
Aug 19 2018 14:03
Alright! :smile:
Vsevolod Pilipenko
@Karnah
Aug 19 2018 15:37

Good day all. Did you know about this bug with Templates?
I have UserControl with direct property with custom type. I create in App.xaml style for this control.

<Style Selector="nms|MyUserControl">
    <Setter Property="Template">
      <ControlTemplate>
        <Image Stretch="Fill" Source="{TemplateBinding DirectProperty.Bitmap}" />
      </ControlTemplate>
    </Setter>
</Style>

Method GetCorrectlyTypedValue in XamlObjectWriter tries resolve type from string "DirectProperty". And it can't. Then if I'll write DirectPropery with namespace like this:

<Style Selector="nms|MyUserControl">
    <Setter Property="Template">
      <ControlTemplate>
        <Image Stretch="Fill" Source="{TemplateBinding dpnms:DirectProperty.Bitmap}" />
      </ControlTemplate>
    </Setter>
</Style>

in AvaloniaPropertyTypeConverter.ConvertFrom property will be null as DirectProperty type not a AvaloniaObject. In stable build it was worked fine.

Jeremy Koritzinsky
@jkoritzinsky
Aug 19 2018 15:47
Yeah we have a breaking change with TemplateBinding. If you are using a binding path you have to switch to a regular binding with a RelativeSourceMode of TemplatedParent now. TemplateBinding only works for paths that are just a property name.
Vsevolod Pilipenko
@Karnah
Aug 19 2018 15:52
Thanks for answer, @jkoritzinsky!
Sergey Khabibullin
@x2bool
Aug 19 2018 17:49
Any ideas why ListBox might not react to ReactiveList's Add & AddRange methods? Binding is alright because replacing ReactiveList does work.
ALIENQuake
@ALIENQuake
Aug 19 2018 18:18
Hi
I have simple c# Windows Forms/WPF Launcher app
I need help to convert it to Avalonia
Does anyone want to spare some time and help ?
Krutonium
@Krutonium
Aug 19 2018 18:20
I havn't super used Avalonia a lot, but I would be interested in helping, though I will only be really available in around 6 hours
ALIENQuake
@ALIENQuake
Aug 19 2018 18:21
@Krutonium any help would be appreciated :)
Krutonium
@Krutonium
Aug 19 2018 18:22
What is the launcher for?
Vsevolod Pilipenko
@Karnah
Aug 19 2018 18:23
Sorry, you are do really a amazing job. I'd like help you, but all I have - my vague observations.
At the beginning I've used Skia. But I have problem, which I described in #1751.
Then I've started using Direct2D1. But now my application often crush at base window constructor, class WindowImpl, method CreateWindowOverride. It seems to me, that it connected with a huge number of Bitmaps what I creating. Maybe someone came across this?
ALIENQuake
@ALIENQuake
Aug 19 2018 18:23
It's just open application, open readme.html, open webpage and launch process from commandline
Krutonium
@Krutonium
Aug 19 2018 18:24
No built in updater or anything?
ALIENQuake
@ALIENQuake
Aug 19 2018 18:24
no, simeple exe file
Krutonium
@Krutonium
Aug 19 2018 18:24
Regardless, that shouldn't be too hard. #FamousLastWords
ALIENQuake
@ALIENQuake
Aug 19 2018 19:20
Hey

<TextBlock Name="EETLauncherMain_LB_HOMEPAGE">HOMEPAGE</TextBlock>
so now I want to add MouseButton action
MouseDown="EETLauncherMain_LB_HOMEPAGE_MouseDown"
but it tels me

unknown member '{clr-namespace:Avalonia.Controls;assembly=Avalonia.Controls}TextBlock.MouseDown'

what's action name for clicking mouse button ?
jp2masa
@jp2masa
Aug 19 2018 19:22
maybe Click?
ALIENQuake
@ALIENQuake
Aug 19 2018 19:38
yep, it was Click
now, what's the equivelent of RoutedUICommand ?
Severity Code Description Project File Line Suppression State
because i'm getting error: The type or namespace name 'RoutedUICommand' could not be found
I have
using Avalonia;
using Avalonia.Controls;
using Avalonia.Input;
using Avalonia.Interactivity;
added