Exception:无法从文本“White”创建“Color”。当前不支持传入的字符串比较类型。 参数名: comparisonType

报错信息 1
XamlParseException: 无法从文本“White”创建“Color”。
--LineNumber: 0
--LinePosition: 0
--BaseUri: pack://application:,,,/HandyControl;component/Themes/Basic/Colors/Colors.xaml
StackTrace:
   在 System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri)
   在 System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
   在 System.Windows.ResourceDictionary.CreateObject(KeyRecord key)
   在 System.Windows.ResourceDictionary.OnGettingValue(Object key, Object& value, Boolean& canCache)
   在 System.Windows.ResourceDictionary.OnGettingValuePrivate(Object key, Object& value, Boolean& canCache)
   在 System.Windows.ResourceDictionary.GetValueWithoutLock(Object key, Boolean& canCache)
   在 System.Windows.ResourceDictionary.GetValue(Object key, Boolean& canCache)
   在 System.Windows.ResourceDictionary.GetValueWithoutLock(Object key, Boolean& canCache)
   在 System.Windows.ResourceDictionary.GetValue(Object key, Boolean& canCache)
   在 System.Windows.ResourceDictionary.GetValueWithoutLock(Object key, Boolean& canCache)
   在 System.Windows.ResourceDictionary.GetValue(Object key, Boolean& canCache)
   在 System.Windows.DeferredResourceReference.GetValue(BaseValueSourceInternal valueSource)
   在 System.Windows.DeferredAppResourceReference.GetValue(BaseValueSourceInternal valueSource)
   在 System.Windows.DependencyObject.GetEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, RequestFlags requests)
   在 System.Windows.DependencyObject.GetValueEntry(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, RequestFlags requests)
   在 System.Windows.DependencyObject.GetValue(DependencyProperty dp)
   在 System.Windows.Media.SolidColorBrush.get_Color()
   在 System.Windows.Media.SolidColorBrush.UpdateResource(Channel channel, Boolean skipOnChannelCheck)
   在 System.Windows.Media.SolidColorBrush.AddRefOnChannelCore(Channel channel)
   在 System.Windows.Media.Brush.System.Windows.Media.Composition.DUCE.IResource.AddRefOnChannel(Channel channel)
   在 System.Windows.Media.RenderData.System.Windows.Media.Composition.DUCE.IResource.AddRefOnChannel(Channel channel)
   在 System.Windows.UIElement.RenderContent(RenderContext ctx, Boolean isOnChannel)
   在 System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   在 System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   在 System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   在 System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   在 System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   在 System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   在 System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   在 System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   在 System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   在 System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   在 System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   在 System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   在 System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   在 System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   在 System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   在 System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   在 System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   在 System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   在 System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   在 System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   在 System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   在 System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   在 System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   在 System.Windows.Media.Visual.Render(RenderContext ctx, UInt32 childIndex)
   在 System.Windows.Media.CompositionTarget.Compile(Channel channel)
   在 System.Windows.Media.CompositionTarget.System.Windows.Media.ICompositionTarget.Render(Boolean inResize, Channel channel)
   在 System.Windows.Media.MediaContext.Render(ICompositionTarget resizedCompositionTarget)
   在 System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   在 System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   在 System.Windows.Interop.HwndTarget.OnResize()
   在 System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam)
   在 System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   在 MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   在 MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   在 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   在 System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   在 MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   在 MS.Win32.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   在 MS.Win32.HwndSubclass.DefWndProcWrapper(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   在 MS.Win32.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   在 MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)

ArgumentException: 当前不支持传入的字符串比较类型。
参数名: comparisonType
--Message: 当前不支持传入的字符串比较类型。
参数名: comparisonType
--ParamName: comparisonType
StackTrace:
   在 System.String.StartsWith(String value, StringComparison comparisonType)
   在 System.Windows.Media.KnownColors.MatchColor(String colorString, Boolean& isKnownColor, Boolean& isNumericColor, Boolean& isContextColor, Boolean& isScRgbColor)
   在 MS.Internal.Parsers.ParseColor(String color, IFormatProvider formatProvider, ITypeDescriptorContext context)
   在 System.Windows.Media.ColorConverter.ConvertFrom(ITypeDescriptorContext td, CultureInfo ci, Object value)
   在 MS.Internal.Xaml.Runtime.ClrObjectRuntime.CreateObjectWithTypeConverter(ServiceProviderContext serviceContext, XamlValueConverter`1 ts, Object value)
   在 MS.Internal.Xaml.Runtime.PartialTrustTolerantRuntime.CreateFromValue(ServiceProviderContext serviceContext, XamlValueConverter`1 ts, Object value, XamlMember property)
   在 System.Xaml.XamlObjectWriter.Logic_CreateFromValue(ObjectWriterContext ctx, XamlValueConverter`1 typeConverter, Object value, XamlMember property, String targetName, IAddLineInfo lineInfo)

版本:1.44.22 2026-05-22 16:47 Microsoft Windows NT 10.0.18362.0