【Windows Universal Platform】只是學習筆記 - 開始

我是初學,以前沒有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

相關文章
相關標籤/搜索