daixinet

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

随笔分类 -  .net之WPF

WPF页面开发点滴
摘要:今天做主题时,需要访问外部的xaml文件,方法:using (FileStream s = new FileStream("C:\\Control.xaml", FileMode.Open)) { ResourceDictionary rd = System.Windows.Markup.XamlReader.Load(s) as ResourceDictionary; this.Resources.MergedDictionaries.Clear(); this.Resources... 阅读全文
posted @ 2012-07-31 11:08 daixinet.com 阅读(541) 评论(0) 推荐(0)

摘要:AppDomain.CurrentDomain.BaseDirectory 阅读全文
posted @ 2012-07-30 16:50 daixinet.com 阅读(1218) 评论(0) 推荐(0)

摘要:WPF中没有直接提供播放Flash的控件。可以使用WebBrowser来打开,代码如下:<Window x:Class="Nankang.Itacati.CapiWpfDebug.UI.FlashWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="FlashWindow" Height=&qu 阅读全文
posted @ 2012-07-20 16:53 daixinet.com 阅读(2201) 评论(0) 推荐(0)

摘要:根据设置,倒计时,语音提示Download 阅读全文
posted @ 2012-07-19 23:18 daixinet.com 阅读(1626) 评论(0) 推荐(0)

摘要:ToggleButton m_ToggleButton = this.Template.FindName("HeaderSite", this) as ToggleButton; 阅读全文
posted @ 2012-06-29 11:03 daixinet.com 阅读(1617) 评论(0) 推荐(0)

摘要:1、思路:1、用DirectX参考:http://www.cnblogs.com/tssing/archive/2009/02/05/1384699.htmlhttp://www.cnblogs.com/stg609/archive/2008/10/24/1318931.html但是运行之后,程序出现假死状态2、修改配置文件<configuration><startup useLegacyV2RuntimeActivationPolicy="true"> <supportedRuntime version="v4.0" sk 阅读全文
posted @ 2012-06-18 16:01 daixinet.com 阅读(1607) 评论(0) 推荐(0)

摘要:在用VideoCaptureElement的过程中,不知道怎么获得摄像头的截图,纠结了整整一天,最终在下面的网站上找到了答案,哈哈。(困的都不清醒的大脑,让我耐下心来看英文,上天还是很优待我的)例子截图:XAML:<Window x:Class="Fish.AccountBook.View.Test.CameraWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/win 阅读全文
posted @ 2012-06-16 23:03 daixinet.com 阅读(7004) 评论(7) 推荐(0)

摘要:截图:Source:下载截取视频的帧:http://topic.csdn.net/u/20111222/15/57c13793-cfaf-4e2e-8f74-fe76bab78e90.html 阅读全文
posted @ 2012-06-16 20:42 daixinet.com 阅读(421) 评论(0) 推荐(0)

摘要:http://msdn.microsoft.com/en-us/library/ms747245.aspx代码表示:http://hi.baidu.com/tongcolin/blog/item/4ff122a9837aa9064b36d6ca.html 阅读全文
posted @ 2012-06-15 23:31 daixinet.com 阅读(222) 评论(0) 推荐(0)

摘要:http://download.csdn.net/download/zl306913659/3927663 阅读全文
posted @ 2012-06-12 12:25 daixinet.com 阅读(152) 评论(0) 推荐(0)

摘要:经验丰富者,确实NB 阅读全文
posted @ 2012-06-08 16:08 daixinet.com 阅读(213) 评论(0) 推荐(0)

摘要:1、弹出子窗口,并有回弹效果,而且子窗口是半透明效果2、自定义滚动条Source参考1:http://stackoverflow.com/questions/2225654/silverlight-childwindow-for-wpf参考2:http://www.cnblogs.com/shiyue/archive/2011/04/07/2007830.html 阅读全文
posted @ 2012-06-07 17:19 daixinet.com 阅读(2484) 评论(0) 推荐(1)

摘要:<UserControl.Resources> <Storyboard x:Key="testStoryboard"> <DoubleAnimation From="0" To="1" Duration="0:0:1" Storyboard.TargetName="m_ScrollViewer" Storyboard.TargetProperty="Opacity" /> </Storyboard> </UserContr 阅读全文
posted @ 2012-06-06 09:14 daixinet.com 阅读(2355) 评论(0) 推荐(1)

摘要:<Window x:Class="Fish.AccountBook.View.Test.PanelWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="PanelWindow" Height="300" Width="500"> <Grid&g 阅读全文
posted @ 2012-06-05 00:17 daixinet.com 阅读(1352) 评论(0) 推荐(0)

摘要:WPF 切换主题 string packUri = String.Format(@"/WpfControlLibrary1;component/Dictionary1.xaml"); ResourceDictionary rd = Application.LoadComponent(new Uri(packUri, UriKind.Relative)) as ResourceDictionary; this.Resources.MergedDictionaries.Clear(); this.Resourc... 阅读全文
posted @ 2012-05-28 14:25 daixinet.com 阅读(714) 评论(0) 推荐(0)

摘要:这一段时间一直在吃老本。没怎么学习,所以就没有进步。 昨天项目经理让我想想怎么做界面,其实我没有过多的想,就想了一下用DevExpress的做法。今天他把握叫过去,跟我探讨了一下做法:1、用Windows自带的控件,不过效果不好看;2、用DevExpress,不是太熟悉,所以效果也一般;3、用一套自定义控件,不太好好;4、用WPF做,界面效果好。 最终让我用WPF做,我也正好熟悉一下WPF的做法。 做为一个项目经理,接触面要广,思路要开阔。 阅读全文
posted @ 2012-05-24 22:06 daixinet.com 阅读(296) 评论(0) 推荐(0)

摘要:1、默认控件模板 Generic.xaml 一定要放在文件夹themes中,要不然找不到;一个小例子:下载 阅读全文
posted @ 2012-03-13 16:51 daixinet.com 阅读(187) 评论(0) 推荐(0)

摘要:这一段研究一下WF4,一个小小的问题就让我纠结半天,做一个问题汇总:1、There is no context attached to the incoming message for the service and the current operation is not marked with "CanCreateInstance = true".对于这个问题,出现的原因是,新添加的 WCF Workflow Service上的Receive活动的CanCreateInstance属性没有勾选,勾选上就OK了。如下图: 阅读全文
posted @ 2012-03-01 14:51 daixinet.com 阅读(195) 评论(0) 推荐(0)

摘要:Workflow4发布时,出现此问题,修改配置文件即可。其中 serviceDebug includeExceptionDetailInFaults="false",默认值为false,把false改为true即可。详细的配置文件:<?xml version="1.0" encoding="utf-8" ?><configuration> <system.web> <compilation debug="true" targetFramework="4.0&quo 阅读全文
posted @ 2012-02-28 15:32 daixinet.com 阅读(4099) 评论(0) 推荐(0)

摘要:用WPF的ComboBox控件的时候,需要用到TextChanged属性,但是这个属性属于TextBox控件,不用担心,ComboBox中存在TextBox,所以关键问题就是如何找到ComboBox中的TextBox控件。 ComboBox控件的默认组成:第一层(1个控件):System.Windows.Controls.Grid第二层(2个控件):System.Windows.Controls.Primitives.Popup;Microsoft.Windows.Themes.ListBoxChrome;System.Windows.Controls.TextBox;System.Wind. 阅读全文
posted @ 2012-02-23 17:55 daixinet.com 阅读(2172) 评论(0) 推荐(1)