开发者

TreeView CheckBoxes WPF

开发者 https://www.devze.com 2022-12-23 19:27 出处:网络
H开发者_运维百科ow this make in XAML without ListView and TreeListView<TreeView> <TreeView.ItemContainerStyle>

H开发者_运维百科ow this make in XAML without ListView and TreeListView


<TreeView>
<TreeView.ItemContainerStyle>
    <Style
        TargetType='TreeViewItem'>
        <Setter
            Property='Template'>
            <Setter.Value>
                <ControlTemplate
                    TargetType='TreeViewItem'>
                    <StackPanel
                        Orientation='Horizontal'>
                        <CheckBox
                            Width='40'
                            Content='A' />
                        <CheckBox
                            Width='40'
                            Content='B' />
                        <!--
                        the rest of the TreeViewItem template here
                        http://msdn.microsoft.com/en-us/library/ms788727.aspx
                        -->
                    </StackPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</TreeView.ItemContainerStyle>

0

精彩评论

暂无评论...
验证码 换一张
取 消