Comments (5)
Could you tell me what the issue is? If I paste your code snippet into the Perspex TestApplication, it runs as expected.
from avalonia.
I don't see the TreeView, if I remove the ContentControl and set it directly to Window Content it works.
from avalonia.
Hmm I'm not seeing that, but I did have some unpushed changes here locally. Could you try pulling from git and trying again.
This is what I did to test:
- Comment out the whole of the
Window window = new Window
declaration in TestApplication and replace it with your code above. - Comment out the block below
var renderer = ((IRenderRoot)window).Renderer;
- Run the program.
I get this:
from avalonia.
Found the issue, I had custom control deriving from ContentControl as for IStyleable.StyleKey it was not founding the style key for my custom control, deriving from UserControl worked, would be fine to find style from base class if not found from current one.
from avalonia.
Ok, great - the problem with automatically using the style for a base class instead of the most derived class is that at the point of style binding it's not known whether a style will be found or not. There may be a better way around this, but at the moment indeed it's recommended to derive from UserControl
or set the style key in your derived class.
Thanks for working through the problem, I know it's not easy when the project is in this early stage!
from avalonia.
Related Issues (20)
- CheckBox fluent theme ControlTheme selectors should target control Background and BorderBrush properties instead Border#PART_Border
- 11.2.0-beta1 - XAML compiler error when using binding in style setter HOT 1
- Wrong base class in axaml code-behind causes internal compiler error in xaml compiler HOT 4
- KeyPreview for Window handles Keys before i can can set Handled
- Scrolling ComboBox items affects parent ScrollViewer
- Setting up Design Time DataContext in Xaml causes Invalid Markup Error HOT 1
- RelativePanel contains the wrong implementation
- nuke on macOS build error CS0017: Program has more than one entry point defined. HOT 2
- Issue with BinaryReader.ReadString returning wrong value on combo WASM+AndroidDevice(not simulator)+Chrome+AOT
- [11.2.0-beta1] this.Target.Opacity doesn't work as expected in Vector3KeyFrameAnimation
- Arrange control to a smaller Rect can't shrink the size of control HOT 1
- Avalonia sometimes discards the DispatcherOperation with Input or lower priority HOT 4
- MinWidth not applied on UserControl HOT 1
- Custom font crash on Linux with 'Could not create glyphTypeface'. Works under Windows HOT 2
- Crash when tooltip overlaps mouse cursor during drag operation
- The SmallIcon for notifications in android doesn't set to app icon. HOT 3
- DataGridRow template
- The AlignmentX and AlignmentY properties of DrawingBrush class do not work on v11.1.1,v11.1.2,v11.1.3 HOT 6
- Get input device identity HOT 3
- GroupButton control for ToggleButton with RadioBox behavior.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from avalonia.