These are chat archives for AvaloniaUI/Avalonia

27th
Jan 2015
José Manuel Nieto
@SuperJMN
Jan 27 2015 09:33
cool! I'll take a look!
José Manuel Nieto
@SuperJMN
Jan 27 2015 10:00
OK, confirmed! Grid.Column = 1, but it appears as 0
Capture.PNG
Steven Kirk
@grokys
Jan 27 2015 10:55
Ok, I will fix that. Could you file an issue just so I don't forget?
José Manuel Nieto
@SuperJMN
Jan 27 2015 11:18
OK!
José Manuel Nieto
@SuperJMN
Jan 27 2015 11:26
done, the issue is there
José Manuel Nieto
@SuperJMN
Jan 27 2015 15:51
arrghh I cannot debug the thing, they're pushing at work :S
José Manuel Nieto
@SuperJMN
Jan 27 2015 19:31
OK, I know what's happening there. The issue is that... the replicated Grid doesn't have it's ColumnDefinitions copied!!
it's my problem!
I've got to solve it
I'm going to dismiss the issue
Steven Kirk
@grokys
Jan 27 2015 19:32
ahhh! ;)
José Manuel Nieto
@SuperJMN
Jan 27 2015 19:33
Done, no issue at all!
I'm trying to fix it now
José Manuel Nieto
@SuperJMN
Jan 27 2015 19:42
arhg
nice problem I have now
ColumnDefinitions is not a DP
I could try to just copy CLR properties
but I shouldn't copy every of them!
Steven Kirk
@grokys
Jan 27 2015 19:44
yeah
José Manuel Nieto
@SuperJMN
Jan 27 2015 19:44
nasty
Steven Kirk
@grokys
Jan 27 2015 19:44
i thought you'd run into problems
José Manuel Nieto
@SuperJMN
Jan 27 2015 19:44
like this
yeah
Steven Kirk
@grokys
Jan 27 2015 19:44
IMO you're going about it wrong
as i've tried to say many times ;)
you shouldn't be copying visual trees
José Manuel Nieto
@SuperJMN
Jan 27 2015 19:45
yes, but I haven't explored the other ways so I don't feel sure about them!
Steven Kirk
@grokys
Jan 27 2015 19:45
you should be keeping a record like: create X, set property Y to Z, set property A to B
José Manuel Nieto
@SuperJMN
Jan 27 2015 19:46
yes
Steven Kirk
@grokys
Jan 27 2015 19:46
which is what i imagine the xaml deferred reader does under the hood
José Manuel Nieto
@SuperJMN
Jan 27 2015 19:46
I could do something like that
Steven Kirk
@grokys
Jan 27 2015 19:46
because the are properties that have interdependencies
so it's quite possible that simply setting A to B won't make A = B
for example Minimum and Value on a scroll bar
José Manuel Nieto
@SuperJMN
Jan 27 2015 19:48
but that should be resolved using DPs
they don't rely on the sequence of setting them
Steven Kirk
@grokys
Jan 27 2015 19:48
if you have coersion on a DP then the order in which you set them can make a difference
José Manuel Nieto
@SuperJMN
Jan 27 2015 19:49
that shouldn't happen!
in WPF you can set the value to 10
and the minimum to 20
the value will be 20, yeah
but as soon as you lower the minum to 5, Value will be 10
Steven Kirk
@grokys
Jan 27 2015 19:51
ah ok, yeah sorry i'd remember badly
ok, Text and SelectedIndex on a TextBox
José Manuel Nieto
@SuperJMN
Jan 27 2015 19:52
contains a video to make it work like WPF in Silverlight
Steven Kirk
@grokys
Jan 27 2015 19:53
perspex already has coercion
it's currently only used in 2 places - on TextBox.CaretIndex and ScrollViewer.Offset
but the point still stands... order of setting properties can matter
José Manuel Nieto
@SuperJMN
Jan 27 2015 19:58
haha
misteries!
I'm looking into the Deferred thing
Steven Kirk
@grokys
Jan 27 2015 20:02
oh by the way: Perspex.Diagnostics.Debug.PrintVisualTree is a life saver when the devtool doesn't work
in case you ever need it
also for debugging unit tests
José Manuel Nieto
@SuperJMN
Jan 27 2015 20:05
cool!
thanks :D