- Mastering Visual Studio 2017
- Kunal Chowdhury
- 59字
- 2021-07-15 17:26:42
Collection syntax
Sometimes it's required to define a collection of elements in the XAML. This is done using the Collection syntax to make it more readable. For example, a StackPanel can have multiple elements defined inside the Children property :
<StackPanel> <StackPanel.Children> <Button Content="1" /> <Button Content="2" /> </StackPanel.Children> </StackPanel>
The preceding example can also be written as follows, where the parser knows how to create and assign it:
<StackPanel> <Button Content="1" /> <Button Content="2" /> </StackPanel>
推薦閱讀
- 摩登創(chuàng)客:與智能手機(jī)和平板電腦共舞
- Mastering Spring MVC 4
- Oracle從入門到精通(第5版)
- Python算法指南:程序員經(jīng)典算法分析與實(shí)現(xiàn)
- Lighttpd源碼分析
- 常用工具軟件立體化教程(微課版)
- R用戶Python學(xué)習(xí)指南:數(shù)據(jù)科學(xué)方法
- Swift 4從零到精通iOS開發(fā)
- Mastering VMware Horizon 7(Second Edition)
- Python面試通關(guān)寶典
- Java多線程并發(fā)體系實(shí)戰(zhàn)(微課視頻版)
- Learning Cocos2d-JS Game Development
- Flink入門與實(shí)戰(zhàn)
- Python Penetration Testing Essentials
- Learning Apache Thrift