WPF
文章平均质量分 60
干城
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
WPF窗体事件响应
/*记录我学习事件的过程*/原创 2014-06-01 14:10:58 · 3198 阅读 · 0 评论 -
"尝试读取或写入受保护的内存。这通常指示其他内存已损坏。"
C#下利用ffmpeg频繁解码,导致 System.AccessViolationException ,且无法捕捉而使软件经常崩溃。ffmpeg的原理无法了解,不过现有二法捕捉此异常:法一:添加HandleProcessCorruptedStateExceptionsAttribute[HandleProcessCorruptedStateExceptions]void DoSo原创 2017-02-15 16:21:18 · 8362 阅读 · 0 评论 -
listbox动态选择模版
献上效果图:预期效果 1)Listbox动态选择模版2)鼠标移上去后显示操作按钮模版实现(FButton请参考 Fbutton模版)1.加号模版 <Border x:Name="Border" BorderThickness="0" CornerRadius="5原创 2016-10-08 15:32:04 · 1704 阅读 · 0 评论 -
listboxItem 动态选择模版
<Border BorderBrush="Red" BorderThickness="3"> <Border BorderBrush="Yellow" BorderThickness="3"> <Style x:Key="MyListBoxI原创 2016-10-08 15:20:09 · 1850 阅读 · 0 评论 -
DataGrid模版(分组效果)
样式效果图其中,矢量字体图标(FIcon之类)请参考wpf使用矢量图标1.DataGrid总体样式原创 2016-10-27 18:51:43 · 9714 阅读 · 5 评论 -
wpf textblock 接收enter事件 并绑定command
<TextBox Text="{Binding FieldThatIAmBindingToo, UpdateSourceTrigger=PropertyChanged}"> <TextBox.InputBindings> <KeyBinding Command="{Binding AddCommand}" Key="Return" /...原创 2016-10-21 17:28:47 · 4785 阅读 · 0 评论 -
DataGridTemplateColumn 绑定可见属性
解决方案注:原理为 DataGridTemplateColumn不在visual tree上, 所以也无法继承DataContext 所以这里将DataContext移植到另一个类上,然后此类作为资源被DataGridTemplateColumn引用原创 2016-10-13 16:49:49 · 4081 阅读 · 0 评论 -
MSDN控件样式和模版
MSDN控件模版原创 2016-08-26 15:34:36 · 720 阅读 · 0 评论 -
使用GeometryDrawing改造button显示的内容
先来看下效果1.首先编辑button的style,使其应用GeometryDrawing来显示“图片”效果 <Border x:Name="Bd"原创 2016-06-01 16:06:48 · 2203 阅读 · 0 评论 -
WPF GridControl DragElementTemplate
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525" xmlns:d原创 2015-05-21 17:05:49 · 1056 阅读 · 0 评论 -
WPF TreeView选择一项时,其他同级项折叠
1。TreeView的静态扩展类(借鉴http://www.cnblogs.com/sayo/archive/2008/07/23/1249804.html) public static class ExtensionMethods { public static void CollapseOtherItems(this System.Windows.Control原创 2015-05-11 13:42:25 · 1481 阅读 · 0 评论 -
Button改变样式
1.效果图默认效果鼠标移上去点击 2.样式 <!-- <Microsoft_Windows_Themes:ButtonChrome x:Name="Chrome" BorderBrush="{TemplateBinding原创 2015-07-09 14:57:48 · 1394 阅读 · 0 评论 -
在使用 ItemsSource 之前,项集合必须为空
写好了一个简单的原创 2014-06-05 12:33:26 · 18594 阅读 · 3 评论 -
Pack Url路径正确,Cannot locate resource image
在xaml设计时,传入的路径正确,运行时却找不到资源解决方案:将“MyPic.Png”属性页,“生成操作”改为“Resource”In the solution explore, set the image "Build Action" property to"Resource" ,then clean the solution and rebuild it.原创 2018-01-24 18:57:41 · 1069 阅读 · 0 评论
分享