These are chat archives for AvaloniaUI/Avalonia

6th
Aug 2016
Andrew
@zezba9000
Aug 06 2016 03:36
Trying to build the "AvaloniaVS" but am getting the error(s):
Severity    Code    Description    Project    File    Line    Suppression State
Error        Could not copy the file "D:\Dev\SDK\AvaloniaVS\src\AvaloniaVS\packages\SharpDX.Direct2D1.3.0.2.nupkg" because it was not found.    AvaloniaVS
Anything I need to setup to build AvaloniaVS. Wanted to use the latest plugin with the latest build libs.
Steven Kirk
@grokys
Aug 06 2016 04:06
@zezba9000 you need to get a copy of the packages in order to build the extension.
we need to provide a way to do this automatically
at the moment the best way is to use an existing version of the extension to create a new avalonia application and copy the packages from there
Andrew
@zezba9000
Aug 06 2016 04:08
So using the current VSExt should be ok. I just noticed it produces paml files instead of xaml ones like is shown in ControlCatalog
Steven Kirk
@grokys
Aug 06 2016 04:10
yeah. i just merged a change yesterday to master to change to .xaml
i'm kinda hoping to do a release today...
Andrew
@zezba9000
Aug 06 2016 04:11
Is it hard to set AvaloniaVS with nightly builds like is done with the sdk?
Guess I'll wait for your next release then
Jared Hester
@cloudRoutine
Aug 06 2016 04:21
@danwalmsley what's the extension API like for AvalonStudio?
Steven Kirk
@grokys
Aug 06 2016 04:52
@zezba9000 yeah i guess we could do that!
Steven Kirk
@grokys
Aug 06 2016 05:18
@zezba9000 are you still around?
i'm just updating AvaloniaVS to alpha 4 and if you're still around would like some eyes on it
Jeremy Koritzinsky
@jkoritzinsky
Aug 06 2016 05:25
@grokys make sure to tag the source version used to build Alpha 4
Steven Kirk
@grokys
Aug 06 2016 05:25
will do
Steven Kirk
@grokys
Aug 06 2016 05:46
if anyone's around could you try checking out the release-0.4.0 branch of the AvaloniaVS project and giving it a try?
Andrew
@zezba9000
Aug 06 2016 06:06
@grokys How would you like me to test?
Steven Kirk
@grokys
Aug 06 2016 06:06
one sec... one last change...
but - if you could checkout the AvaloniaVS repro and run it in VS
just make sure everything looks like it's working
ok, i think it should be ready now
Andrew
@zezba9000
Aug 06 2016 06:09
Pulled latest and built from master. Get error:
Severity    Code    Description    Project    File    Line    Suppression State
Error        Could not copy the file "D:\Dev\SDK\AvaloniaVS\src\AvaloniaVS\packages\Rx-Linq.2.2.5.nupkg" because it was not found.    AvaloniaVS
Steven Kirk
@grokys
Aug 06 2016 06:09
from the release-0.4.0 branch
Andrew
@zezba9000
Aug 06 2016 06:09
k
@grokys ok from that branch the only error I get is:
Severity    Code    Description    Project    File    Line    Suppression State
Error        Unknown build error, 'Cannot resolve dependency to assembly 'dnlib, Version=1.5.0.1500, Culture=neutral, PublicKeyToken=50e96378b6e77999' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.'    Sandbox
Steven Kirk
@grokys
Aug 06 2016 06:12
ahh yeah - that sandbox app
i just unloaded it
not sure what the deal is there
Andrew
@zezba9000
Aug 06 2016 06:12
ok it builds!
Steven Kirk
@grokys
Aug 06 2016 06:13
cool, and does the avalonia app it creates work ok?
Andrew
@zezba9000
Aug 06 2016 06:14
how do I install the plugin from the build, havn't used a VS proj like this
do I install the .vsix or is there a better way?
Steven Kirk
@grokys
Aug 06 2016 06:15
in the debug properties use Start external program: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\\devenv.exe and Command line arguments: /rootsuffix Exp
Andrew
@zezba9000
Aug 06 2016 06:20
Cool works
created a new Avalonia proj, then built and ran just fine
Steven Kirk
@grokys
Aug 06 2016 06:20
great!
i will do the offical release just after i've had breakfast then!
Andrew
@zezba9000
Aug 06 2016 06:21
Awesome, I must be on the other side of the planet
Guess I can start porting my Git GUI :)
Steven Kirk
@grokys
Aug 06 2016 06:22
8:20 am here
Andrew
@zezba9000
Aug 06 2016 06:22
11:22pm here
Steven Kirk
@grokys
Aug 06 2016 06:23
you mean the world's not flat like they told us?!?
Andrew
@zezba9000
Aug 06 2016 06:25
wait! I thought we lived on a turtles back!
danwalmsley
@danwalmsley
Aug 06 2016 07:05
@cloudRoutine most things are extensible, which part would you want to extend? (menus, toolchains, debuggers, languages, editor rendering, code templates, or add a tool Window)
@grokys im up early for release day ;)
@zezba9000 are you going to use libgit2sharp?
Andrew
@zezba9000
Aug 06 2016 07:07
@danwalmsley I already do.
The name will change later after I port it to Avalonia. Also UX will be much better after the port as well.
Making this so I/we can use if for work instead of Perforce. So I have Git-lfs support built in.
...and a lot of folk don't like the complexity of git... particularly when it comes to merge conflicts, etc.
The only other option we have is gitkraken but that doesn't support lfs
Steven Kirk
@grokys
Aug 06 2016 07:12
Well release will have to wait a bit longer - power cut!
Andrew
@zezba9000
Aug 06 2016 07:13
power cut?
danwalmsley
@danwalmsley
Aug 06 2016 07:14
@zezba9000 awesome, I'm definitely going to use that
have you had problems using libgit2sharp on Ubuntu?
It wont work for me I just get "Syscall failure: SSL Error"
every time it tries to clone or something
Andrew
@zezba9000
Aug 06 2016 07:15
Haven't tried yet as its written in WPF right now. Will once I start porting.
Ubuntu only has git 1.7
O does the SSL error also happen on Windows?
danwalmsley
@danwalmsley
Aug 06 2016 07:19
not on windows
just when on Ubuntu using even the latest libgit2
Andrew
@zezba9000
Aug 06 2016 07:19
@danwalmsley Make sure you're passing in options with credentials: https://github.com/zezba9000/Git-Game-GUI/blob/master/GitGameGUI/RepoUserControl.xaml.cs#L391
danwalmsley
@danwalmsley
Aug 06 2016 07:19
@zezba9000 ok will give that a go ;)
cheers
Steven Kirk
@grokys
Aug 06 2016 07:49
power is back!
ok so is everything looking good for release?
danwalmsley
@danwalmsley
Aug 06 2016 07:50
I beleive so, there are always more things to fix, but you would never release
Things are in great shape
Steven Kirk
@grokys
Aug 06 2016 07:55
ah... @kekekeks is the only one who can update the extension
are you there?
i'll just create a new one i guess
Steven Kirk
@grokys
Aug 06 2016 08:04
the visual studio gallery sucks in many different ways, but the fact that each product is tied to a single live sign-in is the worst
you'll have to uninstall the old one manually
Steven Kirk
@grokys
Aug 06 2016 08:17
aaaand packages uploaded to nuget.org
Steven Kirk
@grokys
Aug 06 2016 08:31
oops that was the wrong link for the extension
is the correct one
Matthijs ter Woord
@mterwoord
Aug 06 2016 08:34
SO, avalonia works with mono, right?
Steven Kirk
@grokys
Aug 06 2016 08:35
yep!
Matthijs ter Woord
@mterwoord
Aug 06 2016 08:35
cool
is it possible to change the default binding behaviors for applications?
Steven Kirk
@grokys
Aug 06 2016 08:36
what do you mean by that?
Matthijs ter Woord
@mterwoord
Aug 06 2016 08:36
btw, release notes misses the screenshot of the designer
Steven Kirk
@grokys
Aug 06 2016 08:36
ahh ok, will fix
thanks!
Matthijs ter Woord
@mterwoord
Aug 06 2016 08:36
<TextBox Text="{Binding Path=Value, EnableValidation=True}"/>
I pretty much want validation, except when i'm opting out
Steven Kirk
@grokys
Aug 06 2016 08:37
yes. i intend to change it to be that way
at the moment you have to opt-in though
Matthijs ter Woord
@mterwoord
Aug 06 2016 08:37
ok but still, will it be possible to change the default?
whatever the defualt is
Steven Kirk
@grokys
Aug 06 2016 08:37
not something that i'd considered tbh...
Matthijs ter Woord
@mterwoord
Aug 06 2016 08:37
1 sec
regarding releasenotes: why not make the reference to the docs a link?
in wpf, in pretty much all the cases, i have to set UpdateSourceTrigger to PropertyChanged, and i either set ValidatesOnDataErrors or ValidatesOnNotifyDataErrors (in some views even ValidatesOnExceptions)
Steven Kirk
@grokys
Aug 06 2016 08:42
ah shit - actually i meant to remove that section
the docs aren't building so they're all old and referencing perspex
will remove
Matthijs ter Woord
@mterwoord
Aug 06 2016 08:42
ah :)
well, either that or make it a link
;)
so, makes sense on what i mean with the binding things?
Steven Kirk
@grokys
Aug 06 2016 08:43
i'd like to know why you want that
Matthijs ter Woord
@mterwoord
Aug 06 2016 08:44
i use datavalidation a lot, and many times, I want the screen to react to typinh
(imagine an invoice edit screen, changin amounts should immediately be refected, and normally values are updated when leaving the textbox
not sure on defaults for most properties in avalonia
(just hanging around here, as i think the project is really interesting)
Steven Kirk
@grokys
Aug 06 2016 08:48
hmm, still not quite sure what you want... if you could form your thoughts into an issue, that might be the best place to discuss it
Matthijs ter Woord
@mterwoord
Aug 06 2016 09:05
i'm really bad at putting ina monologue and make up my mid ther..
I guess it all comes down to what the systems' defaults are.. :)
Matthijs ter Woord
@mterwoord
Aug 06 2016 09:11
i guess you are familiar with wpf?
Steven Kirk
@grokys
Aug 06 2016 09:14
yeah
Matthijs ter Woord
@mterwoord
Aug 06 2016 09:14
ok, just asking, so you know what the things are i mentioned..
Steven Kirk
@grokys
Aug 06 2016 09:15
yeah, but i'm not exactly sure what you're asking for, or why ;)
Jared Hester
@cloudRoutine
Aug 06 2016 09:15
:tada: :confetti_ball: :sparkles: :confetti_ball: :tada: alpha4!
Matthijs ter Woord
@mterwoord
Aug 06 2016 09:15
I guess, initial question should have been, "what's the default binding behavior in avalonia"
:)
Steven Kirk
@grokys
Aug 06 2016 09:16
you mean data validation binding behavior?
the answer will be "it will change" ;)
Matthijs ter Woord
@mterwoord
Aug 06 2016 09:18
data validation settings but also binding settings (when values are being synchronised back to the property)
Matthijs ter Woord
@mterwoord
Aug 06 2016 09:21
ok, but validation only kicks in after the value has been synced to the binding source
Jared Hester
@cloudRoutine
Aug 06 2016 09:24
i don't think that's the case http://reedcopsey.github.io/Gjallarhorn/reference/gjallarhorn-bindable-bindingsource.html
but @ReedCopsey could say better than I
Matthijs ter Woord
@mterwoord
Aug 06 2016 09:25
i guess it depends on the binding itself: lets say I have a TextEdit .Text property bound to a string property of an object
the binding then at some point puts the changed value from the textedit into the property
danwalmsley
@danwalmsley
Aug 06 2016 09:28
@mterwoord in avalonia textbox binding updates by default on every key stroke
Matthijs ter Woord
@mterwoord
Aug 06 2016 09:29
that's the behavior i like most of the time :)
all controls do that?
danwalmsley
@danwalmsley
Aug 06 2016 09:29
Yeh the wpf way was anoying
I think in most cases yet
Matthijs ter Woord
@mterwoord
Aug 06 2016 09:29
i think for both ways has something for it, as long as you can change the default in a generic way (e, not per control)
Mike-EEE
@Mike-EEE
Aug 06 2016 09:35
@all congratulations on Alpha 4! great to see. :+1:
and also the new name. REALLY NICE. :+1: :+1:
Steven Kirk
@grokys
Aug 06 2016 09:39
thanks @Mike-EEE !
Jared Hester
@cloudRoutine
Aug 06 2016 10:08
shouldn't the templates include the nuget packages?
Mike-EEE
@Mike-EEE
Aug 06 2016 10:09
just pinged a popular thread in dotnetfoundation.org about it: http://forums.dotnetfoundation.org/t/cross-platform-wpf/421/99
Wiesław Šoltés
@wieslawsoltes
Aug 06 2016 10:09
@grokys Have issues with VS extension
2016-08-06_12-09-34.png
Jared Hester
@cloudRoutine
Aug 06 2016 10:10
or if they're not going to, at least a note in getting started to add Avalonia.Desktop to the avalonia app project
@wieslawsoltes install that extension too
Wiesław Šoltés
@wieslawsoltes
Aug 06 2016 10:11
its for old version I think
Jared Hester
@cloudRoutine
Aug 06 2016 10:12
oooh this is a VS hang i've never seen before :D
http://i.imgur.com/xso1Smw.png
i can move the window around but that border stays in place
This should be AvaloniaUI.AvaloniaVS ?
Steven Kirk
@grokys
Aug 06 2016 10:14
arrgh! ok, i had to change the ID
but i missed that
will update and upload a new version - thanks
Wiesław Šoltés
@wieslawsoltes
Aug 06 2016 10:16
For anyone interested I have release XamlBehaviors 0.4.0 on official NuGet feed https://www.nuget.org/packages/Avalonia.Xaml.Behaviors
Steven Kirk
@grokys
Aug 06 2016 10:28
ok @wieslawsoltes 0.4.0.1 of the extension is uploaded - should fix the problem
Mike-EEE
@Mike-EEE
Aug 06 2016 10:29
@grokys I hate to be pesky, but i left a comment on your new blog post... i am not sure if you are aware, but your RSS feed is emitting bad links. one more thing to worry about. :stuck_out_tongue:
Steven Kirk
@grokys
Aug 06 2016 10:30
thanks @Mike-EEE yeahi saw that. i have no idea why that might be happening!
Mike-EEE
@Mike-EEE
Aug 06 2016 10:31
no worries, just making sure!
Jared Hester
@cloudRoutine
Aug 06 2016 10:34
what's the root source of this error?
http://i.imgur.com/gsZ0v9y.png
I realize i'm doing some unsanctioned hackery, but I'm wondering how it detects whether the file is referenced and if that mechanism could be extended to suport F# projects
Wiesław Šoltés
@wieslawsoltes
Aug 06 2016 10:35
You have to reference you library to exe application project
Steven Kirk
@grokys
Aug 06 2016 10:35
@Mike-EEE does it seem to be fixed now?
@cloudRoutine yeah you currently need an .exe to be able to view stuff in the designer
Jared Hester
@cloudRoutine
Aug 06 2016 10:36
@wieslawsoltes it's set to build an exe i just used the wrong template at the start http://i.imgur.com/VMPSXi1.png
Steven Kirk
@grokys
Aug 06 2016 10:36
you can put stuff in a .dll but the designer needs a related .exe to know how to set stuff up
oh... in that case i'm not sure what's happening...
unfortunately i'm not very familar with the designer - it was made by other contributors
Wiesław Šoltés
@wieslawsoltes
Aug 06 2016 10:38
@grokys VS extension is fixed, thanks!
Steven Kirk
@grokys
Aug 06 2016 10:38
cool!
Mike-EEE
@Mike-EEE
Aug 06 2016 10:40
@grokys yes indeed... fixed in the feed, but cached improperly (currently) in my reader. it will get fixed eventually :)
now there's one LESS thing to worry about :sunglasses:
^ proper avalonia C# project :D
Steven Kirk
@grokys
Aug 06 2016 10:44
@cloudRoutine what is that showing, is there a problem?
Jared Hester
@cloudRoutine
Aug 06 2016 10:45
it's trying to load and constantly looping
i let it run for a minute or two and it kept looping
Wiesław Šoltés
@wieslawsoltes
Aug 06 2016 10:45
@cloudRoutine Did you update Avalonia extension and uninstalled the old ?
Steven Kirk
@grokys
Aug 06 2016 10:46
yeah make sure there's only 1 version installed 0.4.0.1
Jared Hester
@cloudRoutine
Aug 06 2016 10:46
it was working initially, i'm updating atm
Wiesław Šoltés
@wieslawsoltes
Aug 06 2016 10:46
2016-08-06_12-46-04.png
Jared Hester
@cloudRoutine
Aug 06 2016 10:48
Aha! it's that F# project
if I unload it, then it works properly
as soon as I reload it, back to looping
Steven Kirk
@grokys
Aug 06 2016 10:51
oh, strange
Mike-EEE
@Mike-EEE
Aug 06 2016 10:54
oh yeah @grokys all your entries just came through again on my reader. all is good :+1:
Jared Hester
@cloudRoutine
Aug 06 2016 10:56
it seems like the solution build event doesn't trigger the designer to stop trying to load the exe so that the build can overwrite it
i deleted any other project that had references to avalonia, then added a fresh F# console app project to the solution and the designer loop started again
same looping behavior on a fresh F# library project
Steven Kirk
@grokys
Aug 06 2016 11:00
strange. i guess the F# tooling works a little different to the C# tooling and we need to take that into account?
Jared Hester
@cloudRoutine
Aug 06 2016 11:00
If I add a C# class library it works fine
Jared Hester
@cloudRoutine
Aug 06 2016 11:05
VB and C++ projects don't interfere either, only F# :confused:
it might be useful to add a logger/debug mode to the designer extension. Having that functionality has definitely helped us out with VFPT
Steven Kirk
@grokys
Aug 06 2016 11:11
yeah - from what i understand the designer is due for a refactor anyway...
it's something that i haven't been involved in though
Jared Hester
@cloudRoutine
Aug 06 2016 11:13
is the designer itself written using avalonia?
Steven Kirk
@grokys
Aug 06 2016 11:29
no, it's a mixture of WPF and WinForms atm i believe
Steven Kirk
@grokys
Aug 06 2016 12:13
we're on the front page of hn again!
James Walmsley
@jameswalmsley
Aug 06 2016 12:56
Trying to run Skia on linux and having trouble getting SkiaSharp to find my Skia build. Did anyone try this already?
Steven Kirk
@grokys
Aug 06 2016 13:12
unfortunately the skiasharp nuget doesn't work on linux :(
yusuf-gunaydin
@yusuf-gunaydin
Aug 06 2016 13:27
Hi, I have a few questions.
Do you consider to add ValidationRules property to bindings?
It is a good way of validation with reusable classes.
Matthijs ter Woord
@mterwoord
Aug 06 2016 13:29
@yusuf-gunaydin then yu're placing validation rules in your view
yusuf-gunaydin
@yusuf-gunaydin
Aug 06 2016 13:29
Yes
Matthijs ter Woord
@mterwoord
Aug 06 2016 13:30
i wouldnt want the validation in the view: validation imo is business logic, which should live in the view model (or somewhere else)
danwalmsley
@danwalmsley
Aug 06 2016 13:30
did anything change with hittesting?
skia hit testing is off
Matthijs ter Woord
@mterwoord
Aug 06 2016 13:30
sounds like you guys need to invest in automated testing....
yusuf-gunaydin
@yusuf-gunaydin
Aug 06 2016 13:31
@mterwoord I think it is a personal choice.
Matthijs ter Woord
@mterwoord
Aug 06 2016 13:31
you're doing mvvm?
yusuf-gunaydin
@yusuf-gunaydin
Aug 06 2016 13:31
Yes.
Matthijs ter Woord
@mterwoord
Aug 06 2016 13:32
then imo putting data validation in the view is odd, as view is just presnetation
changing view coudl mean that validation changes as well
yusuf-gunaydin
@yusuf-gunaydin
Aug 06 2016 13:35
As I said it is a personal preference, and I find it easier to add validation rules with a few lines of xaml instead of implementing some interface.
Second question: Is there a reason why TreeView inherits directly from ItemsControl instead of SelectingItemsControl?
Currently TreeView does not handle focusing correctly. I assume this is handled by SelectingItemsControl correctly since there is no issues I can see with ListBox.
yusuf-gunaydin
@yusuf-gunaydin
Aug 06 2016 13:43
Another question is do you think it would be better if TreeView looked a bit like the one in Visual Studio? I mean when you select a node the whole row is selected instead of just the content. Or when you right click anywhere in row the context menu opens. It is also visually better looking in my opinion.
Steven Kirk
@grokys
Aug 06 2016 13:52
Is there a reason why TreeView inherits directly from ItemsControl instead of SelectingItemsControl
yeah, it's because SelectingItemsControl has a SelectedIndex property which doesn't make sense on TreeView
i thought about splitting it into two classes but that didn't seem to gain us anything in the end
danwalmsley
@danwalmsley
Aug 06 2016 13:54
@donandren I tried your PR and made comments :)
it didn't fix the problem for me, just changed the problem the other way around ;)
yusuf-gunaydin
@yusuf-gunaydin
Aug 06 2016 13:57
@grokys I thought the SelectedIndex might be the depth first search index of a node.
Steven Kirk
@grokys
Aug 06 2016 14:00
i guess it could be... but i don't think even then the logic in SelectingItemsControl would help
TreeView is essentially a hierachy of ItemsControls with a global selection
which is very different to SelectingItemsControl
that's not to say it couldn't be done in a different way - i just took the approach from WPF
i'd be interested in different approaches though - i'm not entirely happy with TreeView
danwalmsley
@danwalmsley
Aug 06 2016 14:15
@donandren I'm wondering if I can just loop over each foreground brush and apply them?
1 by 1?
Andrey Kunchev
@donandren
Aug 06 2016 14:18
@danwalmsley i think there is something wrong with your build of the PR that shouldn't be the result after the changes
danwalmsley
@danwalmsley
Aug 06 2016 14:22
hmmm maybe I didn't manage to apply it correctly
let me try again
so to confirm it should actually be applying all the brushes?
it should do it in order that the brushes were added, not the size of the range to apply?
do you agree?
if it uses the smallest brush first wont it be overwritten with the larger one?
Andrey Kunchev
@donandren
Aug 06 2016 14:25
the smallest range will never be overriten by a large one
danwalmsley
@danwalmsley
Aug 06 2016 14:26
ah ok so at least they should show up
Andrey Kunchev
@donandren
Aug 06 2016 14:26
basically you need to build avalonia.skia.desktop and copy it to the place you are referencing it in avalonstudio
danwalmsley
@danwalmsley
Aug 06 2016 14:26
that's still not the correct behaviour technically if I coloured the middle of a string
then covered the entire string white
it should render all white
and that can be done by applying brushes in order?
or maybe I'm misunderstanding?
im trying to build again
now
danwalmsley
@danwalmsley
Aug 06 2016 14:35
image.png
ok same result...
that's definitely the code from PR I double checked it
Andrey Kunchev
@donandren
Aug 06 2016 14:48
unfoortunatelly i can't check now with avaloniastuio as it doesn't have menu for open when i build it now
Jared Hester
@cloudRoutine
Aug 06 2016 15:16
maybe he'll push them to add some more features now ;)
https://twitter.com/migueldeicaza/status/761933263657132032
Matthijs ter Woord
@mterwoord
Aug 06 2016 15:17
cool
danwalmsley
@danwalmsley
Aug 06 2016 15:41
@donandren will fix that soon.
James Walmsley
@jameswalmsley
Aug 06 2016 19:15
@galvesribeiro hey, I saw you built skia and had it running on a linux arm device, I am trying to get it also to work with Avalonia, did you have success in the end?
Andrew
@zezba9000
Aug 06 2016 20:50
@grokys Was "release-0.4.0" branch removed from AvaloniaVS?
Should I be using master now
Steven Kirk
@grokys
Aug 06 2016 20:54
Yeah it was merged to master
danwalmsley
@danwalmsley
Aug 06 2016 20:55
@grokys we have almost got skia compiled and working on ubuntu
but in avalonia
we have this problem
private void GetPlatformWindowSize(IntPtr hwnd, out int w, out int h)
        {
#if __IOS__
            var bounds = GetApplicationFrame();
            w = (int)bounds.Width;
            h = (int)bounds.Height;

#elif WIN32
            UnmanagedMethods.RECT rc;
            UnmanagedMethods.GetClientRect(_hwnd, out rc);
            w = rc.right - rc.left;
            h = rc.bottom - rc.top;
#else
            throw new NotImplementedException();
#endif
        }
it calls this even on the Linux version
which is trying to call win32 methods
why was this part of the code not portable? shouldn't this be calling the platform interface?
that's in ....
danwalmsley
@danwalmsley
Aug 06 2016 21:24
@grokys am I ok to merge #668 iv tested it and its good, fixes text rendering on skia
Steven Kirk
@grokys
Aug 06 2016 21:25
Yeah go for it!
danwalmsley
@danwalmsley
Aug 06 2016 21:26
I always like to check first ;)
Jeremy Koritzinsky
@jkoritzinsky
Aug 06 2016 21:26
@grokys I'm going to create a new repo under AvaloniaUI to hold our Roslyn analyzers. That good with you?
danwalmsley
@danwalmsley
Aug 06 2016 21:26
man I can see why no one bothered with skiasharp and Linux before
@jameswalmsley has been hammering the keyboard all day on it now
so close though!!
Steven Kirk
@grokys
Aug 06 2016 21:37
@jkoritzinsky go for it!
@danwalmsley oh dear... Sorry I can't be of much help because as I've said, I haven't been involved in the skia stuff
danwalmsley
@danwalmsley
Aug 06 2016 21:39
no worries, was just wondering if there was a platform api that tells you the window size?
we have hard coded values for now
Andrew
@zezba9000
Aug 06 2016 21:49
Is it possible to set the Window start location to center the screen? Like wpf?
danwalmsley
@danwalmsley
Aug 06 2016 21:49
@zezba9000 hehehe @Seeker1437 was trying to implement this the other day
not yet possible
@Seeker1437 any advice on implementation? Was it just gtk that was a problem?
Andrew
@zezba9000
Aug 06 2016 21:50
ok cool, just didn't want to miss something
danwalmsley
@danwalmsley
Aug 06 2016 21:50
I'm hoping we find a way to implement that soon
but it should be coming
Darnell Williams
@Seeker1437
Aug 06 2016 22:26
Hey, gtk was my issue, however I believe I found what I needed
I probably need to add that functionality to an interface
Andrew
@zezba9000
Aug 06 2016 22:33
does avalonia generate code-behind? Or how do I access the UI item by name to get a reference from xaml?
danwalmsley
@danwalmsley
Aug 06 2016 22:34
yes it does
you have to do <Control Name="control1" />
then in the code behind
Andrew
@zezba9000
Aug 06 2016 22:35
I did that but its not working
danwalmsley
@danwalmsley
Aug 06 2016 22:35
call FindControl<Control>("control1")
our XAML is not compiled
so you cant access them in code without getting them via find control method
does that work?
Andrew
@zezba9000
Aug 06 2016 22:36
ya see the method, am trying now
yep works, tnx
danwalmsley
@danwalmsley
Aug 06 2016 22:37
no problem :)
Andrew
@zezba9000
Aug 06 2016 22:38
when I run with the debugger, and close the app it never stops. Some process must never end
danwalmsley
@danwalmsley
Aug 06 2016 22:38
hmm iv not experienced that
Andrew
@zezba9000
Aug 06 2016 22:38
o err never mind, its fine
danwalmsley
@danwalmsley
Aug 06 2016 22:39
did you start a thread in our code somewhere?
Andrew
@zezba9000
Aug 06 2016 22:39
after updating VS it reset my settings and confused me
danwalmsley
@danwalmsley
Aug 06 2016 22:39
oh ok ;)
Andrew
@zezba9000
Aug 06 2016 22:47
any message box api?
aka native MB api
guess it doesn't need to be native. Or is the idea I just make my own
danwalmsley
@danwalmsley
Aug 06 2016 22:49
in Avalon studio I made my own
we have native open file and open folder dialogs
but I don't think we have message box
best to make an mvvm style one ;)
Nelson Carrillo
@nc4rrillo
Aug 06 2016 22:50
congrats on Alpha 4 guys :)
Andrew
@zezba9000
Aug 06 2016 22:50
@danwalmsley Why is that when there is only one UI target?
Why not just MV
Or are you referring to a native implementation if that was done, kinda like OpenFile dlg etc.
danwalmsley
@danwalmsley
Aug 06 2016 22:54
on windows open file dialogs are win32
on mac / Linux they are gtk ones
they are system dialogs
not actual XAML controls
Andrew
@zezba9000
Aug 06 2016 22:55
ok, so for a MessageBox(native) would be done the same of couse :)
danwalmsley
@danwalmsley
Aug 06 2016 22:55
we could implement that in avalonia I think
if you open an issue
Andrew
@zezba9000
Aug 06 2016 22:58
@danwalmsley AvaloniaUI/Avalonia#670
Isn't Cocoa used on OSX?
danwalmsley
@danwalmsley
Aug 06 2016 22:59
afraid not
Andrew
@zezba9000
Aug 06 2016 22:59
for native stuff I mean
danwalmsley
@danwalmsley
Aug 06 2016 22:59
not sure why
Andrew
@zezba9000
Aug 06 2016 22:59
but it shouldn't be hard to use cocoa for OpenFile dlgs etc
danwalmsley
@danwalmsley
Aug 06 2016 23:00
no idea
James Walmsley
@jameswalmsley
Aug 06 2016 23:00
Hi All, I've managed to manually compile SkiaSharp for Ubuntu linux, and have started trying to make the Xaml Test Application work. Currently I get a white window and then the program closes gracefully.
The problem is that the current Skia backend cannot target a Gtk drawing surface
I would need some help targeting the Skia backend onto a Gtk drawing surface.
Avalonia seems to be able to draw into an SKSurface object correctly, but it cannot be presented.
Andrew
@zezba9000
Aug 06 2016 23:02
@grokys Is it possible to reference custom Avalonia packages / libs built from my local git copy with the AvaloniaVS build from git sources? So I could attempt to add a native MessageBox API
James Walmsley
@jameswalmsley
Aug 06 2016 23:03
Also I can try and help anyone who wants to get this built on ubuntu to help further debug this.
Nelson Carrillo
@nc4rrillo
Aug 06 2016 23:40
okay, found the source of a Cairo.Pattern leak
PopOpacityMask never disposes the PlatformImpl brush :-)
Jeremy Koritzinsky
@jkoritzinsky
Aug 06 2016 23:41
Woops. That was my mistake
danwalmsley
@danwalmsley
Aug 06 2016 23:41
@nc4rrillo do you know how I can get access to the Gtk.Window apis inside the avalonia.skia classes?
@jkoritzinsky perhaps you know?
Nelson Carrillo
@nc4rrillo
Aug 06 2016 23:41
I do not , Avalonia.Skia was done while I was gone
danwalmsley
@danwalmsley
Aug 06 2016 23:41
how does the cairo one reference gtk
I cant see how that works
I added all the same references but still the namespace doesn't exist
danwalmsley
@danwalmsley
Aug 06 2016 23:42
var window = handle as Gtk.Window;
Nelson Carrillo
@nc4rrillo
Aug 06 2016 23:43
GTK has some support for Cairo built in
danwalmsley
@danwalmsley
Aug 06 2016 23:43
that bit I tried to copy over
Nelson Carrillo
@nc4rrillo
Aug 06 2016 23:43
afaik
danwalmsley
@danwalmsley
Aug 06 2016 23:43
but I cant get it to compile
and no idea how to get gtk apis available
Jeremy Koritzinsky
@jkoritzinsky
Aug 06 2016 23:43
You'll have to add references to GTK# in whichever shared class you're using
danwalmsley
@danwalmsley
Aug 06 2016 23:43
let me look
Nelson Carrillo
@nc4rrillo
Aug 06 2016 23:44
        _context = Gdk.CairoHelper.Create(drawable); on line 44 in DrawingContext.cs is how the Cairo / GTK interaction works 
which probably isnt much help for skia, lol
ah I see, Skia has never been done for Linux before
Jeremy Koritzinsky
@jkoritzinsky
Aug 06 2016 23:44
Why do you need GTK# information in the Skia stuff? In the code you posted earlier?
Nelson Carrillo
@nc4rrillo
Aug 06 2016 23:44
for Avalonia
Looks like only CG on iOS and Win32 windowing backends
James Walmsley
@jameswalmsley
Aug 06 2016 23:46
Hi ... I've managed to compile SkiaSharp manually for Ubuntu,
i am calling useskia().usegtk()
I assume that would be right for ubuntu?
however then I need to get the GtkWindow to create a compatible DrawingContext
Nelson Carrillo
@nc4rrillo
Aug 06 2016 23:47
yeah, but there's no supported RenderTarget for it in Avalonia.Skia from what I can tell
that needs to come first
James Walmsley
@jameswalmsley
Aug 06 2016 23:47
Thats what I am currently trying to implement..
James Walmsley
@jameswalmsley
Aug 06 2016 23:48
I saw that the Cairo backend creates a Gtk windows into which Cairo can draw
and I wanted to do something similar with Skia if possible...
Nelson Carrillo
@nc4rrillo
Aug 06 2016 23:49
yeah, it should be, that's what I'm taking a look at right now
James Walmsley
@jameswalmsley
Aug 06 2016 23:49
Maybe you would know why that can't work?
Would you like to teamviewer with me, and I can show you what I did so far ...
If you have time==
??
Nelson Carrillo
@nc4rrillo
Aug 06 2016 23:52
sorry, im not somewhere where my internet is great, so I'm not sure if it'd be really helpful.
James Walmsley
@jameswalmsley
Aug 06 2016 23:52
ok, maybe we can do it another time...
Nelson Carrillo
@nc4rrillo
Aug 06 2016 23:53
yeah definitely
James Walmsley
@jameswalmsley
Aug 06 2016 23:53
ok, In the meantime I will try to read the cairo backend a bit more and see what it is doing..
Nelson Carrillo
@nc4rrillo
Aug 06 2016 23:57
you can probably get away with just putting the bitmap data from the SkBitmap in WindowRenderTarget.cs into a Cairo ImageSurface and then using the existing GTK integration
I don't have the Skia stuff compiled to test myself, but it seems doable
James Walmsley
@jameswalmsley
Aug 06 2016 23:58
Ok thanks for the info, I will discuss it with @danwalmsley tomorrow and see if we can do that together..