These are chat archives for AvaloniaUI/Avalonia

12th
Jun 2018
rconde01
@rconde01
Jun 12 2018 00:01
does avalonia have built in control validation?
Jeremy Koritzinsky
@jkoritzinsky
Jun 12 2018 00:13
@rconde01 we have built-in support for data validation if that's what you're asking about.
Joseph Musser
@jnm2
Jun 12 2018 00:53
Hey, fyi, the quickstart guide links to http://avaloniaui.net/guides/quickstart.html (404) from http://avaloniaui.net/.
Has anyone ever used Redux-like state management with Avalonia?
Jeremy Koritzinsky
@jkoritzinsky
Jun 12 2018 00:58
Yeah we know the link is currently down. We have it fixed but haven't deployed the update yet.
Joseph Musser
@jnm2
Jun 12 2018 00:58
On .NET Core, is there a way to suppress the terminal window?
:+1:
Jeremy Koritzinsky
@jkoritzinsky
Jun 12 2018 00:58
I don't think anyone has used Redux-like state but it should be possible.
And on .net core we can't currently always supress it. You can when you do a self-contained publish but that's the only time.
Joseph Musser
@jnm2
Jun 12 2018 00:59
Ah, good.
Jeremy Koritzinsky
@jkoritzinsky
Jun 12 2018 01:00
There's a bug on the dotnet/cli repo I think about that.
Joseph Musser
@jnm2
Jun 12 2018 01:01
Sorry for all the questions. Got another one: does F# work naturally with Avalonia, or would I want to build a thin C# project to interact with Avalonia?
Jeremy Koritzinsky
@jkoritzinsky
Jun 12 2018 01:03
F# should work well with Avalonia, but some of the tooling might work a little better with C#.
Joseph Musser
@jnm2
Jun 12 2018 01:03
I'll give it a shot, thanks so much! đŸ˜ƒ
Jeremy Koritzinsky
@jkoritzinsky
Jun 12 2018 01:04
And our binding system doesn't have any knowledge of any F# constructs so you might have to use C# like binding paths for those features if they exist.
jp2masa
@jp2masa
Jun 12 2018 01:04

On .NET Core, is there a way to suppress the terminal window?

you can try using this: https://www.nuget.org/packages/NSubsys

it will patch the dotnet host which is copied to the obj folder
Joseph Musser
@jnm2
Jun 12 2018 01:04
Interesting, thanks!
Saitâ„¢
@SaitDev
Jun 12 2018 06:26
which gtk version avalonia support?
i cant get an empty avalonia template run on my os
Jumar Macato
@jmacato
Jun 12 2018 06:27
at least GTK2, though i am not sure
do update to GTK3 just to be safe :)
We can run on Ubuntu 16.04, 18.04 and their derivatives
Saitâ„¢
@SaitDev
Jun 12 2018 06:29
my os is elementary 0.4 which is base on ubuntu 16.04, seem having both gtk2/gtk3
Jumar Macato
@jmacato
Jun 12 2018 06:29
can you give us the error log?
I dont know if Pantheon (eOS's DM) plays well with GTK
Saitâ„¢
@SaitDev
Jun 12 2018 06:31
it built, i ran it. but nothing display on app screen
are the gtk error messages from terminal useful?
** (dotnet:28962): WARNING **: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-HJtXdEw00F: Connection refused
(dotnet:28962): Gtk-CRITICAL **: gtk_window_resize: assertion 'width > 0' failed
Jumar Macato
@jmacato
Jun 12 2018 06:35
GTK is working fine it seems, the problem seems to be with Skia
Though i can't help you out right now since i dont have stable internet to download elemOS
Saitâ„¢
@SaitDev
Jun 12 2018 06:39
thanks, let me know if u cant reproduce this issue on ur machine
Jumar Macato
@jmacato
Jun 12 2018 06:40
Yes, please do check your system for any HW/Driver problems
just to cover all the possibilities :)
Saitâ„¢
@SaitDev
Jun 12 2018 06:44
sure :thumbsup:
Jumar Macato
@jmacato
Jun 12 2018 06:47
Alright, thanks for trying avalonia out :smile: We're hoping that we can resolve this one whenever possible :smile:
oh btw, please do file an issue to our github repo
just for tracking it :))
fanoI
@fanoI
Jun 12 2018 07:44

@danwalmsley GTK2 seems not supported anymore, in the CentOS 6 repositories I cannot find GTK3...

GTK2 and GTK3 are so much different that you had to rewrite all totally and discard GTK2?

ahopper
@ahopper
Jun 12 2018 07:48
@fanoI it is my understanding that gtk2 is no longer supported , it is mentioned here http://avaloniaui.net/blog/
fanoI
@fanoI
Jun 12 2018 07:59
Centos OS 6 / Red Hat Enterprise Linux 6 is one of the officially supported target of Net Core 2.1, it is a pity I could create a standalone application for it (a little complex using Akka.net) and Avalonia is not working :-)
Jumar Macato
@jmacato
Jun 12 2018 08:00
to recap @fanoI , does an avalonia app in CentOS 6 terminates immediately or does it have a window but a blank/black screen?
fanoI
@fanoI
Jun 12 2018 08:04
No window, simply an exception regarding gtk3 libs not found
Jumar Macato
@jmacato
Jun 12 2018 08:05
so the problem now is that GTK3 is not in CentOS's repo
fanoI
@fanoI
Jun 12 2018 08:07
Probably it will be possible to compile it from source but I'm a little scared being GTK2 so much integrated in the system that it will not be easy
Jumar Macato
@jmacato
Jun 12 2018 08:07
yeah, looking it up does reveal the madness required to install gtk3 on that
sdoroff
@sdoroff
Jun 12 2018 13:00
I posted an update on the DataGrid progress and couple of questions regarding styling to the initial pull request. Any insights would be greatly appreciated.
Jumar Macato
@jmacato
Jun 12 2018 13:01
@sdoroff hey! good to see you back
sdoroff
@sdoroff
Jun 12 2018 13:08
@jmacato I haven't gone anywhere. I've just been lurking and trying to get stuff done.
Jumar Macato
@jmacato
Jun 12 2018 13:09
neat :smile: the questions about styles should be answered by either @jkoritzinsky or sir @grokys
but imo, having CellClasses is a good alternative
i think thats a bit more flexible, but is it possible to do something like DataGridCell selector instead?
sdoroff
@sdoroff
Jun 12 2018 13:14
Because you want the style to only apply to cells in a given column and since columns aren't the logical or visual parent of the cells (rows are), the selectors won't work.
Jumar Macato
@jmacato
Jun 12 2018 13:15
i see..
this is where the incompatibilities of our styling system against wpf/silverlight shows huh
Jumar Macato
@jmacato
Jun 12 2018 13:27
last time i checked DataGrid, it was only the display side of things that was working, would you be able to share some updates since then? :)
sdoroff
@sdoroff
Jun 12 2018 13:37
I have editing of cells working, though I'm still figuring out validation. I've moved everything to a separate project, so I can't easily update the pull request with the changes. I'm hoping to implement a few more things, get the code somewhat cleaned up and properly a licensed and publish to new repository in the next few weeks.
Stano Turza
@Sorien
Jun 12 2018 13:38
what about something like MycellStyle[Column=Foo] ?
Jumar Macato
@jmacato
Jun 12 2018 13:42
@sdoroff All i can say is wow! thanks for your effort! :smile:
sdoroff
@sdoroff
Jun 12 2018 13:45
@Sorien Something like that might work. I'm not exactly sure how name lookup for Foo would work in Xaml when the style is declared. Though, I could probably make a string ColumnName property on the cell. One downside, it would prevent the reuse of cell styles.
Stano Turza
@Sorien
Jun 12 2018 14:01
i found another one this one is from css4 "draft" :column(selector) - The :column() pseudo-class matches any cell belonging to a column, in a grid or table, represented by the passed argument (selector).
this one could be more usable but will require some internal changes
sdoroff
@sdoroff
Jun 12 2018 14:24
I do really like the syntax. But the idea of adding a style selector for a specific control kind of smells to me. Though, if the selector parser was made extensible in some way, something like this could work. Though, that would bring with a whole host of other potential issues.
On an unrelated note, does anyone have some good sample code using the Animation framework? I'm trying to wrap my head around how to best implement an animated expand / collapse within the DataGrid
Jumar Macato
@jmacato
Jun 12 2018 14:56
@sdoroff check out the RenderTest project
my docs about animations is not finished yet but i can help you out regardless :)
Jumar Macato
@jmacato
Jun 12 2018 15:04
<Style Selector="Border.Rect1:pointerover">
        <Style.Animations>
          <Animation Duration="0:0:2.5" 
                     RepeatCount="4" 
                     FillMode="None"
                     PlaybackDirection="AlternateReverse" 
                     Easing="SineEaseInOut">
            <KeyFrame Cue="20%">
              <Setter Property="RotateTransform.Angle" Value="45"/>
             </KeyFrame>
            <KeyFrame Cue="50%">
              <Setter Property="ScaleTransform.ScaleX" Value="1.5"/>
             </KeyFrame>
            <KeyFrame Cue="80%">
              <Setter Property="RotateTransform.Angle" Value="120"/>
            </KeyFrame>
          </Animation>
        </Style.Animations>
      </Style>
As you can see, our animations framework is heavily inspired by CSS. WPF's clunky triggers are substituted by selector classes/pseudoclasses
ahopper
@ahopper
Jun 12 2018 15:39
is there a standard way to capture (for logging ) all uncaught exceptions in an avalonia app, I ask because it is not as easy as it sounds in wpf
Benedikt Schroeder
@Gillibald
Jun 12 2018 17:54
Just had a look on the main loop and it looks like that is currently not implemented. We probably have to add that feature to IPlatformThreadingInterface
ahopper
@ahopper
Jun 12 2018 18:19
thanks, I'll have a play and see where I can catch stuff. I have an alpha app in the wild that is exiting with no error for someone.
Benedikt Schroeder
@Gillibald
Jun 12 2018 18:26
My ExitMode PR will introduce a OnExit call if the app crashes
ahopper
@ahopper
Jun 12 2018 18:29
does that have access to the exception that caused the crash?
Benedikt Schroeder
@Gillibald
Jun 12 2018 18:32
Currently exceptions aren't handled at that point but that could be added. We still need to add exception handling to the main loop otherwise the app would still crash.
Jeremy Koritzinsky
@jkoritzinsky
Jun 12 2018 18:40
Just a quick note: we still won't be able to handle unmanaged exceptions/crashes.
ahopper
@ahopper
Jun 12 2018 18:41
that was always a bit tricky in wpf anyway
with
[HandleProcessCorruptedStateExceptions]
[SecurityCritical]
Ivan G
@ivanatpr
Jun 12 2018 21:40
Hello everyone, I just submitted my first pull request (#1675) for issue #1674. Please let me know if there are any additional contribution guidelines that I should be following or if there's anything else I can do to help.