wpf做的可扩展记事本
摘要:记得有个winform利用反射做的可扩展笔记本,闲来无事,便用wpf也搞了个可扩展记事本,可用接口动态扩展功能,较简单,以便参考:目录结构如下:MainWindow.xaml为主功能界面,FunctionExpand提供扩展接口;主要功能代码如下: private void MakeFun()...
阅读全文
posted @
2014-11-15 13:48
闪闪的幸运星
阅读(1138)
推荐(1)
vs2012用wpf制作透明窗口中报错的解决方案
摘要:在开发wpf项目时,需要调用外部com组件,同时需要制作透明窗口,于是问题出现了,当我们在设置AllowsTransparency="True"后,com组件显示不出来了,只有透明属性为false才能正常显示,此时找到了http://blog.csdn.net/detecyang/article/details/7946237这篇博客,他提供了很好的解决方案,当我使用后问题出现了,他提供的类在vs2008的.net3.5环境运行一切正常,但放到vs2012我的开发环境中,运行就会报错,提示“原托管的 PInvoke 签名与非托管的目标签名不匹配。请检查 PInvoke 签名
阅读全文
posted @
2014-01-20 14:26
闪闪的幸运星
阅读(952)
推荐(1)
图片切换特过渡效果
摘要:由于经常看到各种图片切换效果,感觉用到的地方挺多,整理一下,还是很有必要的,以便于以后查阅,程序主要使用Transitionals.dll来实现切换效果的,效果如下:xaml前台代码:<Window x:Class="SwitchPicture.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"<!--定义了切换
阅读全文
posted @
2013-05-14 14:17
闪闪的幸运星
阅读(1588)
推荐(0)
点击按钮触发声音(xaml实现)
摘要:当点击按钮时,播放按钮声音,xaml代码如下: <Button Content="播放声音" > <Button.Triggers> <EventTrigger RoutedEvent="Button.Click"> <EventTrigger.Actions> <SoundPlayerAction Source="dl.wav"></SoundPlayerAction> </EventTrigger.Actions> ...
阅读全文
posted @
2013-05-13 17:16
闪闪的幸运星
阅读(611)
推荐(0)
自定义的可拖动窗体
摘要:在学习wpf过程中用过的Demo,背景透明,可以拖动,效果如下:组成部分:path对象绘制边框,label下的字符串,自定义按钮控件xaml代码:<Window x:Class="CustomWindow.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" He
阅读全文
posted @
2013-05-13 15:08
闪闪的幸运星
阅读(436)
推荐(0)
定时器写的闪光字
摘要:曾经研究wpf时写的闪光字,翻了出来,没太多技术含量,直接贴代码吧:xaml文件:<Window x:Class="Sparkling.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="52
阅读全文
posted @
2013-05-13 13:22
闪闪的幸运星
阅读(388)
推荐(0)