資源簡介
WPF中的Html編輯器,源代碼,資源來源于網絡,特此共享

代碼片段和文件信息
using?System;
namespace?Smith.WPF.HtmlEditor
{
????///?
????///?提供?System.Drawing.Color?和?System.Windows.Media.Color?之間的轉換方法。
????///?To?provide?methods?to?handle?convertion?between?System.Drawing.Color?and?System.Windows.Media.Color.
????///?
????internal?static?class?ColorExtension
????{
????????///?
????????///?將?System.Drawing.Color?轉換到?System.Windows.Media.Color。
????????///?Convert?System.Drawing.Color?to?System.Windows.Media.Color.
????????///?
????????public?static?System.Windows.Media.Color?ColorConvert(this?System.Drawing.Color?color)
????????{
????????????return?System.Windows.Media.Color.FromArgb(color.A?color.R?color.G?color.B);
????????}
????????///?
????????///?將?System.Windows.Media.Color?轉換到?System.Drawing.Color。
????????///?Convert?System.Windows.Media.Color?to?System.Drawing.Color.
????????///?
????????public?static?System.Drawing.Color?ColorConvert(this?System.Windows.Media.Color?color)
????????{
????????????return?System.Drawing.Color.FromArgb(color.A?color.R?color.G?color.B);
????????}
????????///?
????????///?判斷?System.Drawing.Color?和?System.Windows.Media.Color?是否表示相同的顏色。
????????///?
????????public?static?bool?ColorEqual(this?System.Drawing.Color?drawingColor?System.Windows.Media.Color?mediaColor)
????????{
????????????return?(drawingColor.A?==?mediaColor.A?&&
????????????????????drawingColor.R?==?mediaColor.R?&&
????????????????????drawingColor.G?==?mediaColor.G?&&
????????????????????drawingColor.B?==?mediaColor.B);
????????}
????????///?
????????///?判斷?System.Windows.Media.Color?和?System.Drawing.Color?是否表示相同的顏色。
????????///?
????????public?static?bool?ColorEqual(this?System.Windows.Media.Color?mediaColor?System.Drawing.Color?drawingColor)
????????{
????????????return?(drawingColor.A?==?mediaColor.A?&&
????????????????????drawingColor.R?==?mediaColor.R?&&
????????????????????drawingColor.G?==?mediaColor.G?&&
????????????????????drawingColor.B?==?mediaColor.B);
????????}
????????///?
????????///?將表達式轉換到?System.Windows.Media.Color。
????????///?Convert?an?expression?to?System.Windows.Media.Color.
????????///?
????????public?static?System.Windows.Media.Color?ConvertToColor(string?value)
????????{
????????????return?(System.Windows.Media.Color)System.Windows.Media.ColorConverter.ConvertFromString(value);
????????????//int?r?=?0?g?=?0?b?=?0;
????????????//if?(value.StartsWith(“#“))
????????????//{
????????????//????int?v?=?Convert.ToInt32(value.Substring(1)?16);
????????????//????r?=?(v?>>?16)?&?255;?g?=?(v?>>?8)?&?255;?b?=?v?&?255;
????????????//}
????????????//return?System.Windows.Media.Color.FromRgb(Convert.ToByte(r)?Convert.ToByte(g)?Convert.ToByte(b));
????????}
????????public?static?readonly?System.Windows.Media.Color?DefaultBackColor?=?System.Windows.SystemColors.WindowColor;
????????public?static?readonly?System.Windows
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2014-04-21?16:56??SmithHtmlEditor\
?????目錄???????????0??2014-04-21?16:57??SmithHtmlEditor\SmithHtmlEditor\
?????目錄???????????0??2014-04-21?16:57??SmithHtmlEditor\SmithHtmlEditor.Demo\
?????文件?????????315??2010-10-16?13:59??SmithHtmlEditor\SmithHtmlEditor.Demo\App.xaml
?????文件?????????994??2010-10-18?23:03??SmithHtmlEditor\SmithHtmlEditor.Demo\App.xaml.cs
?????目錄???????????0??2011-04-14?21:28??SmithHtmlEditor\SmithHtmlEditor.Demo\bin\
?????文件????????1044??2011-05-02?00:54??SmithHtmlEditor\SmithHtmlEditor.Demo\BindingTestWindow.xaml
?????文件?????????627??2011-05-02?00:47??SmithHtmlEditor\SmithHtmlEditor.Demo\BindingTestWindow.xaml.cs
?????目錄???????????0??2011-05-02?00:45??SmithHtmlEditor\SmithHtmlEditor.Demo\bin\Debug\
?????目錄???????????0??2011-05-02?00:45??SmithHtmlEditor\SmithHtmlEditor.Demo\bin\Debug\en-US\
?????文件????????7168??2014-04-21?16:57??SmithHtmlEditor\SmithHtmlEditor.Demo\bin\Debug\en-US\Smith.WPF.HtmlEditor.resources.dll
?????文件???????15360??2014-04-21?16:57??SmithHtmlEditor\SmithHtmlEditor.Demo\bin\Debug\Smith.WPF.HtmlEditor.Demo.exe
?????文件???????38400??2014-04-21?16:57??SmithHtmlEditor\SmithHtmlEditor.Demo\bin\Debug\Smith.WPF.HtmlEditor.Demo.pdb
?????文件???????22704??2014-04-22?11:28??SmithHtmlEditor\SmithHtmlEditor.Demo\bin\Debug\Smith.WPF.HtmlEditor.Demo.vshost.exe
?????文件?????????490??2012-06-06?02:06??SmithHtmlEditor\SmithHtmlEditor.Demo\bin\Debug\Smith.WPF.HtmlEditor.Demo.vshost.exe.manifest
?????文件??????152576??2014-04-21?16:57??SmithHtmlEditor\SmithHtmlEditor.Demo\bin\Debug\Smith.WPF.HtmlEditor.dll
?????文件??????280064??2014-04-21?16:57??SmithHtmlEditor\SmithHtmlEditor.Demo\bin\Debug\Smith.WPF.HtmlEditor.pdb
?????文件?????????700??2011-05-01?20:27??SmithHtmlEditor\SmithHtmlEditor.Demo\bin\Debug\smithhtmleditor.config.xm
?????文件?????????197??2011-05-01?13:11??SmithHtmlEditor\SmithHtmlEditor.Demo\bin\Debug\smithhtmleditor.st
?????目錄???????????0??2011-05-01?21:04??SmithHtmlEditor\SmithHtmlEditor.Demo\bin\Debug\zh-CN\
?????文件????????3584??2014-04-21?16:57??SmithHtmlEditor\SmithHtmlEditor.Demo\bin\Debug\zh-CN\Smith.WPF.HtmlEditor.Demo.resources.dll
?????文件????????7168??2014-04-21?16:57??SmithHtmlEditor\SmithHtmlEditor.Demo\bin\Debug\zh-CN\Smith.WPF.HtmlEditor.resources.dll
?????目錄???????????0??2011-04-14?21:28??SmithHtmlEditor\SmithHtmlEditor.Demo\bin\Release\
?????文件????????2218??2011-05-02?00:38??SmithHtmlEditor\SmithHtmlEditor.Demo\MainWindow.xaml
?????文件????????2561??2011-05-02?10:10??SmithHtmlEditor\SmithHtmlEditor.Demo\MainWindow.xaml.cs
?????目錄???????????0??2011-02-28?15:31??SmithHtmlEditor\SmithHtmlEditor.Demo\obj\
?????目錄???????????0??2014-04-22?11:28??SmithHtmlEditor\SmithHtmlEditor.Demo\obj\Debug\
?????文件????????2326??2014-04-21?16:57??SmithHtmlEditor\SmithHtmlEditor.Demo\obj\Debug\App.g.cs
?????文件????????2326??2014-04-21?17:26??SmithHtmlEditor\SmithHtmlEditor.Demo\obj\Debug\App.g.i.cs
?????文件????????1547??2014-04-21?16:57??SmithHtmlEditor\SmithHtmlEditor.Demo\obj\Debug\BindingTestWindow.baml
?????文件????????4008??2014-04-21?16:57??SmithHtmlEditor\SmithHtmlEditor.Demo\obj\Debug\BindingTestWindow.g.cs
............此處省略183個文件信息
- 上一篇:C#讀取ini文件
- 下一篇:基于RSA算法的數字簽名系統 C#實現
評論
共有 條評論