zoukankan
html css js c++ java
WPF绑定ListBox
class Student { public string sno { get; set; } public string sname { get; set; } public string sage { get; set; } }
定义实体类Student
<ListBox Height="163" HorizontalAlignment="Left" Margin="12,12,0,0" Name="listBox1" VerticalAlignment="Top" Width="217" > <ListBox.ItemTemplate> <DataTemplate> <StackPanel Orientation="Horizontal"> <TextBlock Text="{Binding sno}"/> <TextBlock Text="{Binding sname}"/> <TextBlock Text="{Binding sage}"/> </StackPanel> </DataTemplate> </ListBox.ItemTemplate> </ListBox>
XAML页面设置绑定格式和字段
List<Student> students = new List<Student>(); students.Add(new Student { sno = "1", sname = "王井", sage = "20" }); students.Add(new Student { sno = "2", sname = "高瑞", sage = "21" }); students.Add(new Student { sno = "3", sname = "刘欢", sage = "21" }); listBox1.Items.Clear(); listBox1.ItemsSource = students;
后台绑定数据
查看全文
相关阅读:
同node上,两个pod通过svc访问不通
Prometheus基于service自动添加监控
systemd 服务管理编写
kubernetes 控制器详解【持续完善中】
tcpdump抓包工具
Zabbix日志监控插件
Spring WebFlux之HttpHandler的探索
知秋源码解读分享系列
Spring Framework 5.0.0.M3中文文档 翻译记录 Part I. Spring框架概览1-2.2
Spring Framework 5.0.0.M3中文文档 翻译记录 introduction
原文地址:https://www.cnblogs.com/javawebsoa/p/2458007.html
最新文章
[每天进步一点点]mysql笔记整理(一)
记录一次Arthas使用
【一起刷LeetCode】整数反转
【一起刷LeetCode】整数反转
Disruptor的简单介绍与应用
【一起刷LeetCode】Z 字形变换
十大基本排序整理
【一起刷LeetCode】在未排序的数组中找到第 k 个最大的元素
docker初体验:Docker部署SpringCloud项目eureka-server
Java接口统一样式返回模板
热门文章
Tomcat源码分析三:Tomcat启动加载过程(一)的源码解析
Tomcat源码分析二:先看看Tomcat的整体架构
Tomcat源码分析一:编译Tomcat源码
Servlet与Tomcat运行示例
集合源码基础之数组扩容技术
了解一下Java SPI的原理
centos7上部署dubbo管理控制台dubbo-admin
centos7上安装zookeeper
干扰-PDB
heketi无法移除掉故障节点的brick解决方法
Copyright © 2011-2022 走看看