8月29日wpf

小语

折磨我们的往往是想象,而不是真实。

学wpf

7.07

1.vs如何创建新项目?

退出,创建新项目,点c#,windows,进入界面

2.app.config在哪里?

好像只有这个。。。

试一下,不是

我为啥没有config?

视频里的F5没用,我自己点了运行,结果差不多

20min课程学了俩小时,最后写了一个ui,以下为代码

cs 复制代码
    <Border Padding="10">
        <StackPanel>
            <!-- Buttons -->
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <Button Margin="0 0 10 0" Grid.Column="0" Content="Apply" />
                <Button Grid.Column="1" Content="Reset" />
                <Button Margin="10 0 0 0" Grid.Column="2" Content="Refresh" />
            </Grid>
            <TextBlock Text=" Paulse Properties" FontWeight="Bold" Margin="0 10 " />

            <!-- Description-->
            <TextBlock Text=" Description" Margin="0 10 " />
            <TextBox Padding=" 2"/>

            <!-- Status and Revision-->
            <Grid>

                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="2*" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>

                <StackPanel Grid.Column=" 0" Margin=" 0 0 10 0">
                    <!-- 0为索引-->
                    <TextBlock Text=" Status" Margin="0 10 " />
                    <TextBox IsReadOnly="True" Background=" #eee" Padding=" 2"/>
                    <!-- eee分别代表RGB-->
                </StackPanel>

                <StackPanel Grid.Column=" 1">
                    <!-- 0为索引-->
                    <TextBlock Text=" Revision" Margin="0 10 " />
                    <TextBox IsReadOnly="True" Background=" #eee" Padding=" 2"/>
                </StackPanel>

            </Grid >

            <!-- Part Number-->
            <TextBlock Text=" Part Number" Margin="0 10 " />
            <TextBox IsReadOnly="True" Background=" #eee" Padding=" 2"/>
            <!-- Raw Materials-->
            <TextBlock Text=" Raw Material" FontWeight="Bold" Margin="0 10 " />

            <!-- Material-->
            <TextBlock Text=" Material" Margin="0 10 " />
            <ComboBox  Padding=" 2"/>
            <!-- 下拉框-->

            <!-- Manufacturing Info-->
            <TextBlock Text=" Manufacturing Info" FontWeight="Bold" Margin="0 10 " />

            <!-- Work Centres-->
            <TextBlock Text=" Work Centres" Margin="0 0 0 10 " />
            <!-- Checkboxes-->
            <Grid>

                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>

                <!-- Column 1-->
                <StackPanel Grid.Column=" 0" Margin=" 0 0 10 0">
                    <!-- 0为索引-->
                    <CheckBox Content=" Weld"/>
                    <CheckBox Content=" A"/>
                    <CheckBox Content=" B"/>
                    <CheckBox Content=" c"/>
                    <CheckBox Content=" c"/>
                    <!-- eee分别代表RGB-->
                </StackPanel>

                <!-- Column 2-->
                <StackPanel Grid.Column=" 1">
                    <!-- 0为索引-->
                    <CheckBox Content=" Weld"/>
                    <CheckBox Content=" A"/>
                    <CheckBox Content=" B"/>
                    <CheckBox Content=" c"/>
                    <CheckBox Content=" c"/>
                </StackPanel>

            </Grid >

            <!-- Length-->
            <TextBlock Text=" Length" Margin="0 10 " />
            <TextBox Padding=" 2"/>

            <!-- Mass-->
            <TextBlock Text=" Mass" Margin="0 10 " />
            <TextBox IsReadOnly="True" Background=" #eee" Padding=" 2"/>

            <!-- Finish-->
            <TextBlock Text=" Finish" Margin="0 10 " />
            <ComboBox  SelectedIndex ="0 " Padding=" 2">
                <ComboBoxItem>Painted</ComboBoxItem>
                <ComboBoxItem>Not Painted</ComboBoxItem>
            </ComboBox>
            <!-- 下拉框-->
            <!-- Purchase Info-->
            <TextBlock Text=" Purchase Info" Margin="0 10 " />
            <ComboBox  SelectedIndex ="0 " Padding=" 2">
                <ComboBoxItem>Rubber</ComboBoxItem>
                <ComboBoxItem>Not Rubber</ComboBoxItem>
            </ComboBox>
            
            <!--Supplier Name-->
            <TextBlock Text=" Supplier Name" Margin="0 10 " />
            <TextBox Padding=" 2"/>
            <!--Supplier Code-->
            <TextBlock Text=" Supplier Code" Margin="0 10 " />
            <TextBox Padding=" 2"/>
            <!-- Additional Info-->
            <TextBlock Text=" Additional Info" FontWeight="Bold" Margin="0 10 " />

            <!-- Note-->
            <TextBlock Text=" Note" Margin="0 10 " />
            <TextBox Padding=" 2"/>
        </StackPanel>
    </Border>
    
</Window>
相关推荐
拖孩27 分钟前
微信小程序基于Canvas实现头像图片裁剪(下)
前端·javascript·微信小程序
q5673152340 分钟前
用Dispatch库的爬虫程序爬取图片网站
开发语言·爬虫·python·scrapy
哟哟耶耶40 分钟前
React-05React中props属性(传递数据),propTypes校验,类式与函数式组件props的使用
前端·javascript·react.js
knightkkzboy1 小时前
《C语言中的“魔法盒子”:自定义函数的奇妙之旅》
c语言·开发语言·函数
Jelena技术达人1 小时前
深入解析:Python 爬取淘宝商品上下架接口
开发语言·python
菠萝崽.1 小时前
springboot中测试python脚本:ProcessBuilder
java·开发语言·spring boot·python·processbuilder
仙人掌_lz1 小时前
详解如何从零用 Python复现类似 GPT-4o 的多模态模型
开发语言·python·gpt·llm·gpt-4o·deepseek
竹苓丿1 小时前
CSS Grid布局:从入门到放弃再到真香
前端·javascript·css
努力学习的小廉1 小时前
【智能指针】—— 我与C++的不解之缘(三十三)
开发语言·c++
baobao17676408301 小时前
C++单例模式
javascript·c++·单例模式