This commit is contained in:
ShrlAlgo
2025-08-20 12:10:35 +08:00
parent fcd306b0f7
commit 955a01f564
962 changed files with 7893 additions and 127784 deletions

View File

@@ -3,13 +3,13 @@ using System.Text.RegularExpressions;
using System.Windows.Data;
using System.Windows.Documents;
namespace NeoUI.Converters;
namespace NeoUI.Converters.Internal;
/// <summary>
/// StringToCodeConverter 类实现了 IValueConverter 接口,用于将字符串转换为具有代码样式的 RichTextBox 控件。该类提供了一个静态实例 Instance用于在 XAML 中方便地引用。
/// 通过 Convert 方法可以将输入的字符串转换为富文本格式并且会对字符串中的特殊字符如引号、尖括号等进行高亮显示。ConvertBack 方法返回 DependencyProperty.UnsetValue表示不支持反向转换。
/// </summary>
public class StringToCodeConverter : IValueConverter
internal class StringToCodeConverter : IValueConverter
{
//显式静态构造函数告诉c#编译器
//不将type标记为beforefieldinit