These are chat archives for AvaloniaUI/Avalonia

10th
Nov 2017
danwalmsley
@danwalmsley
Nov 10 2017 23:52
@grokys seems dynamic resource doesn't work inside a visual brush
i.e.
<ScrollViewer.Background>
                        <VisualBrush DestinationRect="0,0,20,20" TileMode="Tile">
                            <VisualBrush.Visual>
                                <Canvas Width="16" Height="16"  Background="{DynamicResource ApplicationAccentBrush}">
                                    <Rectangle Height="8" Width="8" Fill="Green" />
                                    <Rectangle Height="8" Width="8" Canvas.Left="8" Canvas.Top="8" Fill="Green" />
                                </Canvas>
                            </VisualBrush.Visual>
                        </VisualBrush>
                    </ScrollViewer.Background>
Steven Kirk
@grokys
Nov 10 2017 23:53
hmm yeah i don't think this works in WPF either tbh
DynamicResource needs to look up the tree, but from where?
Nikita Tsukanov
@kekekeks
Nov 10 2017 23:54
It could look for some global resource from App.xaml at least
Steven Kirk
@grokys
Nov 10 2017 23:54
yeah that would be a good start
but even that isn't so simple as a toplevel can override app.xaml
Nikita Tsukanov
@kekekeks
Nov 10 2017 23:55
BTW, I got tired of waiting for Rider guys to release an sdk
Steven Kirk
@grokys
Nov 10 2017 23:55
probably the best thing to do would be to just look up the resources from the first control the brush is applied to
Nikita Tsukanov
@kekekeks
Nov 10 2017 23:55
and started working on VSCode extension
It will be an unholy abomination
Steven Kirk
@grokys
Nov 10 2017 23:56
oh nice! that would be super cool
Nikita Tsukanov
@kekekeks
Nov 10 2017 23:56
But at least we'll have something that works across the platforms
Steven Kirk
@grokys
Nov 10 2017 23:56
yeah, that would be really good
Nikita Tsukanov
@kekekeks
Nov 10 2017 23:56
As a bonus point
We could potentially get something like https://sharplab.io/
but with XAML and previewer instead
Steven Kirk
@grokys
Nov 10 2017 23:57
wow!
Nikita Tsukanov
@kekekeks
Nov 10 2017 23:57
The thing is that previewer needs to somehow render to HTML inside Electron that powers vscode
And if we get that, we might as well add support for codemirror
Still need to figure out something about completion
Steven Kirk
@grokys
Nov 10 2017 23:58
doesn't the previewer return a bitmap for the preview contents?
Nikita Tsukanov
@kekekeks
Nov 10 2017 23:59
I could potentially generate an XML schema
Steven Kirk
@grokys
Nov 10 2017 23:59
ah for the completion, ok
Nikita Tsukanov
@kekekeks
Nov 10 2017 23:59
XML schema was actually my second approach for getting autocomplete to work in Visual Studio