惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
Docker
G
Google Developers Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
GbyAI
GbyAI
V
Vulnerabilities – Threatpost
Hugging Face - Blog
Hugging Face - Blog
I
Intezer
S
Securelist
Forbes - Security
Forbes - Security
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Jina AI
Jina AI
Y
Y Combinator Blog
N
News | PayPal Newsroom
S
Schneier on Security
O
OpenAI News
T
The Blog of Author Tim Ferriss
V
Visual Studio Blog
Simon Willison's Weblog
Simon Willison's Weblog
Martin Fowler
Martin Fowler
人人都是产品经理
人人都是产品经理
雷峰网
雷峰网
NISL@THU
NISL@THU
阮一峰的网络日志
阮一峰的网络日志
WordPress大学
WordPress大学
N
News and Events Feed by Topic
Microsoft Azure Blog
Microsoft Azure Blog
P
Proofpoint News Feed
The Cloudflare Blog
Last Week in AI
Last Week in AI
博客园 - 司徒正美
L
LangChain Blog
C
CERT Recently Published Vulnerability Notes
L
LINUX DO - 热门话题
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
aimingoo的专栏
aimingoo的专栏
Apple Machine Learning Research
Apple Machine Learning Research
Recent Commits to openclaw:main
Recent Commits to openclaw:main
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
The Hacker News
The Hacker News
博客园 - Franky
Attack and Defense Labs
Attack and Defense Labs
Security Latest
Security Latest
T
Tailwind CSS Blog
博客园_首页
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Microsoft Security Blog
Microsoft Security Blog
V2EX - 技术
V2EX - 技术
腾讯CDC
V
V2EX

博客园 - 取经路上

IIS 下发布SignalR 访问接口进不去处理 Linux下部署.Net 应用程序和Web应用程序 CentOS 7 配置启动 手动编译的 nginx CentOS 7 nginx 安装 sticky模块 关于SignalR并发量测试 C# 调用迅雷aplayer播放器的遇到的问题总结 C# 采用HttpWebRequest 、WebClient和HttpClient下载https的文件异常问题 C# 判别系统版本以及Win10的识别办法 MVC ActionResult 视图模型 MVC 前后台传值 MVC基础关键点 sqlserver 数据库、日志文件收缩 vue-cli启动报错问题: IE6无法获取class属性 windows server 2008 r2 datacenter 共享服务找不到网络路径解决办法 在Visual Studio 中的监视窗口中监视Com对象变量 删除GitHub上项目中的某个文件 转 WPF MVVM 循序渐进 (从基础到高级) 服务器未能识别 HTTP 头 SOAPAction 的值: http://tempuri.org/QueryUserName。
笔记
取经路上 · 2021-05-09 · via 博客园 - 取经路上
1.故事板的时间定义,之前一直没看懂 表示为时分秒
<DoubleAnimation 
                Storyboard.TargetName="MyRectangle"
                Storyboard.TargetProperty="Width"
                From="100" To="200" Duration="0:0:1" />

Duration="0:0:1"  表示 时:分:秒
2.路径说明
<Path Data="M0 0 12 12M0 12 12 0" Stroke="White" StrokeThickness="1" VerticalAlignment="Center" HorizontalAlignment="Center">

Data 中M 为move 即移动到(0,0) 画线到(12,12) 在移动到(0,12) 画线(12,0) ,中间M为移动到,如果没有的话  会直接画线
以上为画一个X 
3.代码片段
vs->工具->代码片段管理器 打开后
切换语言为Cshape,复制位置的路径,在资源管理器中打开。
创建代码片段即可。
本例:复制一个propfull  改名为propn 
打开propn  修改文件里面的propfull->probn
<Title>propn</Title>
<Shortcut>propn</Shortcut>
public $type$ $property$
    {
        get { return $field$;}
        set { $field$ = value;this.DoNotify();}
    }
    $end$]]>
4.增加(CallerMemberNameAttribute/CallerFilePathAttribute/CallerLineNumberAttribute)这3个特性

这3个特性是.net 4.5中新增的,如果要在低版本中使用,需要增加,类
namespace System.Runtime.CompilerServices
{
    [AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
    public class CallerMemberNameAttribute : Attribute
    {

    }

    [AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
    public class CallerFilePathAttribute : Attribute
    {

    }

    [AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
    public class CallerLineNumberAttribute : Attribute
    {

    }
}

在通知属性接口基类中,增加特性限定,可以自动识别属性名称,减少复制代码后忘记修改报错的尴尬。

 public class NotifyBase : INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;
        public void DoNotify([CallerMemberName] string propName="")
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propName));
        }
    }

    public class UserInfo:NotifyBase
    {
        private int age;

        public int Age
        {
            get { return age; }
            set { age = value; this.DoNotify(); }
        }
        private string name;

        public string Name
        {
            get { return name; }
            set { name = value; this.DoNotify(); }
        }

    }