当前位置: 首页 > news >正文

C# WPF编程基础

XAML文件内容

 

<Window x:Class="Wpf_demo1.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:d="http://schemas.microsoft.com/expression/blend/2008"xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"xmlns:local="clr-namespace:Wpf_demo1"mc:Ignorable="d"Title="我爱学编程" Height="450" Width="800"><!--x:Class="Wpf_demo1.MainWindow"这里的MainWindow名称与.xaml.cs上的public partial class 名称相同--><!--上述区域代表非客户区,正常来说只能修改Title的属性--><!--<Grid>--><!--Grid区域代表客户区--><!--<Button Width="122" HorizontalAlignment="Right" Margin="0,70,606,244"/><Button Width="122" HorizontalAlignment="Left" Margin="476,217,0,97"/></Grid>--><Grid ShowGridLines="True"><Grid.RowDefinitions><!--将整个页面分成4行--><RowDefinition Height="20"/><RowDefinition Height="20"/><RowDefinition/><RowDefinition Height="20" /></Grid.RowDefinitions><!--定义了第一行的内容--><StackPanel Grid.Row="0" Grid.Column="0" Orientation="Horizontal"><Button Height="20" Width="70" Content="文件"/><Button Height="20" Width="70" Content="编辑"/><Button Height="20" Width="70" Content="查看"/><Button Height="20" Width="70" Content="外观"/><Button Height="20" Width="70" Content="设置"/><Button Height="20" Width="70" Content="帮助"/></StackPanel><!--定义了第二行的内容--><StackPanel Grid.Row="1" Grid.Column="0" Orientation="Horizontal"><Button Height="20" Width="70" Content="1"/><Button Height="20" Width="70" Content="2"/><Button Height="20" Width="70" Content="3"/><Button Height="20" Width="70" Content="4"/><Button Height="20" Width="70" Content="5"/><Button Height="20" Width="70" Content="6"/></StackPanel><!--定义第三行第一列的内容--><Grid Grid.Row="2" Grid.Column="0" Background="Aqua"><Grid.ColumnDefinitions><ColumnDefinition Width="70" /><ColumnDefinition/></Grid.ColumnDefinitions><StackPanel><Button Height="20" Content="1"/><Button Height="20" Content="3"/><Button Height="20" Content="5"/><Button Height="20" Content="7"/><Button Height="20" Content="9"/></StackPanel><!--定义第三行第二列为输入文本--><TextBox Grid.Row="0" Grid.Column="1" TextWrapping="Wrap"/></Grid><!--定义最后一行的内容--><Grid Grid.Row="3" Grid.Column="0"><Grid.ColumnDefinitions><ColumnDefinition/><ColumnDefinition/><ColumnDefinition/><ColumnDefinition/><ColumnDefinition/><ColumnDefinition/><ColumnDefinition/></Grid.ColumnDefinitions><Button Grid.Row="0" Grid.Column="0" Content="行"/><Button Grid.Row="0" Grid.Column="1" Content="列"/><Button Grid.Row="0" Grid.Column="2" Content="字符"/><Button Grid.Row="0" Grid.Column="3" Content="求值"/><Button Grid.Row="0" Grid.Column="4" Content="选定"/><Button Grid.Row="0" Grid.Column="5" Content="选行"/><Button Grid.Row="0" Grid.Column="6" Content="匹配"/></Grid></Grid></Window>

相关文章:

  • 外汇天眼:风险预警!以下平台监管牌照被撤销!
  • 2024年5月22日 (周三) 叶子游戏新闻
  • 国产数据库替代加速 助力数字中国建设
  • firewalld
  • 小小字符串竟然如此嚣张 —— 聊聊 Java 的 String
  • 四川景源畅信:新人做抖店的成本很高吗?
  • C++容器之位集(std::bitset)
  • 3步找回丢失数据,EasyRecovery让数据恢复如此简单!
  • 骆驼大赛
  • Python燃气轮机汽车钢棒整流电路控制图统计模型过程潜力分析
  • Python 机器学习 基础 之 模型评估与改进 【评估指标与评分】的简单说明
  • Flutter 中的 TabBarView 小部件:全面指南
  • FPGA DMA技术分享(赋能高速数据处理的新动力介绍篇)
  • 简单得阴影引导实现
  • 【设计模式】JAVA Design Patterns——Circuit Breaker(断路器模式)
  • angular2 简述
  • Essential Studio for ASP.NET Web Forms 2017 v2,新增自定义树形网格工具栏
  • iOS高仿微信项目、阴影圆角渐变色效果、卡片动画、波浪动画、路由框架等源码...
  • JS变量作用域
  • js数组之filter
  • Linux链接文件
  • niucms就是以城市为分割单位,在上面 小区/乡村/同城论坛+58+团购
  • PHP CLI应用的调试原理
  • socket.io+express实现聊天室的思考(三)
  • 初探 Vue 生命周期和钩子函数
  • 个人博客开发系列:评论功能之GitHub账号OAuth授权
  • 基于Vue2全家桶的移动端AppDEMO实现
  • 全栈开发——Linux
  • 实现菜单下拉伸展折叠效果demo
  • 通信类
  • 项目实战-Api的解决方案
  • ​Base64转换成图片,android studio build乱码,找不到okio.ByteString接腾讯人脸识别
  • (02)vite环境变量配置
  • (3)(3.2) MAVLink2数据包签名(安全)
  • (poj1.3.2)1791(构造法模拟)
  • (草履虫都可以看懂的)PyQt子窗口向主窗口传递参数,主窗口接收子窗口信号、参数。
  • (附源码)springboot炼糖厂地磅全自动控制系统 毕业设计 341357
  • (三)Hyperledger Fabric 1.1安装部署-chaincode测试
  • (算法)前K大的和
  • (微服务实战)预付卡平台支付交易系统卡充值业务流程设计
  • (一)Java算法:二分查找
  • (一)Thymeleaf用法——Thymeleaf简介
  • (转)机器学习的数学基础(1)--Dirichlet分布
  • .NET Core WebAPI中使用swagger版本控制,添加注释
  • .NetCore Flurl.Http 升级到4.0后 https 无法建立SSL连接
  • .Net多线程总结
  • .NET设计模式(11):组合模式(Composite Pattern)
  • @KafkaListener注解详解(一)| 常用参数详解
  • @Tag和@Operation标签失效问题。SpringDoc 2.2.0(OpenApi 3)和Spring Boot 3.1.1集成
  • [Apio2012]dispatching 左偏树
  • [BZOJ 4034][HAOI2015]T2 [树链剖分]
  • [C/C++]数据结构 深入挖掘环形链表问题
  • [c++] 什么是平凡类型,标准布局类型,POD类型,聚合体
  • [CQOI 2011]动态逆序对
  • [CTO札记]如何测试用户接受度?