摘要:
1.附加属性 附加属性是可用于多个控件但在另一个类中定义的属性。在WPF中,附加属性常用于控件布局。 每个控件都有各自的固有属性,当在容器中放置控件时,根据容器的类型控件会获得额外的特征(例如,如果在网格中放置一个文本框,需要选择文本框放在网格控件中的哪个单元格中)。使用附加属性设置这些附加的细节。
阅读全文
posted @ 2022-04-12 22:46
Bridgebug
阅读(223)
推荐(1)
摘要:
<Window x:Class="WpfApp1.Window1" Title="Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.
阅读全文
posted @ 2022-04-12 22:46
Bridgebug
阅读(165)
推荐(0)
摘要:
using System; using System.Collections.Generic; using System.ComponentModel; /// <summary> /// 提供支持数据绑定的泛型集合 /// </summary> /// <typeparam name="T"></
阅读全文
posted @ 2022-04-12 22:46
Bridgebug
阅读(271)
推荐(0)
摘要:
private void dataGridView1_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) { using (SolidBrush b = new SolidBrush(this.dataGridView1.
阅读全文
posted @ 2022-04-12 22:46
Bridgebug
阅读(748)
推荐(0)
摘要:
XAML能不能像HTML一样可以对元素应用多个样式呢???默认的情况下是不可以的,下面将讲述两种通过其他方法实现同时应用多个样式的例子。 1.BasedOn 通过继承相当于拥有两种样式。 <Window x:Class="WpfAppLearn2.MainWindow" xmlns="http://
阅读全文
posted @ 2022-04-12 22:46
Bridgebug
阅读(51)
推荐(0)
摘要:
占位符 格式化 结果 描述 string.Format("{0,4}", 0) 0 不满足指定位数的情况下,在前置插入空格 string.Format("{0,-4}", 0) 0 不满足指定位数的情况下,在后置插入空格 数字格式化 格式化 结果 格式符 描述 string.Format("{0:0
阅读全文
posted @ 2022-04-12 22:46
Bridgebug
阅读(244)
推荐(0)
摘要:
一、效果Gif 二、Mark块 public partial class Block : UserControl { public Block() { this.Size = new Size(60, 60); MinFontSize = 4; MaxFontSize = 40; } /// <su
阅读全文
posted @ 2022-04-12 22:46
Bridgebug
阅读(348)
推荐(0)
摘要:
一、窗体 绿色边框框住的区域:屏幕橙色边框框住的区域:窗体黄色边框框住的区域:窗体工作区 1.边框 窗体的FormBorderStyle可以设置以下的值,每个值导致窗体的边框的宽度不一样,但是可以发现的是左、右、下边框的宽度是一样的: // // 摘要: // 指定窗体的边框样式。 [ComVisi
阅读全文
posted @ 2022-04-12 22:46
Bridgebug
阅读(2401)
推荐(2)
摘要:
using System; using System.ComponentModel; using System.Drawing; using System.Runtime.InteropServices; using System.Windows.Forms; namespace WindowsFo
阅读全文
posted @ 2022-04-12 22:46
Bridgebug
阅读(465)
推荐(0)
摘要:
一、数据模型 Database First (数据库优先):先创建数据库表,然后自动生成EDM文件,EDM文件生成模型类 Model First (模型优先):先创建Edm文件,Edm文件自动生成模型类和数据库;Code First(代码优先):自己写模型类,然后生成数据库,没有EDM。 这里我们现
阅读全文
posted @ 2022-04-12 22:46
Bridgebug
阅读(132)
推荐(0)
摘要:
using System; using System.Collections.Generic; using System.Diagnostics; using System.Drawing; using Spire.Pdf; using Spire.Pdf.AutomaticFields; usin
阅读全文
posted @ 2022-04-12 22:46
Bridgebug
阅读(694)
推荐(0)
摘要:
using System; using System.ComponentModel; using System.Reflection; namespace PropertyGridUse { public class PropertyAttribute<T> { /// <summary> ///
阅读全文
posted @ 2022-04-12 22:46
Bridgebug
阅读(659)
推荐(0)
摘要:
1、效果图 2、导入导出 using System; using System.Collections.Generic; using System.IO; using System.Reflection; using System.Text; using System.Windows.Forms;
阅读全文
posted @ 2022-04-12 22:46
Bridgebug
阅读(1462)
推荐(0)
摘要:
一、比特币 比特币(Bitcoin)的概念最初由中本聪在2008年11月1日提出,并于2009年1月3日正式诞生 。根据中本聪的思路设计发布的开源软件以及建构其上的P2P网络。比特币是一种P2P形式的虚拟的加密数字货币。点对点的传输意味着一个去中心化的支付系统。 与所有的货币不同,比特币不依靠特定货
阅读全文
posted @ 2022-04-12 22:46
Bridgebug
阅读(733)
推荐(0)
摘要:
摘要: C#中的自定义控件中的属性(Property)、事件(Event)及一些相关特性(Attribute)的总结 今天学习了下C#用户控件开发添加自定义属性的事件,主要参考了MSDN,总结并实验了一些用于开发自定义属性和事件的特性(Attribute)。 在这里先说一下我的环境: 操作系统:Wi
阅读全文
posted @ 2022-04-12 22:46
Bridgebug
阅读(1470)
推荐(0)
摘要:
exec('select * from [Table] where [Name]= ''GG'''); 注意:这里GG是以两个单引号括起来的,不是双引号
阅读全文
posted @ 2022-04-12 22:46
Bridgebug
阅读(230)
推荐(0)
摘要:
一、抽象(abstract) 只有类(class)才可以抽象,结构体(struct)不能 ,抽象类不能实例化 class Program { abstract class People { } static void Main(string[] args) { People people = new
阅读全文
posted @ 2022-04-12 22:46
Bridgebug
阅读(266)
推荐(0)