我是初学,以前没有windows/windows phone的应用开发经验;开博的目的只是记录和督促本身学习。web
心血来潮也好,或是我的喜爱的缘由,想学着本身开发APP了(PS:之前作过web 开发)windows
原本若是要学APP开发,第一选择是IOS平台。可谁让我是软粉呢,之前也是作.net的。话说自家的“武功”还没有学到家,也很差意思贪别人家的武功秘籍了(见:天龙八部)学习
我不擅长码字,因此废话就很少说了,最后说一句:这只是我我的的学习笔记。spa
试试XAML.net
在页面上加一个按钮(Button):code
<Button Content="普通按钮"></Button>
也能够这么写,同样同样的:blog
<Button> <Button.Content>普通按钮</Button.Content> </Button>
再加个颜色,你懂的:开发
<Button Background="Black"> <Button.Content>普通按钮</Button.Content> <Button.Foreground>White</Button.Foreground> </Button>
再来个“下拉选择":it
<ComboBox HorizontalAlignment="Center" Margin="0 100 0 0"> <ComboBoxItem Content="Select item" IsSelected="True"></ComboBoxItem> <ComboBoxItem Content="Item 1"></ComboBoxItem> <ComboBoxItem Content="Item 2"></ComboBoxItem> </ComboBox>
注意,这里是省略了 <ComboBox.Items>,由于能够省略因此省略了(哪那么多为何!)class
不省略是这样的
<ComboBox HorizontalAlignment="Center" Margin="0 100 0 0"> <ComboBox.Items> <ComboBoxItem Content="Select item" IsSelected="True"></ComboBoxItem> <ComboBoxItem Content="Item 1"></ComboBoxItem> <ComboBoxItem Content="Item 2"></ComboBoxItem> </ComboBox.Items> </ComboBox>
下回见:标记扩展
1. Binding
2. StaticResource
3. TemplateBinding
4. RelativeSource