These are chat archives for AvaloniaUI/Avalonia

25th
Jan 2019
James Burnside
@JCBurnside
Jan 25 00:16
ree. trying to define a UserControl (just to get practice) when this happens
image.png
James Burnside
@JCBurnside
Jan 25 01:31
what does Type '{clr-namespace:Avalonia.Controls;assembly=Avalonia.Controls}ITemplate({clr-namespace:Avalonia.Controls;assembly=Avalonia.Controls}IPanel)' does not have a content property. even mean?
drearyrainDeng
@drearyrainDeng
Jan 25 06:45
avalonia will support fluent UI ? like https://github.com/sourcechord/FluentWPF
Nikita Tsukanov
@kekekeks
Jan 25 07:57
We don't have window transparency support on platforms other than Linux yet
We probably won't have transparency on Win7 with aero disabled
Other than that, it should be possible to port FluentWPF
Since I don't see it using custom shaders anywhere
Naeron1984
@Naeron1984
Jan 25 10:18
@grokys It looks like a good solution.
Naeron1984
@Naeron1984
Jan 25 10:26
However (I don't know if this is related) try to open another window(I used the same mainwindow) and then while WhenActived gets called, binding doesn't work. Still using the hack not your solution though
Benedikt Schroeder
@Gillibald
Jan 25 15:50
@grokys Any idea what could cause this? Property '{clr-namespace:Avalonia.Controls;assembly=Avalonia.Controls}TextBlock.Inlines' is already set to this '{clr-namespace:Avalonia.Controls;assembly=Avalonia.Controls}TextBlock' object
Have merged the textelements branch with my SkiaTextLayoutBranche but couldn't run it.
Benedikt Schroeder
@Gillibald
Jan 25 15:57
https://github.com/AvaloniaUI/Avalonia/blob/master/src/Markup/Avalonia.Markup.Xaml/Converters/FontFamilyTypeConverter.cs#L25 needs to be changed to return FontFamily.Parse(s, context?.GetBaseUri()); because of some unfixed bug that doesn't propagate the context to some Elements.
James Burnside
@JCBurnside
Jan 25 16:26
What am I doing wrong now?
ahopper
@ahopper
Jan 25 16:36
@JCBurnside I think ItemsControl.ItemsPanel needs a <ItemsPanelTemplate> arround the template
and ItemsControl.DataTemplates needs a <DataTemplate> around the template (that's what my working code has anyway )
James Burnside
@JCBurnside
Jan 25 17:00
that was it...
Steven Kirk
@grokys
Jan 25 17:04
i wonder if we can just take the WPF docs at https://github.com/dotnet/docs/blob/master/docs/framework/wpf and adapt them?
the CC ´╗┐Attribution 4.0 International licence should allow that right?
ahopper
@ahopper
Jan 25 17:14
so how do you express Button :not with parent of DropDown i.e. don't apply style to button used in DropDown ?
Steven Kirk
@grokys
Jan 25 17:44
not tried it, but i think :not(DropDown) Button should work?
or :not(DropDown) > Button?
stropheum
@stropheum
Jan 25 19:37
Hey is anyone around? Curious about something. http://avaloniaui.net/docs/templates/datatemplates-in-code This example doesn't compile in either client app or MVVM app. Text is a string type and I just get an error for not being able to implicitly convert binding to a string
am I missing something or is this method for creating data templates in code deprecated?
Steven Kirk
@grokys
Jan 25 22:54
@stropheum yes, you're right. it's a mistake in the docs
it should be:
            var template = new FuncDataTemplate<Student>(x =>
                new TextBlock
                {
                    [!TextBlock.TextProperty] = new Binding("FirstName"),
                });