Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于TreeComboBox的问题 #492

Open
nblfeng opened this issue Nov 21, 2024 · 1 comment
Open

关于TreeComboBox的问题 #492

nblfeng opened this issue Nov 21, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@nblfeng
Copy link

nblfeng commented Nov 21, 2024

当Items使用如下的数据绑定时, 最后一个节点无法展开;

Items = new List<TreeComboBoxItemViewModel>( )
{
    new TreeComboBoxItemViewModel()
    {
        ItemName = "Item 2",
        Children = new List<TreeComboBoxItemViewModel>()
        {
            new TreeComboBoxItemViewModel { ItemName = "Item 2-2" },

        }
    },
    new TreeComboBoxItemViewModel()
    {
        ItemName = "Item 3",
    },
    new TreeComboBoxItemViewModel()
    {
        ItemName = "Item 4",
    },
    new TreeComboBoxItemViewModel()
    {
        ItemName = "Item 1",
        Children = new List<TreeComboBoxItemViewModel>()
        {
            new TreeComboBoxItemViewModel { ItemName = "Item 1-1" },
            new TreeComboBoxItemViewModel { ItemName = "Item 1-2" },
            new TreeComboBoxItemViewModel 
            { 
                ItemName = "Item 1-3",
                Children = new List<TreeComboBoxItemViewModel>()
                {
                    new TreeComboBoxItemViewModel { ItemName = "Item 1-3-1" }
                }
            },
        }
    },
};

image

@rabbitism
Copy link
Member

默认开启虚拟化导致的,可以先使用正常的ItemsPanel

            <u:TreeComboBox.ItemsPanel>
                <ItemsPanelTemplate>
                    <StackPanel />
                </ItemsPanelTemplate>
            </u:TreeComboBox.ItemsPanel>

@rabbitism rabbitism added the bug Something isn't working label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants