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

希望能加入可以多选的Combox扩展控件 #117

Closed
5653325 opened this issue Jul 2, 2019 · 4 comments
Closed

希望能加入可以多选的Combox扩展控件 #117

5653325 opened this issue Jul 2, 2019 · 4 comments
Labels
🏭 enhancement New feature or request

Comments

@5653325
Copy link

5653325 commented Jul 2, 2019

最好是可以分组的那种,比如下拉后显示如下这种格式
分组一(文字,不可选中)
可选内容一
可选内容二
可选内容三
分组二(文字,不可选中)
可选内容一
可选内容二
可选内容三
谢谢。

@NaBian NaBian added the 🏭 enhancement New feature or request label Jul 2, 2019
@noctwolf
Copy link
Member

noctwolf commented Jul 2, 2019

修改默认模板做了个简单的例子
模板修改1
模板修改2
添加分组描述

@5653325
Copy link
Author

5653325 commented Jul 3, 2019

修改默认模板做了个简单的例子
模板修改1
模板修改2
添加分组描述

最好是CheckBox的多选项。哈哈

@noctwolf
Copy link
Member

noctwolf commented Jul 3, 2019

设置ListBox的模板就可以 😸

            <ListBox.ItemTemplate>
                <DataTemplate>
                    <Grid>
                        <CheckBox Content="{Binding Title}" 
                                  IsChecked="{Binding IsSelected, 
                            RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListBoxItem}}}"/>
                    </Grid>
                </DataTemplate>
            </ListBox.ItemTemplate>

@5653325
Copy link
Author

5653325 commented Jul 4, 2019

谢谢

@5653325 5653325 closed this as completed Jul 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏭 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants