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)
- Add Hyperlink Inline
- Support Naming `ColumnDefinition` and `RowDefinition` HOT 2
- Regression: StackOverflowException thrown after 11.1 upgrade HOT 1
- Regression: Exceptions thrown in TargetTypeConverter crash the app instead of going to the controls DataValidation
- Not sure why WGL shader got recompiled
- Accessibility & Feature Request: Make fonts follow the System font and size HOT 3
- Tmds.DBus.Protocol.DBusException when hovering from a Datagrid Popup
- AvaloniaAppDelegate<TApp>.FinishedLaunching is not virtual - cannot initialize Maui.Essentials HOT 5
- "Value is null" error spam when binding to an element
- OS data sharing support(Windows,Android,iOS,macOS) HOT 1
- Selection of text in TextBox does not work HOT 3
- EXC_BAD_ACCESS (SIGSEGV) on macOS HOT 3
- styled property not working on UserControl HOT 3
- IndexOutOfRangeException thrown when TextBlock text contains certain characters and TextTrimming is CharacterEllipsis
- Avalonia 11.1 beta2 crashes on start with SkiaSharp 3.0 on Ubuntu Linux HOT 1
- Unable to set window size on MVVM template with d:DesignWidth and d:DesignHeight HOT 4
- Outdated online API reference documentation HOT 1
- Rendering specific text crashes the application HOT 6
- 希望能出个支持预览OFD或ODF文件的内置控件 HOT 1
- Low performance compared to WPF HOT 7
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.