These are chat archives for AvaloniaUI/Avalonia

11th
Dec 2017
danwalmsley
@danwalmsley
Dec 11 2017 09:21
going to merge #1298
shout up if someone wants to hold off
(track arrange thing)
Steven Kirk
@grokys
Dec 11 2017 09:28
thanks @danwalmsley !
danwalmsley
@danwalmsley
Dec 11 2017 09:29
amazing how much memory was saved with the observeon PR
@grokys did you see my repro for the content presenter logic fixes #1284?
Steven Kirk
@grokys
Dec 11 2017 09:32
yeah, thanks - not had chance to look at it yet though
danwalmsley
@danwalmsley
Dec 11 2017 09:33
cool :)
Sergey
@PurpleGray
Dec 11 2017 11:50
x:Static markup extension is yet not supported?
Nikita Tsukanov
@kekekeks
Dec 11 2017 11:51
which version are you using?
Sergey
@PurpleGray
Dec 11 2017 12:25
0.5.2-build4323-alpha
Nikita Tsukanov
@kekekeks
Dec 11 2017 12:28
Make sure that you've imported the corresponding namespace
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Sergey
@PurpleGray
Dec 11 2017 12:30
facepalm, did not notice
Matthijs ter Woord
@mterwoord
Dec 11 2017 12:31
error handling in avalonia and/or its xaml handling dependencies is an area that needs some love, imo....
Sergey
@PurpleGray
Dec 11 2017 15:50
Is there any way to set Background color globally for all controls? <Style Selector="TemplatedControl> with Setter did not work
jp2masa
@jp2masa
Dec 11 2017 15:51
#973
Sergey
@PurpleGray
Dec 11 2017 15:52
ty
Sergey
@PurpleGray
Dec 11 2017 15:57
didnt work
Nikita Tsukanov
@kekekeks
Dec 11 2017 15:58
It's a known issue
@grokys do we want to have it fixed before release?
It's annoying
Steven Kirk
@grokys
Dec 11 2017 22:14
as i mention in the issue, simply specifying the TypeName matches on StyleKey
if you want to match a control of any type that implements T use :is(T)
Nikita Tsukanov
@kekekeks
Dec 11 2017 22:16
Hmmmm
I think there was another issue
Steven Kirk
@grokys
Dec 11 2017 22:16
i did say that we should change it, but i think that would break stuff
Nikita Tsukanov
@kekekeks
Dec 11 2017 22:16
With template values having LocalValue priority
not sure if that's fixed
Steven Kirk
@grokys
Dec 11 2017 22:17
ah no, that's not fixed. i'd love to fix that, but it'll take some work, not sure quite how to do it...
i think it'll have to be done at the XAML level
as the Style priority must only apply to the current control being templated, not controls that appear in the template
but regarding @Stratocast3r 's question, i think <Style Selector=":is(TemplatedControl)"> should work
i could have sworn i wrote some documentation on this
i can never find stuff in our documentation, god help our users!
Nikita Tsukanov
@kekekeks
Dec 11 2017 22:20
Just checked with
    <Style Selector=":is(Control).active">
        <Setter Property="Border.Background">Red</Setter> 
    </Style>
Works
Steven Kirk
@grokys
Dec 11 2017 22:20
ok great
Nikita Tsukanov
@kekekeks
Dec 11 2017 22:21
We need a manual about styling system at least
Steven Kirk
@grokys
Dec 11 2017 22:21
i think i need to close #973 again, because changing the behavior will make incorrect templates get applied to controls i think
Nikita Tsukanov
@kekekeks
Dec 11 2017 22:21
everything else doesn't surprise people who come from WPF
styling system does
Steven Kirk
@grokys
Dec 11 2017 22:22
yeah
btw i did start writing a tutorial app and documentation, i need to publish that
still a lot to do however
Nikita Tsukanov
@kekekeks
Dec 11 2017 22:22
We need to modify the default behavior
Steven Kirk
@grokys
Dec 11 2017 22:22
modify it how?
Nikita Tsukanov
@kekekeks
Dec 11 2017 22:22
But derived types must explicitly specify that they want to inherit styles
Steven Kirk
@grokys
Dec 11 2017 22:23
yeah, they do that by changing the StyleKey
Nikita Tsukanov
@kekekeks
Dec 11 2017 22:23
Not exactly
If you change StyleKey, you won't be able to specify styles for derived type itself
Steven Kirk
@grokys
Dec 11 2017 22:26
so you want to be able to merge two templates? or something else?
i do agree that we can probably improve the default behavior here
Nikita Tsukanov
@kekekeks
Dec 11 2017 22:26
yep, something like that
Steven Kirk
@grokys
Dec 11 2017 22:28
i'd love to hear a proposal! :) it's something i've found myself wishing i could do it WPF: change just parts of a template
but i have no idea how it would be done...
Nikita Tsukanov
@kekekeks
Dec 11 2017 22:32

change just parts of a template

fixing that LocalValue thingy would be a nice starting point)

Steven Kirk
@grokys
Dec 11 2017 22:39
Yeah I agree, i will take a look at that after beta1 then
Nikita Tsukanov
@kekekeks
Dec 11 2017 23:51
AvaloniaUI/Avalonia#1313
@grokys @danwalmsley @jkoritzinsky @wieslawsoltes @mterwoord