These are chat archives for AvaloniaUI/Avalonia

25th
Mar 2016
danwalmsley
@danwalmsley
Mar 25 2016 00:01
:) yeh
Steven Kirk
@grokys
Mar 25 2016 00:02
i think the real solution though is fo me to improve diagnostics
danwalmsley
@danwalmsley
Mar 25 2016 00:03
well if you have a control that doesn't have a width, when its in a grid, it will take the size of the grid and fill it up
in stackpanel it ends up being 0 width
Steven Kirk
@grokys
Mar 25 2016 00:03
it should depend on it's HorizontalAlignment
though i'm quite willing to accept that StackPanel's getting some stuff wrong
danwalmsley
@danwalmsley
Mar 25 2016 00:07
ok here is simple repro
now it might be just that StackPanel isn't meant to do what I think it should
<Window xmlns="https://github.com/perspex">
  <Grid>
    <StackPanel Orientation="Horizontal">
      <Grid Width="100" Background="Red" />
      <Grid Background="Green" />  
    </StackPanel>    
  </Grid>  
</Window>
what ever I do I cant get the green grid to fill the remaining space
danwalmsley
@danwalmsley
Mar 25 2016 00:14
ok its DockPanel I needed
it works :)
James Walmsley
@jameswalmsley
Mar 25 2016 00:15
screenshots :P
Steven Kirk
@grokys
Mar 25 2016 00:23
well nothing in your example displays because the first grid has a height of 0
and it's a horizontal stack panel... so there is no "remaining space" - the stack panel takes up the space necessary to fit its children
which in this case is width=100, height = 0
it if you say "stack 100 coins and 0 coins", how large is your stack?
Steven Kirk
@grokys
Mar 25 2016 00:36
hi @jameswalmsley !
danwalmsley
@danwalmsley
Mar 25 2016 00:37
ok fair enough
with dockpanel its almost working
Steven Kirk
@grokys
Mar 25 2016 00:50
i'm still interested to know what's causing the binding problem though
danwalmsley
@danwalmsley
Mar 25 2016 00:56
just tried with ridiculously long property name and it was fine
I'm sure I have seen that
might be in certain circumstances
il keep an eye out
ok dude sorry to have been a pest tonight
I'm gonna call it a night
cya later
Steven Kirk
@grokys
Mar 25 2016 02:34
no not at all, it's always good to have questions! later!
Darnell Williams
@Seeker1437
Mar 25 2016 04:04
@grokys :DDDDDD
I just can't select any of them currently XD
Steven Kirk
@grokys
Mar 25 2016 10:22
cool! starting simple worked then? ;)
Darnell Williams
@Seeker1437
Mar 25 2016 10:23
Yep xD, now im trying tonfigure out being able to select things xD onpy the first one is ever selected

I also just discovered why TabItem is working and DockItem is not

It's done here

        private void PrepareChildContainerForItemOverride(Control control, object o)
        {
            var dockItem = control as DockItem;
            if (dockItem != null && HeaderMemberPath != null)
            {
                var contentBinding = new Binding { Path = HeaderMemberPath, Source = o };
                dockItem.Bind(ContentControl.ContentProperty, contentBinding);
                dockItem.UnderlyingContent = o;
            }

            SetIsWrappingTab(control, o is TabItem);
        }
Steven Kirk
@grokys
Mar 25 2016 17:22
ok @danwalmsley i've tried to improve logging of binding errors a little bit - there's still a lot to do but it should at least log a bit of info now
see the docs at https://github.com/Perspex/Perspex/blob/master/docs/spec/logging.md for enabling logging in your app
danwalmsley
@danwalmsley
Mar 25 2016 17:37
@grokys thanks for that, will be really helpful :D
Steven Kirk
@grokys
Mar 25 2016 17:38
you can also get it to log all property changes etc, and even hook it up to Seq to drill into the data
Steven Kirk
@grokys
Mar 25 2016 17:46
@danwalmsley i've also made a small change to Popup to try and make it a little less annoying! Perspex/Perspex@9f8d9ed
Wiesław Šoltés
@wieslawsoltes
Mar 25 2016 19:07
@grokys I was playing with logging and found some issue, created PR Perspex/Perspex#486
Steven Kirk
@grokys
Mar 25 2016 19:08
thanks, what exactly are the issues?
Wiesław Šoltés
@wieslawsoltes
Mar 25 2016 19:08
in binding test app the dependencies have been missing
did some other changes, if you dont like them I can remove
and enabled logging in xaml test app
Steven Kirk
@grokys
Mar 25 2016 19:11
in binding test app the dependencies have been missing
hmm, i can't see what from the PR... what was missing?
Steven Kirk
@grokys
Mar 25 2016 19:12
ah... ok - strange it worked for me then?
anyway, looks good - will merge when CI finishes
Wiesław Šoltés
@wieslawsoltes
Mar 25 2016 19:13
yeah worked somehow but in app.xamls.cs you got strange warnings
and I was trying to solve some issue while adding loging, as it turns out PLC does not like .WriteTo.Trace(outputTemplate: "{Area}: {Message}") as it depends on Serilog.FullNetFx
Steven Kirk
@grokys
Mar 25 2016 19:37
also @danwalmsley high DPI support should work again
Steven Kirk
@grokys
Mar 25 2016 19:51
oh - except it's broke DropDown in high DPI
danwalmsley
@danwalmsley
Mar 25 2016 19:55
@grokys just trying it now
yeh looks much better, DropDown and ContextMenu and Menu seem to be all affected in the same way
Steven Kirk
@grokys
Mar 25 2016 19:58
yeah, just committed a fix for that
danwalmsley
@danwalmsley
Mar 25 2016 20:00
ok cool I'll test it when its completed ci
Steven Kirk
@grokys
Mar 25 2016 20:00
aargh! but that seems to have broken TextBox again
WTF?
danwalmsley
@danwalmsley
Mar 25 2016 20:02
haha
ah @grokys it wasn't a scaling issue
it was an offset issue
when your on high dpi
it works as long as the window is up against top left of screen
Steven Kirk
@grokys
Mar 25 2016 20:03
yeah, i'm having trouble working out when something needs scaling and when it doesn't
danwalmsley
@danwalmsley
Mar 25 2016 20:03
if not where it thinks your selecting text is where it should be + the offset of top left of window, from top left of screen
Steven Kirk
@grokys
Mar 25 2016 20:05
not sure... part of the problem is that the docs for the win32 ScreenToClient and ClientToScreen don't mention whether they automatically handle DPI scaling or not
i think they do ...
danwalmsley
@danwalmsley
Mar 25 2016 20:07
it would make sense
an application shouldn't have to be aware of that right?
Steven Kirk
@grokys
Mar 25 2016 20:08
well obviously it does need to be... ;)
danwalmsley
@danwalmsley
Mar 25 2016 20:08
yeh
Steven Kirk
@grokys
Mar 25 2016 20:09
i've got to go out now, i'll take another look tomorrow hopefully