These are chat archives for AvaloniaUI/Avalonia

10th
Aug 2018
Kyiv
@_VeTaLkO__twitter
Aug 10 2018 09:00

http://avaloniaui.net/api/Avalonia.Media/FontStyle/

Dont we have bold font? Also, Oblique looks the same as Italic

Steven Kirk
@grokys
Aug 10 2018 09:34
@_VeTaLkO__twitter to get bold you should use FontWeight i think
oblique/italic i believe will depend on the font
Kyiv
@_VeTaLkO__twitter
Aug 10 2018 09:35
Ah, weight, right
Kyiv
@_VeTaLkO__twitter
Aug 10 2018 09:36
Wow, never heard of that one
Kyiv
@_VeTaLkO__twitter
Aug 10 2018 12:09

Guys, a super fast and simple question (which for some reason is not highlighted in manual): how to throw propertyChanged notification in a nice and smooth rx way? There should be ReactiveProperty<T>, but intellisence is not showing it up

Part 2. What if property is a class?
I'm setting that class as a DataContext, bind the child elements (TextBlock) to its fields and then i call in VM MyClass = receivedData, but got no updates on the TextBlock

And MyClass is definitely following the original answer rules: it sends RaiseAndSetIfChanged in setter
Will provide samples, if necessary - but the question should be pretty simple. Mostly probably i just missed something small
Kyiv
@_VeTaLkO__twitter
Aug 10 2018 12:21
Ah, it seems i have to use ContentControl - wil give it a try
Kyiv
@_VeTaLkO__twitter
Aug 10 2018 12:34
Got it work via <TextBlock Text="{Binding MyClass.Property}">
Seems a bit better (for now) than the ContentControl, because i can see that in designtime without extra efforts
Nazar Bulavko
@bulvvko
Aug 10 2018 13:19
Guys, I understand that my request is a bit odorless, but who can help me create a custom window style?
All my attempts end in failure...
I download the assets icons and copy code from samples in my MainWindow.xaml and MainWindow.xaml.cs
Kyiv
@_VeTaLkO__twitter
Aug 10 2018 13:21

Guys, I understand that my request is a bit odorless, but who can help me create a custom window style?
All my attempts end in failure...

How much custom? You need just custom style, or you need native windows?

Nazar Bulavko
@bulvvko
Aug 10 2018 13:22
@_VeTaLkO__twitter Like Visual Studio theme (replace defaults "minimize", "exit" buttons
Kyiv
@_VeTaLkO__twitter
Aug 10 2018 13:23
Not sure about themes, but have you checked ControlCatalog project i recommended earlier? Its possible to set borders, header colors, etc
Nazar Bulavko
@bulvvko
Aug 10 2018 13:23
@_VeTaLkO__twitter can you write to me in telegram?
Kyiv
@_VeTaLkO__twitter
Aug 10 2018 13:23
Sure
Nazar Bulavko
@bulvvko
Aug 10 2018 13:24
@_VeTaLkO__twitter username?)
Kyiv
@_VeTaLkO__twitter
Aug 10 2018 13:24
@Yavetal
Wiesław Šoltés
@wieslawsoltes
Aug 10 2018 14:05

Guys, I understand that my request is a bit odorless, but who can help me create a custom window style?
All my attempts end in failure...

@bulvvkoxide https://github.com/wieslawsoltes/Dock/blob/master/src/Dock.Avalonia/Controls/MetroWindow.xaml https://github.com/wieslawsoltes/Dock/blob/master/src/Dock.Avalonia/Controls/MetroWindow.xaml.cs

Ahmed Mohamed
@ahmedflix25
Aug 10 2018 14:46
does Avalonia has a multi platform browser controller?
Kyiv
@_VeTaLkO__twitter
Aug 10 2018 14:53
does Avalonia has a multi platform browser controller?
Definitely not... yet
http://avaloniaui.net/docs/controls/
danwalmsley
@danwalmsley
Aug 10 2018 14:55
@ahmedflix25 no be iv made a control a while back that allows you to host Chromium embedded framework
you can make a crude browser with it
i.e.
here is a screenshot
might need a few updates but it does work
obviously your embedding chrome so you have to start asking why not use electron in that case... (which I wouldn't advise :D)
Kyiv
@_VeTaLkO__twitter
Aug 10 2018 15:27

Are there extra aspects of the designtime?
[xaml]

<UserControl
xmlns:dvm="clr-namespace:My.ViewModels.Designtime;assembly=My"

<Design.DataContext>
<dvm:MyDesignViewModel/>
</Design.DataContext>


---[cs]---
MyDesignViewModel : MyViewModel
{
SomeProperty=true;

The problem: the control, which binds to SomeProperty is not seeing that as true
And how to set a language highlight? :)
Ahmed Mohamed
@ahmedflix25
Aug 10 2018 16:57
@_VeTaLkO__twitter @danwalmsley thanks
danwalmsley
@danwalmsley
Aug 10 2018 17:15
@_VeTaLkO__twitter language highlight?
Kyiv
@_VeTaLkO__twitter
Aug 10 2018 17:16
Yeah, I've been dropping some C#/xaml code samples here - want them to be shown properly
danwalmsley
@danwalmsley
Aug 10 2018 17:28
You have tonpit between ``
For single line
Or \n <code here>\n

Haha i cant type it here iwthout
Ok
Kyiv
@_VeTaLkO__twitter
Aug 10 2018 17:30
\n
var i = 1;
\n
danwalmsley
@danwalmsley
Aug 10 2018 17:30
`````````
Kyiv
@_VeTaLkO__twitter
Aug 10 2018 17:30
Hmmm :)
danwalmsley
@danwalmsley
Aug 10 2018 17:30
3x `
Newline
Theb code
Then newlime
Then 3x `
Kyiv
@_VeTaLkO__twitter
Aug 10 2018 17:30

var i =1;
Yeah :)
pablocsr
@pablocsr
Aug 10 2018 18:57
hi
Error : An assembly specified in the apllication dependencies manifest <Ja1.deps.json> was not found:
package: Avalonia.Direct2D1 version 0.6.1
pablocsr
@pablocsr
Aug 10 2018 19:02
error to run in linux
please help
Kyiv
@_VeTaLkO__twitter
Aug 10 2018 19:07
What exactly are you starting?
pablocsr
@pablocsr
Aug 10 2018 19:10
Thanks, I'm running a simple "hello world" application compiled in visual studio .net core, which installs it in linux and I get that error
dotnet Ja1.dll
Kyiv
@_VeTaLkO__twitter
Aug 10 2018 19:11
Unfortunately, i cannot help, as i'm running Mac and Win and everything works fine for me. Wait for someone from devs - they might have a clue
pablocsr
@pablocsr
Aug 10 2018 19:12
Thanks
pablocsr
@pablocsr
Aug 10 2018 19:18
or how do I install Avalonia runtime in linux correctly?
danwalmsley
@danwalmsley
Aug 10 2018 19:22
direct 2d doesnt work on linux
you should also use nightly builds
because 0.61 is so old now a lot of issues have been solved
Kyiv
@_VeTaLkO__twitter
Aug 10 2018 19:37
@danwalmsley Hi, i have just another fast question :) Can i set Visibility depends on DataContext!=null ?
I think i've read recently article or a forum post about that, but i cant find it now. If its a oneliner, can you drop the general idea?