摘要: 这需要 修改 计算机 默认 visual studio shell 版本 注册表 HKEY_CLASSES_ROOT VisualStudio.DTE 配置节点 描述的是 默认的 visual studio shell 版本 修改 CLSID CurVer 为要使用的 visual studio s 阅读全文
posted @ 2018-05-03 11:11 ﹎蓝言觅ぷ雨 阅读(266) 评论(0) 推荐(0) 编辑
摘要: 艾尼路 出的效果图 本人嵌套WPF ScrollViewer(滚动条) 自定义样式表制作 图文并茂 WPF ScrollViewer(滚动条) 自定义样式表制作 (改良+美化)源代码 阅读全文
posted @ 2013-08-07 10:27 ﹎蓝言觅ぷ雨 阅读(3190) 评论(4) 推荐(0) 编辑
摘要: 注释直接写在代码里了 不太理解意思的 可以先去看看我上一篇 WPF ScrollViewer(滚动条) 自定义样式表制作 图文并茂滚动条因为要在触摸屏上用 所以我设计的很宽 宽度可以自己改 把宽度变量单独拿出来了先上效果图还没滚动已滚动区域滚动到底部内容够显示,不需要滚动条的时候<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:sy 阅读全文
posted @ 2013-05-20 14:17 ﹎蓝言觅ぷ雨 阅读(12641) 评论(1) 推荐(0) 编辑
摘要: 先上效果图正常样式拖动时样式好下面 开始吧=================================================================打开blend 新建个 WPF应用程序工程 点击左上角 文件 → 新建项目项目类型WPF→右侧选WPF应用程序→项目名称你随便起一个用输入的ScrollViewerStyle→点确定,一个空的项目工程就建好了建好工程后,blend会自动打开MainWindow窗体(以下简称画布),我们在这编辑就可以了先在窗体上创建一个ScrollViewer,步骤:打开资产面板→控件→鼠标左键点下ScrollViewer,然后鼠标指针图标会 阅读全文
posted @ 2013-04-01 15:37 ﹎蓝言觅ぷ雨 阅读(28595) 评论(4) 推荐(2) 编辑
摘要: 粗略的在代码上做了些注释blend 生成出来的模版 有的时候 会生成 跟 vs ui界面不兼容的代码 会导致可视化设计界面 报错崩溃掉 但是确不影响 程序的编译运行这个样式表 在vs 里会提示动画不兼容 Foreground属性 报错先上图看下样式下面是代码View Code 1 <Window x:Class="CalendarStyleWpfApplication.MainWindow" 2 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 3 xmlns:x=& 阅读全文
posted @ 2013-03-07 17:35 ﹎蓝言觅ぷ雨 阅读(12017) 评论(10) 推荐(4) 编辑
摘要: public List<T> GetChildObjects<T>(DependencyObject obj, string name) where T : FrameworkElement { DependencyObject child = null; List<T> childList = new List<T>(); for (int i = 0; i <= VisualTreeHelper.GetChildrenCount(obj) - 1; i++) { ... 阅读全文
posted @ 2012-11-22 14:07 ﹎蓝言觅ぷ雨 阅读(1434) 评论(0) 推荐(0) 编辑
摘要: btnOK.Click += delegate{ MessageBox.Show("OK"); };btnOK.Click += (sender, e) => { MessageBox.Show("OK"); }; 阅读全文
posted @ 2012-11-16 10:23 ﹎蓝言觅ぷ雨 阅读(2299) 评论(0) 推荐(2) 编辑
摘要: http://social.msdn.microsoft.com/Forums/zh-SG/wpfzhchs/thread/e5c87129-966a-4d51-a934-ccb8fc7620ec比如 canvas里面有一个RichTextBox1 ,我现在要New一个新RichTextBox2 ,将RichTextBox1 的内容事件复制到RichTextBox2,俩个可以共存在canvas;有没有简单点类似Winform的克隆呢!string xaml =System.Windows.Markup.XamlWriter.Save(rtb1); RichTextBox rtb2 =Syste 阅读全文
posted @ 2012-11-12 11:50 ﹎蓝言觅ぷ雨 阅读(2074) 评论(0) 推荐(1) 编辑
摘要: 描述:用户多次快速开启WPF程序的时候 只运行起来 一个 程序(exe) 其他多开的 进程 自动关闭掉App.xaml.cs文件 1 protected override void OnStartup(StartupEventArgs e) 2 { 3 //当前运行WPF程序的进程实例 4 Process process = Process.GetCurrentProcess(); 5 //遍历WPF程序的同名进程组 6 foreach (Process p in P... 阅读全文
posted @ 2012-10-23 10:54 ﹎蓝言觅ぷ雨 阅读(5125) 评论(3) 推荐(0) 编辑
摘要: 没用控制台写,用WPF写的例子using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Windows;using System.Windows.Controls;using System.Windows.Data;using System.Windows.Documents;using System.Windows.Input;using System.Windows.Media;using System.Windows.Media.Imaging;using 阅读全文
posted @ 2012-07-17 15:38 ﹎蓝言觅ぷ雨 阅读(1228) 评论(1) 推荐(1) 编辑