These are chat archives for AvaloniaUI/Avalonia

4th
Feb 2015
Richard Simpson
@RichiCoder1
Feb 04 2015 16:12
Howdy all! Wanted to express interest in the project and see if there was any (admittedly small) way I could contribute.
Steven Kirk
@grokys
Feb 04 2015 16:13
Hi @RichiCoder1!
i'm sure there is, if you don't mind stuff constantly changing beneath you feet!
there's an awful lot still to do
any area in particular you're interested in?
Richard Simpson
@RichiCoder1
Feb 04 2015 16:14
Ehh, I'm currently working with the team over @ Chocolatey, and they just completely re-wrote the client I'm writing an app against :P
I don't have any special experience besides building on top of WPF, so I can't say I have any particular expertise or interest where I could contribute
Steven Kirk
@grokys
Feb 04 2015 16:15
ah i love chocolatey. backed it on kickstarter
probably the best thing would be to try it out
try making a simple app and see what's missing and broken
which will be a lot ;)
Richard Simpson
@RichiCoder1
Feb 04 2015 16:16

I (rather poorly atm) develop the ChocolateyGUI app and assisted in testing Choco 0.9.9.

Sounds good to me! I think I can manage breaking things :)

Steven Kirk
@grokys
Feb 04 2015 16:16
then come back here and speak to me because i don't want to working on something that's going to completely change in the next week ;)
well, i mean you can if you like - but it might be frustrating!
Richard Simpson
@RichiCoder1
Feb 04 2015 16:17
Eh, I'll live. I'll see what I can do :)
Steven Kirk
@grokys
Feb 04 2015 16:17
if you're interested in xaml parsing speak to @SuperJMN
there's currently no markup so everything is defined in code
but i've tried to make it almost markup-like
the TestApplication shows you how to do it
Richard Simpson
@RichiCoder1
Feb 04 2015 16:19
Oh really? There's no XAML parsing at all at the moment?
Steven Kirk
@grokys
Feb 04 2015 16:20
no, @SuperJMN is working on it, but he's hit a roadblock
the main problem is that System.Xaml isn't a PCL
and you need to decorate the classes with attributes
which aren't in a PCL
he's come up with a way around it, as i'm sure he can explain to you
but it's causing problems
Richard Simpson
@RichiCoder1
Feb 04 2015 16:21
Hrmm. I could definitely see if I could assist there. Xaml is my favorite feature of WPF.
Steven Kirk
@grokys
Feb 04 2015 16:21
:) personally i'd prefer a markup more like qml...
but everyone else seems to like xaml
Richard Simpson
@RichiCoder1
Feb 04 2015 16:22
Xml is terrible for a great many things at this point, but for whatever reason it works well for UIs :). I just wish WPF's styling was more CSS like.
Or QML like
Steven Kirk
@grokys
Feb 04 2015 16:23
defining the UI in code isn't so bad atm
e.g.
        Window window = new Window
        {
            Title = "Perspex Test Application",
            Content = new Grid
            {
                ColumnDefinitions = new ColumnDefinitions
                {
                    new ColumnDefinition(1, GridUnitType.Star),
                    new ColumnDefinition(1, GridUnitType.Star),
                },
                RowDefinitions = new RowDefinitions
                {
                    new RowDefinition(1, GridUnitType.Star),
                    new RowDefinition(GridLength.Auto),
                },
                Children = new Controls
                {
                    new TabControl
                    {
                        Items = new[]
                        {
                            ButtonsTab(),
                            TextTab(),
                            ImagesTab(),
                            ListsTab(),
                            SlidersTab(),
                            LayoutTab(),
                            AnimationsTab(),
                        },
                        [Grid.ColumnSpanProperty] = 2,
                    },
                    (fps = new TextBlock
                    {
                        HorizontalAlignment = HorizontalAlignment.Left,
                        Margin = new Thickness(2),
                        [Grid.RowProperty] = 1,
                    }),
                    new TextBlock
                    {
                        Text = "Press F12 for Dev Tools",
                        HorizontalAlignment = HorizontalAlignment.Right,
                        Margin = new Thickness(2),
                        [Grid.ColumnProperty] = 1,
                        [Grid.RowProperty] = 1,
                    },
                }
            },
        };
Richard Simpson
@RichiCoder1
Feb 04 2015 16:23
WTB code block xD.
Edit: Yay :D
Steven Kirk
@grokys
Feb 04 2015 16:23
that's better ;)
it's not far from xaml
Richard Simpson
@RichiCoder1
Feb 04 2015 16:24
Haha, thats very QML-y.
And I suppose XAML files largely end up boiling down to that using partials anyways
Steven Kirk
@grokys
Feb 04 2015 16:25
yeah, XAML is basically a runtime version of that
and here you get compile-time checking
so i'm ok with it for the moment
i would like decent markup though!
just looking at that code
one thing that would be nice would be more terse way to specify grid rows/columns
that might be one place to start?
the grid code is just copied from moonlight and converted to C#
Richard Simpson
@RichiCoder1
Feb 04 2015 16:27
One of the nice things about XAML, it's type inference :)
Implicit conversion from string wouldn't be too hard...
Steven Kirk
@grokys
Feb 04 2015 16:28
yeah, that's probably be the way to go
unless a fluent api might work?
strings for markup anyway
Richard Simpson
@RichiCoder1
Feb 04 2015 16:29
Eh, I think fluent might end up far messier then what you've already got. And many people will assume that string to property will just work. That that might easily get messy and confusing :|
Richard Simpson
@RichiCoder1
Feb 04 2015 16:34
Huh. I never realized that Moonlight was a C++ project. I guess that makes sense though.
Steven Kirk
@grokys
Feb 04 2015 16:37
it's half and half
Richard Simpson
@RichiCoder1
Feb 04 2015 17:29
Hrmm.It's a same PresentationFoundation is MS-RSL'd. Though I suppose this is exactly why
Steven Kirk
@grokys
Feb 04 2015 17:31
what is exactly why?
José Manuel Nieto
@SuperJMN
Feb 04 2015 22:21
hey, sorry, I'm doing a move!
I'm so away
José Manuel Nieto
@SuperJMN
Feb 04 2015 22:30
@richiCoder1 If you know about XamlReaders and its internals, please tell me