Giter VIP home page Giter VIP logo

Comments (5)

GochenRyan avatar GochenRyan commented on September 20, 2024

I tested it to be an ownerType issue. I get the result I want when the ownerType of VisibleDockablesProperty is DocumentDock. Is there a good way to handle the ownerType of VisibleDockablesProperty in the inheritance chain?

from microsoft-ui-xaml.

ranjeshj avatar ranjeshj commented on September 20, 2024

@GochenRyan I'm having trouble understanding the issue. can you explain a bit more/provide a repro project that is scoped to the problem you are facing?

from microsoft-ui-xaml.

GochenRyan avatar GochenRyan commented on September 20, 2024

@ranjeshj
I want to use the ContentTemplateSelector of ContentControl and the ItemTemplateSelector of ItemsControl to generate the corresponding custom controls step by step according to the node tree of xaml here๏ผš

<local1:DockControl>
    <models:RootDock>
        <models:RootDock.VisibleDockables>
            <models:DocumentDock>
                <models:DocumentDock.VisibleDockables>
                    <models:Document x:Name="Document1" Title="Program.cs">
                        <TextBlock Text="{Binding Title}"/>
                    </models:Document>
                    <!--<models:Document x:Name="Document2" Title="App.axaml">
                        <TextBlock Text="{Binding Title}"/>
                    </models:Document>-->
                </models:DocumentDock.VisibleDockables>
            </models:DocumentDock>
        </models:RootDock.VisibleDockables>
    </models:RootDock>
</local1:DockControl>

When creating a RootDockControl, its Items are not just the next level nodes.

from microsoft-ui-xaml.

GochenRyan avatar GochenRyan commented on September 20, 2024

@ranjeshj Actually I have a solution. I created a new branch fix-containerdp and fixed this issue in commit 9b43b77802fdb0e097ce09c8f9e7aeefe27b43f8. In short, by putting the container dependency property at the last level of the inheritance chain. But I don't know why the container dependency property needs to be handled specially.

from microsoft-ui-xaml.

GochenRyan avatar GochenRyan commented on September 20, 2024

@ranjeshj My fault. I misunderstood the usage of Collection-type dp. FYI: https://learn.microsoft.com/en-us/windows/uwp/xaml-platform/custom-dependency-properties#collection-type-dependency-properties.

from microsoft-ui-xaml.

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.