These are chat archives for AvaloniaUI/Avalonia

23rd
May 2018
Rayyan Tahir
@RayyanTahir
May 23 2018 12:14
I was trying to implement Window's transparency (For Win32) and have come this far:
image.png
The only problem is that the transparent region of the Window is click-through
I'm using the following code to set the transparency:
SetWindowLong(_hwnd, (int)WindowLongParam.GWL_EXSTYLE, GetWindowLong(_hwnd, (int)WindowLongParam.GWL_EXSTYLE) | (int)WindowStyles.WS_EX_LAYERED);
                SetLayeredWindowAttributes(_hwnd, new IntPtr(0x000000), new IntPtr(1), new IntPtr(0x00000001));
danwalmsley
@danwalmsley
May 23 2018 12:27
@RayyanTahir it might be because we use mouse transparency
so if a mouse clicks on a transparent pixel
it passes though to the next layer, you might have to do something to override that behaviour on transparent windows.
although you would need to think about If someone wanted a non-square window
your current behaviour would work for them?
if you ran your current code with HasSystemDecorations="false"
then your window would look correct
id imaging most of the time that you want to use window transparency then you want to do that?
also if you add a background colour of something like #10FFFFFF
then your window will look almost transparent, almost like a frost effect?
Sorien
@Sorien
May 23 2018 12:31
i just tested it and its works like that in win api, maybe you are looking for https://msdn.microsoft.com/en-us/library/windows/desktop/aa969512(v=vs.85).aspx?
danwalmsley
@danwalmsley
May 23 2018 12:32
@RayyanTahir so I think your current implementation looks correct :)
its just depends on what your use case is to what you do now
Sorien
@Sorien
May 23 2018 12:42
@RayyanTahir according docs crKey doesn't contain alpha channel, and 3rd param bAlpha makes whole window transparent, i don't think you can do that there are some tricks that you can get bitmap from your desktop and use it as your window background
Splitwirez
@Splitwirez
May 23 2018 13:00
...apologies if I'm interrupting something...is this the correct room or whatever to ask a few questions about Avalonia?
Sorien
@Sorien
May 23 2018 13:01
i think so ;)
Splitwirez
@Splitwirez
May 23 2018 13:04
kgood (sorry, never used Gitter before .-. ). I was just wondering if anyone here happened to know if the Avalonia Border control was forever doomed to use a single value for the CornerRadius property, rather than a value of type CornerRadius, as is the case in WPF (or atleast a Thickness), or if there was any hope of that ever changing? Ridiculous as this may sound, that's been one of the main problems I've faced when experimenting with the possibility of migrating my work from WPF to Avalonia... (Same uncertainty applies to the BorderThickness property)
danwalmsley
@danwalmsley
May 23 2018 13:10
@Splitwirez we now support 2 / 4 values for corner radius
you need to use our nighly builds until our next release to get this feature
see here:
Splitwirez
@Splitwirez
May 23 2018 13:11
O
there have been quite a lot of fixes, and improvements since 0.6.1 was released
Splitwirez
@Splitwirez
May 23 2018 13:11
Great to hear. I'll take a look. Sorry to trouble you folks about a "missing" feature that's already been added... >-<
danwalmsley
@danwalmsley
May 23 2018 13:12
this chat room is precisely for the kind of query you are making, so send all your questions here :)
no trouble :)
Splitwirez
@Splitwirez
May 23 2018 13:12
Alright, thanks.
Is this still at the point where there could be "breaking" changes between now and the "final" release, or...?
danwalmsley
@danwalmsley
May 23 2018 13:13
we are trying to limit those now
Splitwirez
@Splitwirez
May 23 2018 13:14
Even better...
danwalmsley
@danwalmsley
May 23 2018 13:14
a final release like v1.0 may not happen for quite some time, so expect to be some breaking changes
but hopefully nothing major
Splitwirez
@Splitwirez
May 23 2018 13:14
Fair enough.
I guess...my main concern is that the project I'm looking into using Avalonia for is pretty much built around its own extensibility and aims to eliminate maintenance for others, so I've been...hesitant to move to something that could still see such breaking changes. However, it does make sense that such changes could occur. Is there any estimate as to how long "quite some time" is...or atleast a unit of measurement (Months? Years? Decades?)?
danwalmsley
@danwalmsley
May 23 2018 13:23
I know of about 3 to 4 commercial project that are currently being ported to avalonia due to the fact that it has reached a reasonably stable point.
its difficult to say when a "v1" will be ready since it relies on community contributions to get it there.
Splitwirez
@Splitwirez
May 23 2018 13:24
Fair enough.
danwalmsley
@danwalmsley
May 23 2018 13:25
id expect mostly what happens between now and then is things like new features, bug fixes and optimizations
hopefully with as few breaking changes as possible
especially since now there are some quite big projects using it like AvalonStudio, Core2d and as I say a few commercial projects are also currently adopting it.
iv been developing avalonstudio since the early days and there have been breaking changes, but it hasn't been to difficult to deal with
Splitwirez
@Splitwirez
May 23 2018 13:27
That one in particular caught my eye, following a quick search...
danwalmsley
@danwalmsley
May 23 2018 13:27
if you need extensibility id suggest you could develop your application starting now, but then sync your extensibility api release with whenever avalonia fixes its public api
what kind of a project are your developing?
Splitwirez
@Splitwirez
May 23 2018 13:28
A modular Windows shell replacement thing
Currently we're using WPF, but I've been doing some experimentation recently, to see how well Avalonia holds up to this (admittedly rather unusual) usage scenario.
danwalmsley
@danwalmsley
May 23 2018 13:34
pretty interesting
is it commercial or open source?
Splitwirez
@Splitwirez
May 23 2018 13:34
The latter
In fact, that's part of why Avalonia seems like it could be so perfect for our needs.
danwalmsley
@danwalmsley
May 23 2018 13:45
are you thinking of making it run on other platforms too?
Splitwirez
@Splitwirez
May 23 2018 13:47
...does Gitter have DMs like Discord does or something of the sort?
danwalmsley
@danwalmsley
May 23 2018 13:48
just sent you one
look on the left
Splitwirez
@Splitwirez
May 23 2018 13:48
Thank
Benedikt Stebner
@Gillibald
May 23 2018 14:39
I have added a PR for the IAssetLoader changes. Should discuss that soon.
danwalmsley
@danwalmsley
May 23 2018 14:45
@Gillibald iv approved it, but probably be good to get a second opinion from @grokys or @jkoritzinsky
looks good to me, and doesn't seem to break anything
Splitwirez
@Splitwirez
May 23 2018 15:53
In its current form, does Avalonia provide any kind of equivalent to WPF's Effect Property and its BlurEffect and/or DropShadowEffects? Or is there another way to accomplish that kind of stuff in Avalonia...?
danwalmsley
@danwalmsley
May 23 2018 15:54
someone is working on that right now I beleive
but its not currently supported in any release or nightly build
Splitwirez
@Splitwirez
May 23 2018 15:54
...oh. Welp...guess I'll have to wait for that.
danwalmsley
@danwalmsley
May 23 2018 15:56
@Gillibald your assets loader PR is merged :+1:
customs fonts one next :)
@marchingcube whats the status on the Skia PR is it ready now?
Benedikt Stebner
@Gillibald
May 23 2018 16:38
@danwalmsley Okay then i can start to remove the asset loader stuff from my font PR
danwalmsley
@danwalmsley
May 23 2018 16:49
If you do we can do a final review pass and hopefully merge it 😀
Splitwirez
@Splitwirez
May 23 2018 17:28
Is that talk of an equivalent to AllowsTransparency I see above this discussion...?
Benedikt Stebner
@Gillibald
May 23 2018 17:51
I think my font PR is ready for review
Just realised TreeViewItem has no content alignment weird
Benedikt Stebner
@Gillibald
May 23 2018 17:58
Probably need to fix the default template
danwalmsley
@danwalmsley
May 23 2018 19:24
@Gillibald looks like unit tests are failing on that
Benedikt Stebner
@Gillibald
May 23 2018 19:49
Thats a bug of xunit hmpf
I get inconsistent results
Sometimes it passes sometimes it doesn't
danwalmsley
@danwalmsley
May 23 2018 20:37
@Gillibald are you still unhappy with IFontFamily?
danwalmsley
@danwalmsley
May 23 2018 20:44
@grokys I think #1564 is ok to merge if you are happy are you able to approve the changes?
iv approved but cant merge since you also have a review open on it
Benedikt Stebner
@Gillibald
May 23 2018 21:06
IFontFamily is good for now cant find a better way
Dariusz Komosiński
@MarchingCube
May 23 2018 21:48
@danwalmsley I am waiting for review from @kekekeks. I will wait for it before I continue.
Benedikt Stebner
@Gillibald
May 23 2018 21:53
Do we keep track of features that arent implemented for all platforms?
Steven Kirk
@grokys
May 23 2018 21:59
@danwalmsley taking a look now
Steven Kirk
@grokys
May 23 2018 22:13
@Gillibald @MarchingCube reviewed, i'm a little confused about the IFontFamily interface. i'm probably just being dim though
danwalmsley
@danwalmsley
May 23 2018 22:31
It was instead of making some other stuff public I think, it's not needed
Benedikt Stebner
@Gillibald
May 23 2018 22:37
Making them internal allows me to access these properties without casting to IFontFamily and still hide them. If somone wants to implement their own renderer they just access them per IFontFamily. Havin Name, FamilyNames and Key on a FontFamily is kinda confusing.
I will make these properties public and remove the interface
Benedikt Stebner
@Gillibald
May 23 2018 23:33
This "problem" is kinda special. Some design changes would probably eliminate it but thats too much effort i think.