These are chat archives for AvaloniaUI/Avalonia

7th
Nov 2018
Jeremy Koritzinsky
@jkoritzinsky
Nov 07 2018 00:35
We need to update our OSX build instructions.
You need to install castxml via homebrew to build. It’s required for the Mac backend
braca
@braca
Nov 07 2018 02:30

@jkoritzinsky thanks :)
castxml was installed, and is no longer the issue, now I have a different one

/Users/braca/Projects/Avalonia/src/Shared/PlatformSupport/StandardRuntimePlatform.cs(30,28): error CS0246: The type or namespace name 'Thread' could not be found (are you missing a using directive or an assembly reference?) [/Users/braca/Projects/Avalonia/src/Avalonia.DesktopRuntime/Avalonia.DesktopRuntime.csproj]

Jeremy Koritzinsky
@jkoritzinsky
Nov 07 2018 02:31
Hmm. Don’t know off the top of my head what’s causing that.
Did the solution fully restore?
braca
@braca
Nov 07 2018 02:34
Yep, dotnet restore, restored all projects, including this Avalonia.DesktopRuntime
...
Restore completed in 2.4 ms for /Users/braca/Projects/Avalonia/src/Avalonia.DesktopRuntime/Avalonia.DesktopRuntime.csproj.
Benedikt Stebner
@Gillibald
Nov 07 2018 06:34
Btw is there a way to build Avalonia.csproj? I have to disable the build for it to properly work on my stuff.
Jeremy Koritzinsky
@jkoritzinsky
Nov 07 2018 07:22
@Gillibald what are you trying to build it on?
It uses some new MSBuild features which are apparently a little finicky wrt Rider and VS4Mac
It builds with the newest dotnet cli though.
And Visual Studio
Benedikt Stebner
@Gillibald
Nov 07 2018 07:37
Visual Studio Ultimate
It has issues finding the referenced projects. Hmm will make sure I have the newest updates. My last update was 2 weeks ago or so.
Benedikt Stebner
@Gillibald
Nov 07 2018 12:30
Looks like the cursor on pointover with TextBox is defined on TextPresenter but that doesn't seem to work properly with center or right alignment of text. I wonder how the hit testing is done. Setting a background on TextPresenter kind of solves the issue.
That will display the cursor in the whole area (whitespace too).
Wiesław Šoltés
@wieslawsoltes
Nov 07 2018 15:48
@grokys Is there any reason why the following does not work:
<Style Selector="UserControl">
    <Setter Property="Background" Value="Green"/>
</Style>
Shouldn't this be Type IStyleable.StyleKey => typeof(UserControl); ?
Steven Kirk
@grokys
Nov 07 2018 15:56
yeah it might be best to change it to that
i think it's using ContentControl's style atm because it didn't have any styling of its own
so yep :+1: change that to typeof(UserControl)
Wiesław Šoltés
@wieslawsoltes
Nov 07 2018 15:58
can I include this change in AvaloniaUI/Avalonia#2078
as its related to theming
Wiesław Šoltés
@wieslawsoltes
Nov 07 2018 16:10
oh then also I need to add UserControl to default theme I suppose
Wiesław Šoltés
@wieslawsoltes
Nov 07 2018 16:19
@grokys Included this change in AvaloniaUI/Avalonia#2078, also added some example to PR description
Benedikt Stebner
@Gillibald
Nov 07 2018 17:10
Avalonia.csproj build once but failing after. Still need to disable the build. So this is not about the tooling. There seems to be something wrong.
Steven Kirk
@grokys
Nov 07 2018 18:57
@Gillibald yeah i was seeing that before too, but it seems to have fixed itself recently?
perhaps a git clean -xdff might help?
Wiesław Šoltés
@wieslawsoltes
Nov 07 2018 19:00
More progress with ColorPicker control https://youtu.be/ZMlHxsrj-gc :fire:
Benedikt Stebner
@Gillibald
Nov 07 2018 20:10
@wieslawsoltes That looks so awesome. I like the alpha slider 👍
Artyom
@worldbeater
Nov 07 2018 20:31
@wieslawsoltes considering ReactiveCommand Call from invalid thread exception, see AvaloniaUI/Avalonia#1934
It's better to do .Start<MainWindow>(() => new ViewModel()); so the view model would be created after ReactiveUI is initialized. Or, if that's impossible, put this line right before creating ReactiveUI object RxApp.MainThreadScheduler = AvaloniaScheduler.Instance;. Sounds like it's worth documenting this behavior, not sure on ReactiveUI or on Avalonia side :)
Wiesław Šoltés
@wieslawsoltes
Nov 07 2018 20:40
Yeah I used solution provided by @danwalmsley so commands are created after Avalonia app is initialized.
Artyom
@worldbeater
Nov 07 2018 20:42
How about documenting this behavior?
How do you think is it better to place that info on ReactiveUI side or on Avalonia side?
Wiesław Šoltés
@wieslawsoltes
Nov 07 2018 20:43
Not sure
Steven Kirk
@grokys
Nov 07 2018 20:47
it's probably best to document it on the avalonia side for the moment
i think we should be able to make this problem go away though; the other platforms manage it
Artyom
@worldbeater
Nov 07 2018 23:38
Other platforms are using magic IWantsToRegisterStuff interface https://github.com/reactiveui/ReactiveUI/blob/master/src/ReactiveUI.Wpf/Registrations.cs#L13 ReactiveUI finds all implementations and calls Register function at startup time. But that interface is internal.
Jeremy Koritzinsky
@jkoritzinsky
Nov 07 2018 23:58
Maybe we can get them to add an InternalsVisibleTo for us? That's how the other platform assemblies access it.