zoukankan      html  css  js  c++  java
  • 【Windows Universal Platform】只是学习笔记

    我是初学,之前没有windows/windows phone的应用开发经验;开博的目的只是记录和督促自己学习。

    心血来潮也好,或是个人喜好的原因,想学着自己开发APP了(PS:以前做过web 开发)

    本来如果要学APP开发,第一选择是IOS平台。可谁让我是软粉呢,以前也是做.net的。话说自家的“武功”尚未学到家,也不好意思贪别人家的武功秘籍了(见:天龙八部)

    我不擅长码字,所以废话就不多说了,最后说一句:这只是我个人的学习笔记。

    试试XAML

    在页面上加一个按钮(Button):

    <Button Content="普通按钮"></Button>

    也可以这么写,一样一样的:

    <Button>
        <Button.Content>普通按钮</Button.Content>
    </Button>

    再加个颜色,你懂的:

    <Button Background="Black">
        <Button.Content>普通按钮</Button.Content>
        <Button.Foreground>White</Button.Foreground>
    </Button>

     再来个“下拉选择":

    <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>,因为可以省略所以省略了(哪那么多为什么!)

    不省略是这样的

    <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

  • 相关阅读:
    python高级编程
    django笔记
    sublime ide
    python3 django mysql
    python win
    linux时区设置
    在实际应用中如何实现切圆角的功能
    display和visiblity在应用中使用哪个好
    看懂UML类图和时序图
    解决Xcode7.2真机调试出现:The account “” has no team with ID “”
  • 原文地址:https://www.cnblogs.com/lifeonfoot/p/4718789.html
Copyright © 2011-2022 走看看