摘要:
Each "View" is an independent XAML file. I'd like to be able to set up the triggers in those files, looking at the ListBoxItem's IsSelected property, in order to control the visibility of the various controls within.The template to override the ListBoxItem... 阅读全文
posted @ 2013-09-12 18:47
幕三少
阅读(1908)
评论(0)
推荐(1)
摘要:
简介BackgroundWorker是.net里用来执行多线程任务的控件,它允许编程者在一个单独的线程上执行一些操作。耗时的操作(如下载和数据库事务)在长时间运行时可能会导致用户界面 (UI) 始终处于停止响应状态。如果您需要能进行响应的用户界面,而且面临与这类操作相关的长时间延迟,则可以使用BackgroundWorker类方便地解决问题。该控件有三个事件:DoWork 、ProgressChanged 和 RunWorkerCompleted在程序中调用RunWorkerAsync方法则会启动DoWork事件的事件处理,当在事件处理过程中,调用 ReportProgress方法则会启动Pr 阅读全文
posted @ 2013-09-12 18:41
幕三少
阅读(1114)
评论(0)
推荐(0)
摘要:
这段时间我们小组要给部门的Annual Meeting準备一个WPF的抽奖程序,为了增加程序的有趣性,我们在程序中需要播放背景音乐等。由於对之前从未使用过WPF,所以对其中的声音等媒体文件播放不是很清楚,对一些简单的问题也花了相对较长的时间去解决,现在将其总结在下麵,以供大家参考。1,使用SoundPlayer类SoundPlayer类位於System.Media命名空间下,它只能播放.wav格式的声音文件。其使用方法简单如下:[C#]view plaincopyusing(SoundPlayerplayer=newSoundPlayer()){stringlocation=System.En 阅读全文
posted @ 2013-09-12 13:01
幕三少
阅读(2424)
评论(0)
推荐(0)
浙公网安备 33010602011771号