- 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>
推薦閱讀
- Oracle Database 12c Security Cookbook
- 小學(xué)生C++創(chuàng)意編程(視頻教學(xué)版)
- 從零開始學(xué)C語言
- Babylon.js Essentials
- PowerDesigner 16 從入門到精通
- Oracle 12c從入門到精通(視頻教學(xué)超值版)
- 數(shù)據(jù)分析與挖掘算法:Python實戰(zhàn)
- INSTANT Premium Drupal Themes
- Python無監(jiān)督學(xué)習(xí)
- Extending Docker
- KnockoutJS Blueprints
- HTML5+CSS+JavaScript深入學(xué)習(xí)實錄
- 歐姆龍PLC編程指令與梯形圖快速入門
- Splunk Developer's Guide(Second Edition)
- 移動智能系統(tǒng)測試原理與實踐