Giter Club home page Giter Club logo

Comments (5)

grokys avatar grokys commented on May 18, 2024

Could you tell me what the issue is? If I paste your code snippet into the Perspex TestApplication, it runs as expected.

from avalonia.

amerkoleci avatar amerkoleci commented on May 18, 2024

I don't see the TreeView, if I remove the ContentControl and set it directly to Window Content it works.

from avalonia.

grokys avatar grokys commented on May 18, 2024

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:

image

from avalonia.

amerkoleci avatar amerkoleci commented on May 18, 2024

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.

grokys avatar grokys commented on May 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.