These are chat archives for AvaloniaUI/Avalonia

14th
Feb 2017
Nikita Tsukanov
@kekekeks
Feb 14 2017 09:06
@jkoritzinsky I don't own a hidpi screen. Will changing this setting be enough to reproduce the issue?
https://i.imgur.com/9zv3O4D.png
Steven Kirk
@grokys
Feb 14 2017 11:14
i wonder why D2D isn't working on Win7? it used to as far as i know
Wiesław Šoltés
@wieslawsoltes
Feb 14 2017 11:32
@grokys Latest Core2D with 0.4.1-build2509-alpha works on Win7
Core2D-D2D-Win7-SP1.PNG
Steven Kirk
@grokys
Feb 14 2017 11:39
oh ok, so it does work
Wiesław Šoltés
@wieslawsoltes
Feb 14 2017 11:41
its build2509
latest appveyor is build2658
maybe some update is missing, my machine is fully updated
James Walmsley
@jameswalmsley
Feb 14 2017 11:51
I'm having trouble with a binding to a slider, its not being triggered when implemented on a sub-view. I can see in the logical tree that the datacontext is set, but the setter never gets called. Could anyone help?
Steven Kirk
@grokys
Feb 14 2017 11:55
@jameswalmsley a few people have reported problems with slider binding
could you try doing a Mode=OneWayToSource binding?
James Walmsley
@jameswalmsley
Feb 14 2017 11:57
@grokys thanks, I am using the OneWayToSource mode and it doesn't trigger
If I use TwoWay then it does trigger.
Steven Kirk
@grokys
Feb 14 2017 12:00
ok, that's something i need to investigate. i noticed a problem with binding to checkboxes recently too
Nikita Tsukanov
@kekekeks
Feb 14 2017 12:01
@grokys ControlCatalog doesn't work
Ask @KvanTTT for more details
James Walmsley
@jameswalmsley
Feb 14 2017 12:01
@danwalmsley just told me on the phone to move my control to a separate view. I will try that to see if it makes a difference and get back to you.
Nikita Tsukanov
@kekekeks
Feb 14 2017 12:01
It probably has something to do with HW-acceleration availability
Since Win8 provides software renderer for DirectX
We can safely use Direct2D there
The Direct3D 11 runtime is installed on Windows 7,
that's the s/w renderer
Nikita Tsukanov
@kekekeks
Feb 14 2017 12:05
May be DirectX 11 is missing or something
We need another way to detect if Direct2D doesn't work on particular configuration
But it's guaranteed to work on Win8+
Wiesław Šoltés
@wieslawsoltes
Feb 14 2017 12:06
@grokys ControlCatalog.Desktop-0.4.1-build2658-alpha is crushing under Win7
Nikita Tsukanov
@kekekeks
Feb 14 2017 12:06
any stacktrace?
Steven Kirk
@grokys
Feb 14 2017 12:06
ok, so it's something introduced recently
Wiesław Šoltés
@wieslawsoltes
Feb 14 2017 12:07
dont have VS installed
but looks like something with SkiaSharp
Nikita Tsukanov
@kekekeks
Feb 14 2017 12:08
VC++ 2015 runtime probably
you can use dnspy as debugger
Works pretty well, allows you to step through decompiled code
Wiesław Šoltés
@wieslawsoltes
Feb 14 2017 12:10
one moment I will try copy redist dlls
Nikita Tsukanov
@kekekeks
Feb 14 2017 12:11
We probably need to use our own libSkiaSharp.dll with statically compiled VC redist
Wiesław Šoltés
@wieslawsoltes
Feb 14 2017 12:11
yep
msvcp140.dll and vcruntime140.dll solved issue
Nikita Tsukanov
@kekekeks
Feb 14 2017 12:12
But I'm not sure that it's possible to override it using nuget
Might be worth to create nuget package with said dlls
Wiesław Šoltés
@wieslawsoltes
Feb 14 2017 12:13
should be possible in appveyor just copy
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist\x86\Microsoft.VC140.CRT\msvcp140.dll
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist\x86\Microsoft.VC140.CRT\vcruntime140.dll
Nikita Tsukanov
@kekekeks
Feb 14 2017 12:14
For now let's include those to build artifacts
So ControlCatalog will be functional
Steven Kirk
@grokys
Feb 14 2017 12:14
so the problem is in skia, not D2D?
Nikita Tsukanov
@kekekeks
Feb 14 2017 12:15
Nope, that's another Win7 configuration
The one where Direct2D works, but VC redist not installed
Steven Kirk
@grokys
Feb 14 2017 12:16
ok, i'm confused. wasn't @wieslawsoltes saying that build2509 worked with D2D on Win7 but build2658 doesn't?
Wiesław Šoltés
@wieslawsoltes
Feb 14 2017 12:17
I was using Core2D for build2509 with only Direct2D nugeet installed
ContronCatalog has also SkiaSharp
probably SkiaSharp is loaded during platform detect
Steven Kirk
@grokys
Feb 14 2017 12:17
yeah
that's what i assumed, so loading skiasharp is breaking win7, not d2d?
Nikita Tsukanov
@kekekeks
Feb 14 2017 12:19
No
Direct2D doesn't work at all on some win7 configurations
Skia needs MS VC++ 2015 runtime libs
Steven Kirk
@grokys
Feb 14 2017 12:20
ok, any idea what those win7 configurations are?
Nikita Tsukanov
@kekekeks
Feb 14 2017 12:20
Ask @KvanTTT
#869
Steven Kirk
@grokys
Feb 14 2017 12:21
last time i checked it worked on win7 running on a VM with no gpu
Nikita Tsukanov
@kekekeks
Feb 14 2017 12:21
#895
That solved the issue for him
Steven Kirk
@grokys
Feb 14 2017 12:22
strange...
Nikita Tsukanov
@kekekeks
Feb 14 2017 12:22
But that was a hack, so I've added platform support detection infrastructure
Direct2D should check for something else instead of Windows version
But I don't know what exactly causes it to fail
but that should be installed on an up-to-date win7
Nikita Tsukanov
@kekekeks
Feb 14 2017 12:24
So we need to somehow check that it's installed
Steven Kirk
@grokys
Feb 14 2017 12:25
i've added a comment to @KvanTTT's issue - lets see if installing that fixes it
James Walmsley
@jameswalmsley
Feb 14 2017 12:26
@grokys moving the control into a separate user control view fixed the issue.
Steven Kirk
@grokys
Feb 14 2017 12:26
hmmm
could you file an issue with as many details as possible?
James Walmsley
@jameswalmsley
Feb 14 2017 12:27
I'll try to make a repro and push an issue for you.
Steven Kirk
@grokys
Feb 14 2017 12:27
thanks, that would be super-helpful!
Stephan Vedder
@feliwir
Feb 14 2017 13:49
hey, is there a possibility for an opengl widget or something like this?
Jeremy Koritzinsky
@jkoritzinsky
Feb 14 2017 14:21
@kekekeks that should be enough
Nikita Tsukanov
@kekekeks
Feb 14 2017 15:29
@feliwir As long as you use ANGLE as OpenGL on Windows, there shouldn't be any issues. But for now we lack the infrastructure for doing that
Stephan Vedder
@feliwir
Feb 14 2017 16:04
no, i am not using ANGLE and not planing to do that :worried:
i want the full OpenGL feature set
Nikita Tsukanov
@kekekeks
Feb 14 2017 16:07
That won't be portable
Mostly because windows usually lack opengl acceleration support
Usually you need to install drivers from vendor to have it
You can try to render to FBO and offload it manually
But I think there won't be built-in support for that
Direct2D backend won't work properly with system opengl (we need ANGLE to share pixel buffers) and Skia wants OpenGL ES 2.0, so that's the profile that we'll be having native support for
Ivan Kochurkin
@KvanTTT
Feb 14 2017 16:14
This update (KB2670838) installed on my machine.
Скриншот 2017-02-14 19.14.45.png
Ivan Kochurkin
@KvanTTT
Feb 14 2017 16:21
How can we fix crash on Ubuntu? AvaloniaUI/Avalonia#897
Nikita Tsukanov
@kekekeks
Feb 14 2017 16:21
Remove windows GTK# binaries
from your directory
Files near executable file override ones from GAC
And GTK# binaries aren't compatible across platforms
That's why we need GTK3 backend
I will probably add support for running on top of GTK2 for said backend
So we could get rid of GTK# completely at some point
Ivan Kochurkin
@KvanTTT
Feb 14 2017 16:26
Thanks, now it works
Can we add different build configurations for Windows and not Windows OS?
For clearing GTK# binaries automatically
Stephan Vedder
@feliwir
Feb 14 2017 16:27
windows doesn't look OpenGL Acceleration support lol
*lack
Nikita Tsukanov
@kekekeks
Feb 14 2017 16:27
It does
Stephan Vedder
@feliwir
Feb 14 2017 16:27
i am using OpenGL on Windows for years and it supports latest features
no
Nikita Tsukanov
@kekekeks
Feb 14 2017 16:27
Built-in opengl support is unusable
You need driver from vendor
Stephan Vedder
@feliwir
Feb 14 2017 16:27
OpenGL support comes from vendor
Nikita Tsukanov
@kekekeks
Feb 14 2017 16:27
Microsoft provided-ones doesn't have proper OpenGL support
yep
Stephan Vedder
@feliwir
Feb 14 2017 16:27
who doesn't use a driver on Windows?
there is pretty much noone
Nikita Tsukanov
@kekekeks
Feb 14 2017 16:28
Everyone, who don't play games
OpenGL based games
Stephan Vedder
@feliwir
Feb 14 2017 16:28
no, windows does even install vendor drivers by its own
Nikita Tsukanov
@kekekeks
Feb 14 2017 16:28
Because DirectX works out of the box with built-in drivers
That's probably why I had to download drivers manually from vendor website to play minecraft
Stephan Vedder
@feliwir
Feb 14 2017 16:29
you still need a nvidia driver if you want to play high end DirectX games
Did you try playing DX games without a driver?
Nikita Tsukanov
@kekekeks
Feb 14 2017 16:30
Preinstalled drivers are pretty good
That aside, we can't rely on built-in opengl support from windows
Chrome and Firefox doesn't do that
And always use ANGLE
We will be doing the same for our 3D-rendering support
Stephan Vedder
@feliwir
Feb 14 2017 16:31
well Qt does have an OpenGL Widget
Nikita Tsukanov
@kekekeks
Feb 14 2017 16:31
I'm happy for Qt
Stephan Vedder
@feliwir
Feb 14 2017 16:31
and doesn't give a fuck about DirectX (which is the least portable API anyways)
Nikita Tsukanov
@kekekeks
Feb 14 2017 16:31
Please, don't swear
Stephan Vedder
@feliwir
Feb 14 2017 16:31
okay
Nikita Tsukanov
@kekekeks
Feb 14 2017 16:32
To guarantee that everything works we are stuck with angle and OpenGL ES 2.0 profile. You can use system opengl using OpenTK if you want
We also need to make sure that opengl renderer can share pbuffers with Direct2D backend
For now you need to render to FBO and then offload render results to a bitmap anyway
Stephan Vedder
@feliwir
Feb 14 2017 16:38
okay
Nikita Tsukanov
@kekekeks
Feb 14 2017 16:40
ANGLE also works on systems that lack any GPU at all, since starting from Win8 and Win7 with platform update DirectX provides software rendering engine
There is an option of using MESA as software renderer, but llvmpipe seems to be slower than renderer from Microsoft
OpenGL ES 2.0 might be not fancy-pancy, but it's reliable to be present on the target system
And usually need to render something like this anyway
https://i.imgur.com/llxuuW4.png
So reliable and compatible solution is preferred here
We might add external helpers for offloading render results from various sources, but it won't be in the core 3D-support package
Stephan Vedder
@feliwir
Feb 14 2017 16:54
well if i want to render something with tesselation and advanced graphics
Nikita Tsukanov
@kekekeks
Feb 14 2017 16:58
You see, we'll be using OpenTK anyway
It's proper surface sharing between subsystems that needs to be implemented
You can always create your own opengl context and use whatever opengl version/implementation you want
For proper surface sharing between OpenTK/Skia/Direct2D/DirectComposition/AvaloniaAV we need to use ANGLE
So if you want to use vendor-supplied OpenGL you'll have to implement render results by yourself
(just like you need to do with the current state of Avalonia)
danwalmsley
@danwalmsley
Feb 14 2017 18:17
@wieslawsoltes you there?
what was the XAML behaviour you recommended me the other day
to allow you to bind to a parent in the logical tree from a template?
danwalmsley
@danwalmsley
Feb 14 2017 18:55
@wieslawsoltes cheers
it doesn't seem to work for me though
<MenuItem Header="{Binding Name}" Margin="5" Name="item">
                                    <i:Interaction.Behaviors>
                                        <behaviors:BindTagToVisualRootDataContextBehavior />
                                    </i:Interaction.Behaviors>

                                    <MenuItem.Command>
                                        <Binding ElementName="item" Path="AddFindingCommand" />
                                    </MenuItem.Command>
                                </MenuItem>
but I get
Could not find AvaloniaProperty 'AddFindingCommand' on 'Avalonia.Controls.MenuItem'"
<Grid.ContextMenu>
                    <ContextMenu Items="{Binding BaseTemplates}">
                        <ContextMenu.ItemTemplate>
                            <DataTemplate>
                                <MenuItem Header="{Binding Name}" Margin="5" Name="item">
                                    <i:Interaction.Behaviors>
                                        <behaviors:BindTagToVisualRootDataContextBehavior />
                                    </i:Interaction.Behaviors>

                                    <MenuItem.Command>
                                        <Binding ElementName="item" Path="AddFindingCommand" />
                                    </MenuItem.Command>
                                </MenuItem>
                            </DataTemplate>
                        </ContextMenu.ItemTemplate>
                    </ContextMenu>
                </Grid.ContextMenu>
Id of expected it to be trying to bind to the same datacontext that is found at Grid.ContextMenu
Wiesław Šoltés
@wieslawsoltes
Feb 14 2017 18:59
Add Tag. to yor path
danwalmsley
@danwalmsley
Feb 14 2017 19:02
@wieslawsoltes why does this code...
<MenuItem Header="{Binding Name}" Command="{Binding Tag.AddFindingCommand}"  CommandParameter="{Binding Tag.Id}" Margin="5">
                                    <i:Interaction.Behaviors>
                                        <behaviors:BindTagToVisualRootDataContextBehavior />
                                    </i:Interaction.Behaviors>
                                </MenuItem>
not change the datacontext?
danwalmsley
@danwalmsley
Feb 14 2017 19:10
only works like this...
<ContextMenu Items="{Binding BaseTemplates}">
                        <ContextMenu.ItemTemplate>
                            <DataTemplate>
                                <MenuItem Header="{Binding Name}" Margin="5" Name="menuItem">
                                    <i:Interaction.Behaviors>
                                        <behaviors:BindTagToVisualRootDataContextBehavior />
                                    </i:Interaction.Behaviors>
                                    <MenuItem.Command>
                                        <Binding Path="Tag.AddFindingCommand" ElementName="menuItem" />
                                    </MenuItem.Command>
                                    <MenuItem.CommandParameter>
                                        <Binding Path="Tag.Id" ElementName="menuItem" />
                                    </MenuItem.CommandParameter>
                                </MenuItem>
                            </DataTemplate>
                        </ContextMenu.ItemTemplate>
                    </ContextMenu>
Wiesław Šoltés
@wieslawsoltes
Feb 14 2017 19:14
@danwalmsley I think I did not test this way
you are using MenuItem inside DataTemplate
Nikita Tsukanov
@kekekeks
Feb 14 2017 20:35
@grokys there is a bug with tooltip being reused even after disposal
well, with all toplevels
I've had to add workarounds for that in GTK3 backend
See for GtkWidget.IsClosed
Like this one
They indicate methods that are being called after close/disposal
There is also a weird issue with tooltip that causes app to hung
You need to place mouse on top of tooltip
Then it will disappear while having mouse over it
Then app hangs
So I think that exception that you are getting at this page isn't related to Direct2D
Steven Kirk
@grokys
Feb 14 2017 20:49
ok, i can investigate further, i haven't had much time to look at the code you wrote
or investigate what's happening on scenegraph
one thing: the name IPlatformWindowRenderSurface i find rather undescriptive. would something like IWindowHandleSurface be more descriptive?
Nikita Tsukanov
@kekekeks
Feb 14 2017 20:52
Well, it's a platform window
Feel free to rename it
danwalmsley
@danwalmsley
Feb 14 2017 21:04
@kekekeks did we loose the skia dpi scaling?
someone reported this on AvalonStudio...
which looks the same as before we had the hidden scale transform for skia
and does our latest skia nugget package
include binaries now?
Nikita Tsukanov
@kekekeks
Feb 14 2017 21:10
It should work
Which platform it is?
danwalmsley
@danwalmsley
Feb 14 2017 21:16
let me update and check
should be skia win32
is skia the default renderer now?
Nikita Tsukanov
@kekekeks
Feb 14 2017 21:17
Nope
There was a commit that uses skia by default on win7
But your screenshot was made before that, I think
danwalmsley
@danwalmsley
Feb 14 2017 21:18
ok I will have to find out more on how to reproduce
i'll update master to latest nugets and get them to repeat
Nikita Tsukanov
@kekekeks
Feb 14 2017 21:18
Yep, screenshot from Feb10
Default rendered for Win7 changed 16 hours ago
It's hard to debug DPI issues on FullHD monitor
Visual Studio is just too large
And I can't set DPI to 200% for some reason
@danwalmsley reproduced the issue with skia
Nikita Tsukanov
@kekekeks
Feb 14 2017 21:28
AvaloniaUI/Avalonia@b96c2de
That's the culpit
danwalmsley
@danwalmsley
Feb 14 2017 21:31
ah
so should it still be there?
or need fixing?
Nikita Tsukanov
@kekekeks
Feb 14 2017 21:34
AvaloniaUI/Avalonia@4d3d42b
danwalmsley
@danwalmsley
Feb 14 2017 21:43
nice one! :) already ahead of the game
danwalmsley
@danwalmsley
Feb 14 2017 21:52
definitely been some big changes in the last few days then
lots of things broken here
Steven Kirk
@grokys
Feb 14 2017 22:19
oh, what's broken?
Nikita Tsukanov
@kekekeks
Feb 14 2017 22:34
I'm looking at various datagrids with source code available
And the source
It's scary
Xceed.Wpf.DataGrid: 621 files
Steven Kirk
@grokys
Feb 14 2017 22:39
woah
let's leave datagrid for now ;)
Nikita Tsukanov
@kekekeks
Feb 14 2017 22:39
Telerik's Grid for UWP: 490 files
That's excluding dependencies on their "core" parts
Steven Kirk
@grokys
Feb 14 2017 22:40
jesus
Nikita Tsukanov
@kekekeks
Feb 14 2017 22:40
I'm considering to port FastWpfGrid
Steven Kirk
@grokys
Feb 14 2017 22:40
datagrids aren't easy obviously
Nikita Tsukanov
@kekekeks
Feb 14 2017 22:41
It doesn't support XAML cells, but at least it's small
25 files
That's manageble
Steven Kirk
@grokys
Feb 14 2017 22:41
it would be useful to have one, but i think it should be an external library for now rather than in core
Nikita Tsukanov
@kekekeks
Feb 14 2017 22:41
Yep, certainly
Steven Kirk
@grokys
Feb 14 2017 22:41
it's the sort of thing i think we should select the best after a few people have tried to make one
Nikita Tsukanov
@kekekeks
Feb 14 2017 22:42
But it's nice to have a grid somewhere
since it's the first thing people ask about
Steven Kirk
@grokys
Feb 14 2017 22:42
yep, definitely!
Nikita Tsukanov
@kekekeks
Feb 14 2017 22:42
The funny thing is that
WPF didn't have one until .NET 4.0
Steven Kirk
@grokys
Feb 14 2017 22:43
i can understand why if they're 490 files!
Nikita Tsukanov
@kekekeks
Feb 14 2017 22:45
Another funny thing is that I tend to end up with custom grids in my apps
Steven Kirk
@grokys
Feb 14 2017 22:45
yeah, we need something like a data grid in the devtools, but i think for the moment it will be a custom one written specially for that
Nikita Tsukanov
@kekekeks
Feb 14 2017 22:46
For devtools we need a PropertyGrid
Which is a different thing with completely different requirements
The reason why DataGrids are so complex is that they need to handle enormous amounts of data
PropertyGrid won't be dealing with more than 1K elements
Steven Kirk
@grokys
Feb 14 2017 22:50
true
Nikita Tsukanov
@kekekeks
Feb 14 2017 22:53
There is a grid in moonlight code base
Not sure if it's the full implementation
And it has files with 7K lines of code
At times like these I regret about not having a compatibility layer
Nikita Tsukanov
@kekekeks
Feb 14 2017 23:10
FastWPFGrid is LGPL
>_<
So no iOS/UWP support
Steven Kirk
@grokys
Feb 14 2017 23:11
yeah, a compatibility layer would be useful
Nikita Tsukanov
@kekekeks
Feb 14 2017 23:15
But impossible to create, I'm afraid
danwalmsley
@danwalmsley
Feb 14 2017 23:17
@grokys I have a special content control
which is called ViewModelViewHost
it just locates the view based on the viewmodel set as datacontext via naming convention
its content doesn't get added to visual tree anymore
trying to diagnose a bit more
this is the template
<Style xmlns="https://github.com/avaloniaui" xmlns:cont="clr-namespace:AvalonStudio.Controls;assembly=AvalonStudio.Extensibility" 
       Selector="cont|ViewModelViewHost">
  <Setter Property="Template">
    <ControlTemplate>
      <ContentControl Name="PART_ContentPresenter"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Content="{TemplateBinding Content}"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        Padding="{TemplateBinding Padding}"/>
    </ControlTemplate>
  </Setter>
</Style>
Steven Kirk
@grokys
Feb 14 2017 23:19
strange, nothing should have changed there
danwalmsley
@danwalmsley
Feb 14 2017 23:20
public static readonly StyledProperty<object> ContentProperty = ContentControl.ContentProperty.AddOwner<ViewModelViewHost>();

        public object Content
        {
            get { return GetValue(ContentProperty); }
            set { SetValue(ContentProperty, value); }
        }
its used extensively in Avalon studio so lots of missing views
the content appears in logical tree
but not in visual tree
perhaps a change in ContentControl?
here is an example
image.png
Steven Kirk
@grokys
Feb 14 2017 23:22
so in the visual tree, what is the ContentControl's Content property?
danwalmsley
@danwalmsley
Feb 14 2017 23:23
its correctly set
Nikita Tsukanov
@kekekeks
Feb 14 2017 23:23
@grokys do we have an easy way to subscribe to property changes at registration time?
Like FrameworkPropertyMetadata in WPF
danwalmsley
@danwalmsley
Feb 14 2017 23:24
image.png
Nikita Tsukanov
@kekekeks
Feb 14 2017 23:24
Last time I've touched that part of the codebase, I had to subscribe from static constructor
danwalmsley
@danwalmsley
Feb 14 2017 23:24
but there should be lots of children
but its the end of the tree
Steven Kirk
@grokys
Feb 14 2017 23:26
@kekekeks yeah you currently have to subscribe from the static ctor: https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Controls/DropDown.cs#L53
@danwalmsley so the Content property is set, but Child is null?
danwalmsley
@danwalmsley
Feb 14 2017 23:26
I notice the Content control has this attribute
[Content]
would I need that on my controls content property too?
Steven Kirk
@grokys
Feb 14 2017 23:27
that's just so xaml knows how to serialize content
danwalmsley
@danwalmsley
Feb 14 2017 23:27
ok
just checking child
Jeremy Koritzinsky
@jkoritzinsky
Feb 14 2017 23:28
@kekekeks if you're porting a library to Avalonia you should use the AvaloniaAnalyzers package to do some of the menial conversions.
danwalmsley
@danwalmsley
Feb 14 2017 23:30
@grokys no child listed in the debug tool
so I guess its null
logical tree is all ok though
Steven Kirk
@grokys
Feb 14 2017 23:30
ah yeah it's not an avaloniaproperty so it doesn't get listed :/
any way of checking in the debugger?
danwalmsley
@danwalmsley
Feb 14 2017 23:31
can do
am I looking for visualchild or child
at what point would it be added?
when it gets added to logical children?
Steven Kirk
@grokys
Feb 14 2017 23:32
not sure what you mean...
btw, the only recent change to contentpresenter recently is this: AvaloniaUI/Avalonia@f73a10b
so probably you're relying on the DataContext being set to a control somewhere
danwalmsley
@danwalmsley
Feb 14 2017 23:34
its definitely worked since jan 6th
image.png
unless it was merged in later?
so its added to logical tree
Nikita Tsukanov
@kekekeks
Feb 14 2017 23:35
@jkoritzinsky thank you, but that library only has 4 dependency properties
danwalmsley
@danwalmsley
Feb 14 2017 23:35
but not getting into visual tree for some reason
Nikita Tsukanov
@kekekeks
Feb 14 2017 23:35
And most of effort will be related to replacing their silly WritableBitmapEx
Which they are using instead of WPF drawing
Jeremy Koritzinsky
@jkoritzinsky
Feb 14 2017 23:36
Haha ok. Not nearly as bad as when I ported over OxyPlot
Steven Kirk
@grokys
Feb 14 2017 23:36
@danwalmsley hmm, i can't think what would have caused it then
danwalmsley
@danwalmsley
Feb 14 2017 23:37
@grokys adding control to logical tree
Steven Kirk
@grokys
Feb 14 2017 23:37
there's hardly been anything done on that stuff as i've been busy on the rendering
danwalmsley
@danwalmsley
Feb 14 2017 23:37
is that the point it should be added to visual tree
?
if so I will compile avalonia here and try to debug into it from that point
Nikita Tsukanov
@kekekeks
Feb 14 2017 23:37
@grokys I think that we need to ship ControlCatalog as a separate nuget
So there could be another project
With "full" control catalog
That will include external things like OxyPlot
Steven Kirk
@grokys
Feb 14 2017 23:39
@danwalmsley the child should get created during measure/arrange from ApplyTemplate
@kekekeks for the moment i'd rather keep it simple and just have the core controls in controlcatalog
Nikita Tsukanov
@kekekeks
Feb 14 2017 23:40
I'm talking about a separate git repo
That will get control catalog from the main repo via nuget
And then add some pages
With external libs
danwalmsley
@danwalmsley
Feb 14 2017 23:41
@grokys found it
Nikita Tsukanov
@kekekeks
Feb 14 2017 23:41
Meh, nevermind, that could be done using submodules
danwalmsley
@danwalmsley
Feb 14 2017 23:41
OnTemplateApplied wasn't getting called
because my template hadn't been set!
oh man!
Steven Kirk
@grokys
Feb 14 2017 23:41
ha :)
@kekekeks i think that should be separate from the controlcatalog though
controlcatalog i just want as a simple app that i can use to check core controls work properly
danwalmsley
@danwalmsley
Feb 14 2017 23:48
@grokys thanks
Steven Kirk
@grokys
Feb 14 2017 23:48
what was causing the template not to be set?
danwalmsley
@danwalmsley
Feb 14 2017 23:49
I have this control in a separate library
and I recently changed how my plugins get loaded
used to be mef
now its any type that implements IExtension
and I had removed IExtension because I wanted to manually load the template myself in App.xaml
in this case
but id forgotten to add to App.xaml
and merged without testing :(
basically inside a static constructor I was having the theme load itself
but since this type would no longer get loaded at runtime
then the static contructor wasn't called
as it was when mef was used
danwalmsley
@danwalmsley
Feb 14 2017 23:56
so avalonia.skia should come with the Linux skia binaries now?
Steven Kirk
@grokys
Feb 14 2017 23:57
ah so you hadn't tested it worked before upgrading avalonia!