These are chat archives for AvaloniaUI/Avalonia

15th
Nov 2016
Andrew
@zezba9000
Nov 15 2016 00:34
FYI I get the warning:
Severity Code Description Project File Line Suppression State
Warning There was a mismatch between the processor architecture of the project being built "AMD64" and the processor architecture of the reference "Avalonia.Skia.Desktop, Version=1.0.0.0, Culture=neutral, processorArchitecture=x86", "x86". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. GitItGUI
So only x86 is supported as is then

I also have this warning that looks like some NuGet packages need different versions of some dependency:
Severity Code Description Project File Line Suppression State
Warning Found conflicts between different versions of the same dependent assembly. Please set the "AutoGenerateBindingRedirects" property to true in the project file. For more information, see http://go.microsoft.com/fwlink/?LinkId=294190. GitItGUI
Darnell Williams
@Seeker1437
Nov 15 2016 10:05
Make sure all your nugets are up to date on all your project @zezba9000
Andrew
@zezba9000
Nov 15 2016 17:57
@Seeker1437 They are.
Is that warning related to what you were talking about before with the bit issue and Skia @danwalmsley ?
José Manuel Nieto
@SuperJMN
Nov 15 2016 18:08
Hey people! I'm loading a Window and the content area is black. The styles of the application look OK
Application.Styles has the correct style for the Window (with the Background color set to "#FFFFFFFF")
I don't know what's going on. The Window is completely black and I cannot see anything
Steven Kirk
@grokys
Nov 15 2016 18:52
does Window have a visual child?
and what is the value of its Template property?
José Manuel Nieto
@SuperJMN
Nov 15 2016 21:25
whoops! Template = null!
and VisualChildren has 0 items
I'm not sure why!
I have published a branch to reproduce the issue. Could you please run Samples\OmniXAMLv2App from this branch? https://github.com/SuperJMN/Avalonia-JMN/tree/blackwindow
(the branch name is blackwindow)
Maybe it's OmniXAMLv2 that is not behaving well
danwalmsley
@danwalmsley
Nov 15 2016 21:31
just giving it a quick go!
José Manuel Nieto
@SuperJMN
Nov 15 2016 21:32
Inside the Project you will quickly find out that I'm loading App.xaml (from App.xaml.cs)
This temporal code load it:
    public override void Initialize()
    {
        var assetLoader = AvaloniaLocator.Current.GetService<IAssetLoader>();

        using (var stream = new StreamReader(assetLoader.Open(new Uri("resm:AvaloniaApp.App.xaml?assembly=AvaloniaApp"))))
        {
            var xaml = stream.ReadToEnd();
            Loader.Load(xaml, this);
        }
    }
@grokys I hope you take a look, too.
thanks, @danwalmsley :)
danwalmsley
@danwalmsley
Nov 15 2016 22:03
@SuperJMN which project should I run?
José Manuel Nieto
@SuperJMN
Nov 15 2016 22:04
Inside the Samples folder, look for the OmniXAMLv2App project
do you see it? If you don't, switch to the blackwindow branch
Try to compile it first
if it doesn't compile, unload every Project inside the Gtk folder
it sometimes takes a few tries :)
danwalmsley
@danwalmsley
Nov 15 2016 22:06
ok
I'm on the correct branch now..
did you try running it with omnixaml 1 to see if it did same thing?
José Manuel Nieto
@SuperJMN
Nov 15 2016 22:12
yes, I did, but I'm getting the same
anyways, I did some changes to v1 in order to work with the same XAML (the special namespace (usually prefixed "x") and the "clr-namespace:" has turned to "using:"
but I don't think those changes broke anything
not sure, though!
danwalmsley
@danwalmsley
Nov 15 2016 22:26
ok I'm at the black window stage...
image.png
José Manuel Nieto
@SuperJMN
Nov 15 2016 22:28
it's so dark...
I can see the trouble inside it
danwalmsley
@danwalmsley
Nov 15 2016 22:31
hehe
me neither
its definitely loading styles...
is the order of app config the same as in the other applications?
Template is definitely null though,
José Manuel Nieto
@SuperJMN
Nov 15 2016 22:32
I think it's basically the same
danwalmsley
@danwalmsley
Nov 15 2016 22:32
did it fail to load templates somehow?
José Manuel Nieto
@SuperJMN
Nov 15 2016 22:32
yes, it is!
are templates loaded with the Styles?
like <Style><Setter Property="ControlTemplate" Value="..." /> /<Style>
I mean, does the Window get its templete from the Style inside Avalonia.Themes.Default\Window.xaml?
danwalmsley
@danwalmsley
Nov 15 2016 22:36
Yes
definitely comes from there
which it gets from ... <StyleInclude Source="resm:Avalonia.Themes.Default.DefaultTheme.xaml?assembly=Avalonia.Themes.Default"/>
checking when ontemplateappled gets called in the working version
then if it gets called in yours
José Manuel Nieto
@SuperJMN
Nov 15 2016 22:39
is it called?
danwalmsley
@danwalmsley
Nov 15 2016 22:42
nope
so initiallayout pass isn't called either..
José Manuel Nieto
@SuperJMN
Nov 15 2016 22:45
O_O
that is some serious problem, then
danwalmsley
@danwalmsley
Nov 15 2016 22:53
InvalidateMeasure isn't called
are you setting Window Content property
that's what usually triggers the layout to be invalidated
for first time
its not null, but at least when it was set, it didn't trigger the avalonia property to report it
José Manuel Nieto
@SuperJMN
Nov 15 2016 23:31
yes, the Content property is being set in inside OmniXAML
I'm lost
danwalmsley
@danwalmsley
Nov 15 2016 23:40
Debug through what happens when you set content property it should raise property changed event and avlonia picks it up, and eventually does InvalidateMeasure