These are chat archives for AvaloniaUI/Avalonia

11th
Jul 2016
Nikita Tsukanov
@kekekeks
Jul 11 2016 00:20
Microsoft/BashOnWindows#637
Steven Kirk
@grokys
Jul 11 2016 00:20
wow!
Nikita Tsukanov
@kekekeks
Jul 11 2016 00:20
Now you guys don't need a Linux VM to debug avalonia on Linux
Gaurav Gogia
@DesmondANIMUS
Jul 11 2016 12:30
@grokys Thanks :) And I will. Also, I noticed that you guys are used 'Binding ' in order to Bind data. My input in that area would be to use x:Bind instead, its supposed to provide better performance than the traditional one
using*
Matthijs ter Woord
@mterwoord
Jul 11 2016 12:33
@DesmondANIMUS that guideline counts for uwp, nothing to do with avaliona
Gaurav Gogia
@DesmondANIMUS
Jul 11 2016 12:34
@mterwoord I see, I will let you people know if I see anything else I can help with :)
Steven Kirk
@grokys
Jul 11 2016 13:49
well, it would be nice to have something like x:Bind in avalonia
Matthijs ter Woord
@mterwoord
Jul 11 2016 13:52
not sure what x:bind even does on uwp, just meant to say that uwp/wpf dont have anything to do with each other (other than similar goals or whatever)
Steven Kirk
@grokys
Jul 11 2016 14:03
well yes, it's a UWP feature rather than a WPF feature
it generates code for the binding instead of doing it through reflection which improves the time taken to set up the bindings
Nikita Tsukanov
@kekekeks
Jul 11 2016 14:10
For that we'll need an actual XAML parser
that's capable of AST generation/transformation
Steven Kirk
@grokys
Jul 11 2016 14:44
This message was deleted
well... one that we can build a compiler on anyway
i think we should be able to do what we need with omnixaml/portable.xaml
Steven Kirk
@grokys
Jul 11 2016 17:08
shoutout from scott hanselman in the .net fringe keynote!
shout_out_to__grokys_in_the_.net_fringe_keynote.jpg
Darnell Williams
@Seeker1437
Jul 11 2016 17:09
Haha epic :D
Wiesław Šoltés
@wieslawsoltes
Jul 11 2016 17:09
wow!
Steven Kirk
@grokys
Jul 11 2016 17:12
he wasn't aware of it until yesterday evening when he was asking what OSS projects he should call out
Darnell Williams
@Seeker1437
Jul 11 2016 17:14
I know he is going to like it.
@grokys can you believe that I have ported Avalonia to two platforms so far? LOL I just realized this. (one of which isn't in master ofc but yeah)
Steven Kirk
@grokys
Jul 11 2016 17:24
cool! what are those two platforms?
Darnell Williams
@Seeker1437
Jul 11 2016 17:27
Android (Not the current Implementation, the first one in the droid branch), and then PI (Not Raspberry Pi)
Nikita Tsukanov
@kekekeks
Jul 11 2016 17:35
PI wasn't an actual port, you know
It was just capable of running there because even MonoDevelop can
Darnell Williams
@Seeker1437
Jul 11 2016 17:36
But by that logic would the port to android really be a port either?
Jeremy Koritzinsky
@jkoritzinsky
Jul 11 2016 17:57
Speaking of Android, we should probably get that working again at some point...
Nikita Tsukanov
@kekekeks
Jul 11 2016 18:00
What is currently broken there?
Darnell Williams
@Seeker1437
Jul 11 2016 18:04
I am not sure atm there are issues for it I believe
Jeremy Koritzinsky
@jkoritzinsky
Jul 11 2016 18:27
Someone mentioned a week or so ago here that either it crashed immediately or only showed a black screen.
Gaurav Gogia
@DesmondANIMUS
Jul 11 2016 18:31

In DemoWindow.xaml, I don't understand this line:
TargetExe="{Binding ElementName=TargetExe, Path=Text, Mode=OneWay}"

Is TargetExe a property there ??

Steven Kirk
@grokys
Jul 11 2016 18:42
TargetExe is the name of a control: ElementName means "bind to a property on the named control"
this is the same in WPF etc, though in avalonia we also have a shorthand for this which would be: TargetExe="{Path=#TargetExe.Text}" (you can leave out the OneWay part as it seems the AvaloniaDesigner.TargetExe property is one way by default
Johan Larsson
@JohanLarsson
Jul 11 2016 18:46
what is the syntax for a relativesource ancestortype binding?
Steven Kirk
@grokys
Jul 11 2016 19:01
we don't even have that yet!
Johan Larsson
@JohanLarsson
Jul 11 2016 19:02
Maybe Foo="{Path=^Window.Bar}"
where ^ would indicate up :)
Darnell Williams
@Seeker1437
Jul 11 2016 19:03
@jkoritzinsky ah that was me
It turned out to be that the debug runtime on the device was corrupted somehow
Steven Kirk
@grokys
Jul 11 2016 19:18
@JohanLarsson yeah, that was exactly what i was thinking!
i'd also like to bring some things in from knockoutjs that i've found useful there
that has things like $parent and $parent[1]
for e.g. the parent and grandparent controls
Johan Larsson
@JohanLarsson
Jul 11 2016 19:20
could that be ^1.Bar
maybe too short
Steven Kirk
@grokys
Jul 11 2016 19:20
maybe yeah, but i think i prefer $parent there
Johan Larsson
@JohanLarsson
Jul 11 2016 19:20
yeah, def adds something
$parent[Window].Bar for consistency?
Steven Kirk
@grokys
Jul 11 2016 19:21
yeah, are you reading my mind or something? ;) was just writing that
Johan Larsson
@JohanLarsson
Jul 11 2016 19:21
$parent[Grid, 2].Bar
Steven Kirk
@grokys
Jul 11 2016 19:21
nice
Johan Larsson
@JohanLarsson
Jul 11 2016 19:22
Not sure I ever used ancestorlevel though
Steven Kirk
@grokys
Jul 11 2016 19:22
yeah it'd definitely be useful!
me neither
Johan Larsson
@JohanLarsson
Jul 11 2016 19:22
but a clean way to write ancestortype would be sweet
I think $root.Bar could be nice
for stuff like binding in tooltips etc
I usually write a markupextension returning root element
Steven Kirk
@grokys
Jul 11 2016 19:26
yep!
if you could add all these thoughts to an issue, that would be awesome! ;)
Johan Larsson
@JohanLarsson
Jul 11 2016 19:29
ålrejt
Darnell Williams
@Seeker1437
Jul 11 2016 19:33
@grokys what are some of your ideas regarding getting the System.ComponentModel.TypeConverter stuff working?
We'd need to be able to support the Attribute as well possibly
Johan Larsson
@JohanLarsson
Jul 11 2016 19:35
wrote an issue, no idea if I used correct avaloina syntax or types that exists :)
Darnell Williams
@Seeker1437
Jul 11 2016 19:35
yeah I think its #581
Johan Larsson
@JohanLarsson
Jul 11 2016 19:36
maybe I forgot some, dunno
Darnell Williams
@Seeker1437
Jul 11 2016 19:36
OH sorry I misread that XD
You weren't talking to me HAHA
Wiesław Šoltés
@wieslawsoltes
Jul 11 2016 20:18
@grokys Regarding rendering issue connected to AvaloniaUI/Avalonia#580
I have made a test with following Xaml being cached:
    <StackPanel>
        <TextBlock Text="Hello from Path" Classes="default"></TextBlock>
        <ListBox>
            <ListBoxItem>Path</ListBoxItem>
        </ListBox>
        <TabControl Classes="default">
            <TabItem Header="Path" Classes="property">
                <TextBlock Text="Hello from TabItem Path" Classes="default"></TextBlock>
            </TabItem>
        </TabControl>
    </StackPanel>
and after few times that evrything got rendered only first TextBlock is rendered again
Steven Kirk
@grokys
Jul 11 2016 20:33
Interesting - could to add the info to the issue? I'm at .net fringe right now so probably won't get chance to look for a few days
Wiesław Šoltés
@wieslawsoltes
Jul 11 2016 20:33
ok
Steven Kirk
@grokys
Jul 11 2016 20:58
ah yeah, i think i know why the textblock is showing - the problem was that the data context wasn't set
because the textblock's value doesn't come from a binding, it will show
so the problem's not related to rendering but binding
the devtools should now work with core2d so you should be able to inspect and see if that's the case
Steven Kirk
@grokys
Jul 11 2016 21:39
hmm ok, so it looks like it's not a binding issue?
Wiesław Šoltés
@wieslawsoltes
Jul 11 2016 21:43
The xaml I have used does not have any bindings . The issue is inside the cached control. The bindings work as expected.
Looks more like rendering issue.
Steven Kirk
@grokys
Jul 11 2016 23:14
interesting, there are an awful lot of macs here at fringe