- 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>
推薦閱讀
- Delphi程序設計基礎:教程、實驗、習題
- 數據庫原理及應用(Access版)第3版
- 移動UI設計(微課版)
- Java程序員面試算法寶典
- Android NDK Beginner’s Guide
- Python機器學習實戰
- Learning Laravel's Eloquent
- 運用后端技術處理業務邏輯(藍橋杯軟件大賽培訓教材-Java方向)
- Scala編程(第5版)
- 石墨烯改性塑料
- Django Design Patterns and Best Practices
- Distributed Computing with Python
- Android開發進階實戰:拓展與提升
- Node.js核心技術教程
- Python網絡運維自動化