These are chat archives for AvaloniaUI/Avalonia

20th
Feb 2015
Richard Simpson
@RichiCoder1
Feb 20 2015 00:47
I think both the coloring SolidColorBrush and the template part both exemplify why it's not incredibly straight forward. Thought I could see something like:
button {
    horizontal-content-alignment: center;
    vertical-content-aligment: center;
    template: default;

    ::template #border {
        background: solid(0xffdddddd);
        border-brush: solid(0xff707070);
        border-thickness: 2;
        foreground: solid(0xff000000);
    }

    :pointer-over {
        ::template #border {
            background: solid(0xffbee6fd);
            border-brush: solid(0xff3c7fb1);
        }

        :pressed::template #border {
            background: solid(0xffc4e5f6);
        }
    }

    :pressed::template #border{
        border-brush: solid(0xffff628b);
    }

    :disabled::template  #border{
        foreground: solid(0xff7f7f7f);
    }
}
Steven Kirk
@grokys
Feb 20 2015 00:49
Yes that looks good!
Though not sure his or would fit into existing markup language
I'm working on a markup language myself in the pml branch
want it to look something like this:
Window {
Title: "Perspex Test Application"
Grid {
  ColumnDefinitions: "*,*"
  RowDefinitions: "1*,Auto"

  TabControls {
    Grid.ColumnSpan: 2

    TabItem {
      Header: "Buttons"
      StackPanel {
        Orientation: Vertical
        HorizontalAlignment: Center
        VerticalAlignment: Center
        Gap: 8
        MinWidth: 120
i've managed to get the property values parsed by Roslyn
the idea is that they can be any C# expression
not sure how practical it'll be, but it's a nice idea
Richard Simpson
@RichiCoder1
Feb 20 2015 00:52
Very cool! That's clever. I just went with what I did because I was thnking literal CSS.
How does it (or my css) handle templates? I know you can have inline XAML in WPF styles (for data-template and content and stuff)
Does that still end up being a necessary thing?
Steven Kirk
@grokys
Feb 20 2015 00:54
still pretty early days yet - not really anything working yet
but templates i think sould just be handled like the rest of the tree
as for interaction with styles - i've not even got round to thinking about that
i'd be interested to hear ideas!
Richard Simpson
@RichiCoder1
Feb 20 2015 00:56
I'll chew on it. I think one thing I may try and do for funsies is trying porting my app chocolatey/ChocolateyGUI and see what issues I run into and solutions I can come up with.
Steven Kirk
@grokys
Feb 20 2015 01:32
oh you will run into lots of issues!! but yeah, a demo app would be useful even if just to know where to go next
José Manuel Nieto
@SuperJMN
Feb 20 2015 10:04

ColumnDefinitions: ","
RowDefinitions: "1*,Auto"

Fresssh!

Shit, it doesn't show the asterisks
José Manuel Nieto
@SuperJMN
Feb 20 2015 11:25
by the way, I still don't know how we could hold "static" resources
Steven Kirk
@grokys
Feb 20 2015 11:26
yeah, there are a lot of things still to work out!
José Manuel Nieto
@SuperJMN
Feb 20 2015 11:27
listen, I would like to make a sample application that could be used as a showcase
Steven Kirk
@grokys
Feb 20 2015 11:27
yeah, that would be useful
José Manuel Nieto
@SuperJMN
Feb 20 2015 11:27
I thought about porting one application like this:
Steven Kirk
@grokys
Feb 20 2015 11:27
unfortunately i'm rather busy with my day job at the moment
so i haven't much time to work on perspex/help with things right now :(
I know!
it's normal
don't worry
Steven Kirk
@grokys
Feb 20 2015 11:28
yeah, i think something like that should be do-able already
José Manuel Nieto
@SuperJMN
Feb 20 2015 11:28
a little application like that
It doesn't use many advanced things
Steven Kirk
@grokys
Feb 20 2015 11:28
would be interesting to see how far you get!
José Manuel Nieto
@SuperJMN
Feb 20 2015 11:29
have you made the SelectedItem property work for ListBoxes?
Steven Kirk
@grokys
Feb 20 2015 11:29
yes it should work i think
José Manuel Nieto
@SuperJMN
Feb 20 2015 11:29
OK
I will have to check!
José Manuel Nieto
@SuperJMN
Feb 20 2015 11:34
I think everything could be made
not so fancy, but, yes