fix(ui): charts build their European-digit substitution without an invariant culture override
NumberSubstitution refuses the invariant culture as an override, so DrawingElement's type initializer threw and no chart could be created: the screen tests and the capture failed at the first chart. The substitution now keeps the default culture source and only sets the European method, which ignores the culture anyway. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
1 file changed
+1
-2
@@ -1,5 +1,4 @@
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Automation.Peers;
|
||||
@@ -403,7 +402,7 @@ public abstract class DrawingElement : FrameworkElement
|
||||
/// Digits as the rest of the UI shows them: with the UI culture alone, Arabic text before a number would turn its
|
||||
/// digits into Arabic-Indic ones in charts only.
|
||||
/// </summary>
|
||||
private static readonly NumberSubstitution EuropeanDigits = new(NumberCultureSource.Override, CultureInfo.InvariantCulture, NumberSubstitutionMethod.European);
|
||||
private static readonly NumberSubstitution EuropeanDigits = new() { Substitution = NumberSubstitutionMethod.European };
|
||||
|
||||
private FormattedText Format(string text, double emSize, Brush brush, bool semiBold, FlowDirection direction)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user