These are chat archives for AvaloniaUI/Avalonia

7th
Mar 2016
Ivan Kochurkin
@KvanTTT
Mar 07 2016 08:41
best way to add text to a canvas is by adding a TextBlock
Yes, but margin manipulation for position setting up does not look good.
danwalmsley
@danwalmsley
Mar 07 2016 11:00
@grokys no problem mate
Steven Kirk
@grokys
Mar 07 2016 11:09
@KvanTTT could you explain? not sure what you mean
Ivan Kochurkin
@KvanTTT
Mar 07 2016 12:03
When I add Rectangle to canvas, I point Left, Top, Width, Height properties. But for TextBlock I have only Margin. But Margin is not a position property, it's indent.
Darnell Williams
@Seeker1437
Mar 07 2016 12:06
Not sure if this even expands on @KvanTTT but this should not be normal behavior
Steven Kirk
@grokys
Mar 07 2016 12:07
ahh.. ok i think i understand. you need to set the canvas attached properties. this is the same as for wpf: http://www.wpf-tutorial.com/panels/canvas/
Darnell Williams
@Seeker1437
Mar 07 2016 12:07
http://puu.sh/npGf0/36f89d18b9.gif okay it doesnt but I guess I need help understanding why this happens
Steven Kirk
@grokys
Mar 07 2016 12:08
so you'll do something like <TextBlock Canvas.Left="10" Canvas.Top="10" Canvas.Right="100" Canvas.Bottom="100"/>
@Seeker1437 i'm guessing that is a bug
Darnell Williams
@Seeker1437
Mar 07 2016 12:09
Oh right yeah canvas is different
sorry for doubleposting the picture on my phone
Ivan Kochurkin
@KvanTTT
Mar 07 2016 12:11
@grokys , thank you for pointing me out. It works!
Denis Zaporozhets
@QuantumDeveloper
Mar 07 2016 22:07
hi to all)
who want to implement grid span algorithm? m?
the problem with my is that it calculate spanning correctly only until first grid resizing
and after resizing spanning becomes completely incorrect
Steven Kirk
@grokys
Mar 07 2016 22:56
it sounds like you're passing the wrong value to Measure