- 博客(51)
- 资源 (6)
- 收藏
- 关注
转载 C# 写CSV文件字符串前面0不显示的解决办法
using System;using System.Collections.Generic;using System.IO;using System.Linq;using System.Text;using System.Threading.Tasks;namespace CsvTest{ class Program { static void Ma...
2018-07-27 10:12:42 2353
转载 MVC基架生成的 Details视图
@model MyMusicStore.Models.Album@{ ViewBag.Title = "Details";}<h2>Details</h2><div> <h4>Album</h4> <hr /> <dl class="dl-horizon
2018-07-25 23:03:56 258
转载 MVC基架生成的Edit视图
@model MyMusicStore.Models.Album@{ ViewBag.Title = "Edit";}<h2>Edit</h2>@using (Html.BeginForm()){ @Html.AntiForgeryToken() <div class="form-horizontal"> ...
2018-07-25 23:02:33 132
转载 MVC基架生成的Detele视图
@model MyMusicStore.Models.Album@{ ViewBag.Title = "Delete";}<h2>Delete</h2><h3>Are you sure you want to delete this?</h3><div> <h4>Album</
2018-07-25 23:00:08 113
转载 MVC基架生成的Create视图
@model MyMusicStore.Models.Album@{ ViewBag.Title = "Create";}<h2>Create</h2>@using (Html.BeginForm()) { @Html.AntiForgeryToken() <div class="form-horizontal"&g...
2018-07-25 22:56:26 343
转载 MVC基架生成的Index视图
@model IEnumerable<MyMusicStore.Models.Album>@{ ViewBag.Title = "Index";}<h2>Index</h2><p> @Html.ActionLink("Create New", "Create")</p>&
2018-07-25 22:54:21 224
转载 MVC 用基架创建Controller,通过数据库初始化器生成并播种数据库
1 创建MVC应用程序2 在Model里面创建实体类using System;using System.Collections.Generic;using System.Linq;using System.Web;namespace MyMusicStore.Models{ public class Album { public virtual ...
2018-07-25 22:32:10 491
转载 C# IDisposable接口的使用
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Data.SqlClient;using System.Data;namespace DisposeDemo{ class P...
2018-07-16 16:40:06 481
转载 c#中的GetUpperBound,GetLowerBound方法
今天使用数组的时候,用到了几个数组的属性,总结如下:Array的Rank 属性:语法:public int Rank { get; } 得到Array的秩(维数)。Array的GetUpperBound 方法:语法:public int GetUpperBound(int dimension) 用于获取 Array 的指定维度的上限。Array的GetLowerBound方法:语法:public ...
2018-07-16 15:49:27 2617
转载 在WPF应用程序中利用IEditableObject接口实现可撤销编辑的对象
Model:Employeeusing System.ComponentModel;namespace WpfApplicationBindingSample.Models{ /// <summary> /// 业务实体(Business Entity) /// </summary> class Employee : INotifyPr...
2018-07-16 14:49:38 352
转载 WPF LayoutTransform -改变布局
LayoutTransform会影响布局,让grid显示分割线时候,可以看出<Window x:Class="wpf180709.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx...
2018-07-11 13:03:01 1131
转载 WPF 代码实现动画
<Window x:Class="wpf180709.Window2" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window2" Hei...
2018-07-11 13:02:51 1141
转载 MVC HttpUtility.HtmlEncode是如何编码的
using System;using System.Collections.Generic;using System.IO;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Web;namespace HttpUtilityDemo{ class Program { ...
2018-07-11 13:02:42 866
转载 WPF RenderTransform的使用
呈现变形的元素并没有改变位置,只是呈现在不同的位置而已好处:为了效率,如果改变位置的话,需要重新测量,布局<Window x:Class="wpf180709.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.m...
2018-07-09 09:49:58 2344
转载 WPF 附加属性的使用
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows;namespace Wpf180706{ public class School:DependencyObject { ...
2018-07-09 09:46:10 1006
转载 WPF 用代码增加路由事件的方法
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows;using System.Windows.Controls;using System.Windows.Controls.Primitiv...
2018-07-09 09:46:00 393
转载 WPF CommandParameter的使用
<Window x:Class="Wpf180706.Window5" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window5" Hei...
2018-07-09 09:45:52 7154
转载 WPF 通过CommandBinding捕获命令
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows;using System.Windows.Controls;using System.Windows.Data;using System...
2018-07-09 09:45:43 1881
转载 WPF 使用Propereties:Resources.resx里面的资源
<Window x:Class="Wpf180706.Window7" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:prop="clr-nam...
2018-07-09 09:45:34 3029 1
转载 WPF 柱状图显示数据
<Window x:Class="Wpf180706.Window9" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window9" Hei...
2018-07-09 09:45:19 793
转载 WPF 寻找控件模板中的元素
<Window x:Class="Wpf180706.Window10" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window10" H...
2018-07-09 09:45:08 723
转载 WPF 寻找数据模板中的元素
<Window x:Class="Wpf180706.Window11" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-n...
2018-07-09 09:44:56 532
转载 WPF VisualTreeHelper的使用
<Window x:Class="MyWpf.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:c="clr-namespa...
2018-07-09 09:44:45 1202
转载 WPF依赖项属性不需要包装属性也可以工作
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows;namespace Wpf180706{ public class Student:DependencyObject { p...
2018-07-06 09:04:37 178
转载 WPF依赖属性对内存的使用方式
WPF允许对象在创建时候并不包含存储数据的空间,只保留在用到时获取数据默认值,借用其他对象数据或者实时分配空间的能力
2018-07-06 08:48:30 181
转载 WPF Binding Path妙用
<Window x:Class="XamlTest.Window9" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window9" Heig...
2018-07-06 08:37:59 1274 1
转载 WPF Binding Path妙用代码实现
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows;using System.Windows.Controls;using System.Windows.Data;using System...
2018-07-06 08:37:35 1816
转载 WPF Binding妙处-既无Path也无Source
<Window x:Class="XamlTest.Window12" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:sys="clr-name...
2018-07-06 08:37:26 904
转载 WPF ListView的使用
<Window x:Class="XamlTest.Window14" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window14" He...
2018-07-06 08:37:14 3341
转载 WPF RelativeSource的使用
<Window x:Class="XamlTest.Window15" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window15" He...
2018-07-06 08:36:38 493
原创 WPF ValidationRule的特点(默认目标-源才校验)
默认是当目标发生改变时候,通过绑定改变源时候进行校验,因为WPF认为源是安全的,如果想让源改变时候,也进行校验则设置验证规则的ValidatesOnTargetUpdated =trueusing System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Ta...
2018-07-06 08:36:04 495
转载 WPF 多路绑定
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows;using System.Windows.Controls;using System.Windows.Data;using System...
2018-07-06 08:35:22 656
转载 WPF SystemParameters的使用
SubWindow win = new SubWindow(); //win.Width = SystemParameters.WorkArea.Width; //win.Top = SystemParameters.FullPrimaryScreenHeight - win.Height; win.Top = Syste...
2018-07-06 08:34:44 1414
转载 WPF UpdateSourceTrigger的使用
<Window x:Class="XamlTest.Window8" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window8" Heig...
2018-07-05 14:15:39 683
转载 WPF Binding的代码实现
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows;using System.Windows.Controls;using System.Windows.Data;using System...
2018-07-05 14:02:21 2177
转载 WPF GridSplitter最好设置HorizontalAlignment和VerticalAlignment,否则不可以左右移动
<Window x:Class="XamlTest.Window5" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window5" Heig...
2018-07-05 13:30:44 2057
转载 WPF BorderBrush BorderThickness
基本上所有的控件都可以设置BorderBrush BorderThickness 例如TextBox,Button
2018-07-05 11:05:58 5372
转载 WPF 四种尺寸单位
像素 px 默认单位可以省略厘米cm英寸 in点 pt1in = 96px1cm=96/2.42px1pt=96/72px
2018-07-05 10:58:26 5523
转载 WPF ListBox的内容属性Items
<Window x:Class="XamlTest.Window3" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window3" Heig...
2018-07-05 10:55:12 2633
转载 WPF HeaderedContentControl两个内容属性 Header和Content
<Window x:Class="XamlTest.Window2" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window2" Heig...
2018-07-05 10:41:32 1463
ASP.NET MVC 5高级编程 第5版(中文版带书签)
2018-07-09
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人