摘要:wpf 使用Font Awesome图标字体 1、http://fontawesome.io/ 中下载Font Awesome字体 然后把字体文件fontawesome webfont.ttf 拷贝到项目中 build action 设置为Resource 并设置“复制到输出目录”为“如果较新则复制
阅读全文
摘要:wpf界面 c#代码public class ConvertTextToImage : IValueConverter{ #region IValue...
阅读全文
摘要:项目编译 --目标平台 选择 .Net Framwork 4在win7 x86平台下出现错误问题签名: 问题事件名称: CLR20r3 问题签名 01: labormodel.manager.exe 问题签名 02: 1.0.0.0 问题签名 03: 513059fc 问题签名 04: Smith....
阅读全文
摘要:xaml页 可以在行号的列头 上加 序号<DataGrid x:Name="dataGrid" AutoGenerateColumns="False" FontSize="14" RowHeaderWidth="40"SelectionMode="Single" CanUserAddRows="False" ItemsSource="{Binding}" LoadingRow="dataGridBook_LoadingRow"&g
阅读全文
摘要:imgBook 是一个Image控件,在后台代码中我想给它指定Source的属性。我先如下方式进行:Uri uri = new Uri(strImagePath, UriKind.RelativeOrAbsolute);imgBook.Source = new BitmapImage(uri);strImagePath是图片的绝对路径。在另一处代码中我想把strImagePath指定的图片删掉,操作如下:if (System.IO.File.Exists(strImagePath)) { System.IO.File.Dele...
阅读全文
摘要:WPF程序只运行一个实例; 下面的代码还 尝试,如果窗体最小化的时候,让窗体还原 public partial class App : Application { private static Semaphore singleInstanceWatcher; private static bool createdNew; static App() ...
阅读全文
摘要:使用log4net在vs2010的wpf Application 提示错误 The type or namespace name 'log4net' could not be found (are you missing a using directive or an assembly reference?) 解决方法 项目属性 目标 平台 使用 “.Net Framework 4” 即解决这个...
阅读全文
摘要:可能是bin目录下缺少相应的dll文件 我的wpf程序出错就是因为这个原因,我把dll文件拷贝到bin目录下,即解决这个问题
阅读全文
摘要:Xaml文件 <ScrollViewer x:Name="AutoScrollViewer" KeyUp="AutoScrollViewer_KeyUp"></ScrollViewer>c#代码 使用方法 //Scroll page vertically when focus changes to a control that is outside the viewable area.privat...
阅读全文
摘要:public DocumentWindow() { InitializeComponent(); this.SourceInitialized += new EventHandler(OnSourceInitialized); } void OnSourceInitialized(object sender, EventArgs e) { HwndSource source = (HwndSour...
阅读全文
摘要:在WebBrowser控件中显示flash代码如下: 显示行号 复制代码 ? 这是一段程序代码。 如果编译时 目标平台 选择 anyCpu 则不能正常显示flash,出现一个错误框,选择 x86 则可以正常显示flash。在WebBorwser控件中 禁止声音的写法如下显示行号 复制代码 ? 这是一段程序代码。 如果目标平台选择 anyCpu 则提示错误,选择 x86 一切正常在目前使用WebB...
阅读全文