当前位置:网站首页>Open source C # WPF control library --newbeecoder UI usage guide (III)
Open source C # WPF control library --newbeecoder UI usage guide (III)
2022-06-23 21:32:00 【User 7152477】
When a set of data is to be displayed in a development project and one or more items can be selected , have access to ListBox List box .SelectionMode Set to select single and multiple items , Select all to use SelectAll Property to set .
stay WPF You can be right ItemsSource Bind object to get data list . To select its item in the list box . I want to do the opposite , If you deselect an item , Then... In the object ObservableList Change accordingly .
Newbeecoder.UI Control library in ListBox Basic extension more functions , For example, style , Icon , Fillet, etc . Need to extend other functions will Newbeecoder.UI Control can be added .
ListBoxItem Used to fill in the list data of each item . To choose one ListBoxItem In the list box , Set up IsSelected attribute true. By default , Of HorizontalAlignment One of them ListBoxItem Is set to stretch .StackPanel The default horizontal position of is Center. If you pass StackPanel Set up ListBoxItem Of Width attribute , The default values of the panel are applied and the item is centered .
Newbeecoder.UI Open source controls Demo Download link :https://share.weiyun.com/MwgWJM8Y
As long as you have good design drawings , Basically you can use Newbeecoder.UI Developed according to the design drawing , The following demonstrates the controls developed by the open source control library :
Newbeecoder.UI There are two kinds of list boxes designed . These are the basic list boxes 、 Menu list box .
One 、 How to use the basic list box .
<NbListBox Style="{DynamicResource DefaultListBoxStyle}" Width="120" Background="{Binding Path=Color.Brush_Border4, Source={x:Static NbTheme.Current}}">
<NbListBoxItem Style="{DynamicResource DefaultListBoxItemStyle}" Content=" Function one "/>
<NbListBoxItem Style="{DynamicResource DefaultListBoxItemStyle}" Content=" Function 2 "/>
<NbListBoxItem Style="{DynamicResource DefaultListBoxItemStyle}" Content=" Function three "/>
</NbListBox>Two 、 How to use the menu list box .
<NbListBox Style="{DynamicResource MenuListBoxStyle}" Background="{Binding Path=Color.Brush_Border4, Source={x:Static NbTheme.Current}}">
<NbListBoxItem Style="{DynamicResource MenuListBoxItemStyle}">
<StackPanel Orientation="Horizontal">
<NbIcon Data="{StaticResource Icon-Button-Fill}" Width="18" Margin="16,0,5,0" Foreground="{Binding Path=Color.Brush_Base2_OP8, Source={x:Static NbTheme.Current}}"/>
<TextBlock Text=" Button " VerticalAlignment="Center"/>
</StackPanel>
</NbListBoxItem>
<NbListBoxItem Style="{DynamicResource MenuListBoxItemStyle}">
<StackPanel Orientation="Horizontal">
<NbIcon Data="{StaticResource Icon-Check-Fill}" Width="18" Margin="16,0,5,0" Foreground="{Binding Path=Color.Brush_Base2_OP8, Source={x:Static NbTheme.Current}}"/>
<TextBlock Text=" Radio buttons " VerticalAlignment="Center"/>
</StackPanel>
</NbListBoxItem>
<NbListBoxItem Style="{DynamicResource MenuListBoxItemStyle}">
<StackPanel Orientation="Horizontal">
<NbIcon Data="{StaticResource Icon-Radio-Fill}" Width="18" Margin="16,0,5,0" Foreground="{Binding Path=Color.Brush_Base2_OP8, Source={x:Static NbTheme.Current}}"/>
<TextBlock Text=" Checkbox " VerticalAlignment="Center"/>
</StackPanel>
</NbListBoxItem>
<NbListBoxItem Style="{DynamicResource MenuListBoxItemStyle}">
<StackPanel Orientation="Horizontal">
<NbIcon Data="{StaticResource Icon-ListBox-Fill}" Width="18" Margin="16,0,5,0" Foreground="{Binding Path=Color.Brush_Base2_OP8, Source={x:Static NbTheme.Current}}"/>
<TextBlock Text=" List box " VerticalAlignment="Center"/>
</StackPanel>
</NbListBoxItem>
<NbListBoxItem Style="{DynamicResource MenuListBoxItemStyle}">
<StackPanel Orientation="Horizontal">
<NbIcon Data="{StaticResource Icon-TextBox-Fill}" Width="18" Margin="16,0,5,0" Foreground="{Binding Path=Color.Brush_Base2_OP8, Source={x:Static NbTheme.Current}}"/>
<TextBlock Text=" Input box " VerticalAlignment="Center"/>
</StackPanel>
</NbListBoxItem>
</NbListBox>On the menu NbListBoxItem List item , Add a... On the left NbIcon Icon , In the example, the icon is a pre saved vector graph in the resource file , So call with static resources . On the right TextBlock Show text content .
Need to use Newbeecoder.UI Open source control library or customized UI Control development please send me a private letter .
边栏推荐
- Phpkf CMS 3.00 beta y6 remote code execution
- Full instructions for databinding
- On line project LAN on-line software use ----phpstudy
- JS mailbox regular expression
- Overview of digital circuits
- How can the cloud disk service be connected to the server? How many hard disks can the server mount?
- [redis] intersection and union of ordered sets
- 网上证券开户安全还是去营业部安全
- Shanghai benchmarking enterprise · Schneider Electric visited benchmarking learning lean production, smart logistics supply chain and digital transformation
- Is it safe to open an online securities account or to go to the business department
猜你喜欢

How to gradually improve PMO's own ability and management level

What are the main dimensions of PMO performance appraisal?

Lightweight, dynamic and smooth listening, hero earphone hands-on experience, can really create

How does PMO select and train project managers?

I am 30 years old, no longer young, and have nothing

New SQL syntax quick manual!

How to view the role of PMO in agile organizations?

大一女生废话编程爆火!懂不懂编程的看完都拴Q了

发现一个大佬云集的宝藏硕博社群!
![Harmonyos application development -- mynotepad[memo][api v6] based on textfield and image pseudo rich text](/img/b1/71cc36c45102bdb9c06e099eb42267.jpg)
Harmonyos application development -- mynotepad[memo][api v6] based on textfield and image pseudo rich text
随机推荐
Chrome extension development Chinese tutorial-1
The use of go unsafe
JS mailbox regular expression
Summary of multiple methods for obtaining the last element of JS array
Harmonyos application development -- mynotepad[memo][api v6] based on textfield and image pseudo rich text
[hot sales at the beginning of the year] | the first special offer of popular cloud products is second to none, and the first year of 1-core 2G cloud server is 38 yuan!
Drawing STM32 minimum system schematic diagram with AD
A detailed discussion on the use guide of network Swiss Army knife nmap
Global and Chinese market of gas fire pit 2022-2028: Research Report on technology, participants, trends, market size and share
Easyplayer player error 502 bad gateway problem analysis
SAP FICO as03 display fixed assets master data
2021 three "myths" of science and technology industry -- yuancosmos, NFT and web 3
From AIPL to grow, talking about the marketing analysis model of Internet manufacturers
What software is safe to use to fight new debts? What are the new bond platforms
Advantages of token mechanism over cookie mechanism
How can the cloud disk service be connected to the server? How many hard disks can the server mount?
How to view the hard disk of ECS? How about the speed and stability of the server
What are the advantages of attaching a virtual machine to a hard disk cloud server
C WPF new open source control library: newbeecoder Nbtreeview of UI
【Debian】Debian使用笔记