Browse Source

Merge branch 'master' into feature/media-context-4

pull/11557/head
Jumar Macato 3 years ago
committed by GitHub
parent
commit
afaa92f988
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      build/SharedVersion.props
  2. 1
      samples/Sandbox/Sandbox.csproj
  3. 46
      src/Avalonia.Base/Interactivity/RoutedPropertyChangedEventArgs.cs
  4. 1
      src/Avalonia.Base/Media/CharacterHit.cs
  5. 74
      src/Avalonia.Base/Media/TextFormatting/BidiReorderer.cs
  6. 10
      src/Avalonia.Base/Media/TextFormatting/IndexedTextRun.cs
  7. 2
      src/Avalonia.Base/Media/TextFormatting/TextBounds.cs
  8. 594
      src/Avalonia.Base/Media/TextFormatting/TextLineImpl.cs
  9. 2
      src/Avalonia.Build.Tasks/GenerateAvaloniaResourcesTask.cs
  10. 43
      src/Avalonia.Build.Tasks/XamlCompilerTaskExecutor.cs
  11. 90
      src/Avalonia.Controls/Border.cs
  12. 8
      src/Avalonia.Controls/Primitives/RangeBase.cs
  13. 47
      src/Avalonia.Controls/Primitives/RangeBaseValueChangedEventArgs.cs
  14. 32
      src/Avalonia.Controls/Shapes/Shape.cs
  15. 11
      src/Avalonia.Controls/TextChangedEventArgs.cs
  16. 11
      src/Avalonia.Controls/TextChangingEventArgs.cs
  17. 3
      src/Avalonia.Themes.Fluent/Accents/BaseColorsPalette.xaml
  18. 3
      src/Avalonia.Themes.Fluent/Accents/BaseResources.xaml
  19. 3
      src/Avalonia.Themes.Fluent/Accents/FluentControlResources.xaml
  20. 2
      src/Avalonia.Themes.Fluent/Avalonia.Themes.Fluent.csproj
  21. 3
      src/Avalonia.Themes.Fluent/Controls/AdornerLayer.xaml
  22. 3
      src/Avalonia.Themes.Fluent/Controls/AutoCompleteBox.xaml
  23. 3
      src/Avalonia.Themes.Fluent/Controls/Button.xaml
  24. 3
      src/Avalonia.Themes.Fluent/Controls/ButtonSpinner.xaml
  25. 3
      src/Avalonia.Themes.Fluent/Controls/Calendar.xaml
  26. 3
      src/Avalonia.Themes.Fluent/Controls/CalendarButton.xaml
  27. 3
      src/Avalonia.Themes.Fluent/Controls/CalendarDatePicker.xaml
  28. 3
      src/Avalonia.Themes.Fluent/Controls/CalendarDayButton.xaml
  29. 3
      src/Avalonia.Themes.Fluent/Controls/CalendarItem.xaml
  30. 3
      src/Avalonia.Themes.Fluent/Controls/CaptionButtons.xaml
  31. 3
      src/Avalonia.Themes.Fluent/Controls/Carousel.xaml
  32. 3
      src/Avalonia.Themes.Fluent/Controls/CheckBox.xaml
  33. 3
      src/Avalonia.Themes.Fluent/Controls/ComboBox.xaml
  34. 3
      src/Avalonia.Themes.Fluent/Controls/ComboBoxItem.xaml
  35. 3
      src/Avalonia.Themes.Fluent/Controls/ContentControl.xaml
  36. 3
      src/Avalonia.Themes.Fluent/Controls/ContextMenu.xaml
  37. 3
      src/Avalonia.Themes.Fluent/Controls/DataValidationErrors.xaml
  38. 3
      src/Avalonia.Themes.Fluent/Controls/DatePicker.xaml
  39. 3
      src/Avalonia.Themes.Fluent/Controls/DateTimePickerShared.xaml
  40. 3
      src/Avalonia.Themes.Fluent/Controls/DropDownButton.xaml
  41. 3
      src/Avalonia.Themes.Fluent/Controls/EmbeddableControlRoot.xaml
  42. 3
      src/Avalonia.Themes.Fluent/Controls/Expander.xaml
  43. 3
      src/Avalonia.Themes.Fluent/Controls/FluentControls.xaml
  44. 3
      src/Avalonia.Themes.Fluent/Controls/FlyoutPresenter.xaml
  45. 3
      src/Avalonia.Themes.Fluent/Controls/GridSplitter.xaml
  46. 3
      src/Avalonia.Themes.Fluent/Controls/ItemsControl.xaml
  47. 3
      src/Avalonia.Themes.Fluent/Controls/Label.xaml
  48. 3
      src/Avalonia.Themes.Fluent/Controls/ListBox.xaml
  49. 3
      src/Avalonia.Themes.Fluent/Controls/ListBoxItem.xaml
  50. 3
      src/Avalonia.Themes.Fluent/Controls/ManagedFileChooser.xaml
  51. 3
      src/Avalonia.Themes.Fluent/Controls/Menu.xaml
  52. 3
      src/Avalonia.Themes.Fluent/Controls/MenuFlyoutPresenter.xaml
  53. 3
      src/Avalonia.Themes.Fluent/Controls/MenuItem.xaml
  54. 3
      src/Avalonia.Themes.Fluent/Controls/MenuScrollViewer.xaml
  55. 3
      src/Avalonia.Themes.Fluent/Controls/NativeMenuBar.xaml
  56. 3
      src/Avalonia.Themes.Fluent/Controls/NotificationCard.xaml
  57. 3
      src/Avalonia.Themes.Fluent/Controls/NumericUpDown.xaml
  58. 3
      src/Avalonia.Themes.Fluent/Controls/OverlayPopupHost.xaml
  59. 3
      src/Avalonia.Themes.Fluent/Controls/PathIcon.xaml
  60. 3
      src/Avalonia.Themes.Fluent/Controls/PopupRoot.xaml
  61. 3
      src/Avalonia.Themes.Fluent/Controls/ProgressBar.xaml
  62. 3
      src/Avalonia.Themes.Fluent/Controls/RadioButton.xaml
  63. 3
      src/Avalonia.Themes.Fluent/Controls/RefreshContainer.xaml
  64. 3
      src/Avalonia.Themes.Fluent/Controls/RefreshVisualizer.xaml
  65. 3
      src/Avalonia.Themes.Fluent/Controls/RepeatButton.xaml
  66. 3
      src/Avalonia.Themes.Fluent/Controls/ScrollBar.xaml
  67. 3
      src/Avalonia.Themes.Fluent/Controls/ScrollViewer.xaml
  68. 3
      src/Avalonia.Themes.Fluent/Controls/SelectableTextBlock.xaml
  69. 3
      src/Avalonia.Themes.Fluent/Controls/Separator.xaml
  70. 3
      src/Avalonia.Themes.Fluent/Controls/Slider.xaml
  71. 3
      src/Avalonia.Themes.Fluent/Controls/SplitButton.xaml
  72. 3
      src/Avalonia.Themes.Fluent/Controls/SplitView.xaml
  73. 3
      src/Avalonia.Themes.Fluent/Controls/TabControl.xaml
  74. 3
      src/Avalonia.Themes.Fluent/Controls/TabItem.xaml
  75. 3
      src/Avalonia.Themes.Fluent/Controls/TabStrip.xaml
  76. 3
      src/Avalonia.Themes.Fluent/Controls/TabStripItem.xaml
  77. 3
      src/Avalonia.Themes.Fluent/Controls/TextBox.xaml
  78. 3
      src/Avalonia.Themes.Fluent/Controls/ThemeVariantScope.xaml
  79. 3
      src/Avalonia.Themes.Fluent/Controls/TimePicker.xaml
  80. 3
      src/Avalonia.Themes.Fluent/Controls/TitleBar.xaml
  81. 3
      src/Avalonia.Themes.Fluent/Controls/ToggleButton.xaml
  82. 3
      src/Avalonia.Themes.Fluent/Controls/ToggleSwitch.xaml
  83. 3
      src/Avalonia.Themes.Fluent/Controls/ToolTip.xaml
  84. 3
      src/Avalonia.Themes.Fluent/Controls/TransitioningContentControl.xaml
  85. 3
      src/Avalonia.Themes.Fluent/Controls/TreeView.xaml
  86. 3
      src/Avalonia.Themes.Fluent/Controls/TreeViewItem.xaml
  87. 3
      src/Avalonia.Themes.Fluent/Controls/UserControl.xaml
  88. 3
      src/Avalonia.Themes.Fluent/Controls/Window.xaml
  89. 3
      src/Avalonia.Themes.Fluent/Controls/WindowNotificationManager.xaml
  90. 3
      src/Avalonia.Themes.Fluent/DensityStyles/Compact.xaml
  91. 2
      src/Avalonia.Themes.Fluent/FluentTheme.xaml
  92. 3
      src/Avalonia.Themes.Simple/Accents/Base.xaml
  93. 2
      src/Avalonia.Themes.Simple/Avalonia.Themes.Simple.csproj
  94. 3
      src/Avalonia.Themes.Simple/Controls/AdornerLayer.xaml
  95. 3
      src/Avalonia.Themes.Simple/Controls/AutoCompleteBox.xaml
  96. 3
      src/Avalonia.Themes.Simple/Controls/Button.xaml
  97. 3
      src/Avalonia.Themes.Simple/Controls/ButtonSpinner.xaml
  98. 3
      src/Avalonia.Themes.Simple/Controls/Calendar.xaml
  99. 3
      src/Avalonia.Themes.Simple/Controls/CalendarButton.xaml
  100. 3
      src/Avalonia.Themes.Simple/Controls/CalendarDatePicker.xaml

2
build/SharedVersion.props

@ -4,7 +4,7 @@
<Product>Avalonia</Product> <Product>Avalonia</Product>
<Version>11.0.999</Version> <Version>11.0.999</Version>
<Authors>Avalonia Team</Authors> <Authors>Avalonia Team</Authors>
<Copyright>Copyright 2022 &#169; The AvaloniaUI Project</Copyright> <Copyright>Copyright 2013-$([System.DateTime]::Now.ToString(`yyyy`)) &#169; The AvaloniaUI Project</Copyright>
<PackageProjectUrl>https://avaloniaui.net</PackageProjectUrl> <PackageProjectUrl>https://avaloniaui.net</PackageProjectUrl>
<RepositoryUrl>https://github.com/AvaloniaUI/Avalonia/</RepositoryUrl> <RepositoryUrl>https://github.com/AvaloniaUI/Avalonia/</RepositoryUrl>
<GenerateDocumentationFile>true</GenerateDocumentationFile> <GenerateDocumentationFile>true</GenerateDocumentationFile>

1
samples/Sandbox/Sandbox.csproj

@ -5,6 +5,7 @@
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch> <TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
<IncludeAvaloniaGenerators>true</IncludeAvaloniaGenerators> <IncludeAvaloniaGenerators>true</IncludeAvaloniaGenerators>
<!-- <AvaloniaXamlIlDebuggerLaunch>true</AvaloniaXamlIlDebuggerLaunch>-->
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

46
src/Avalonia.Base/Interactivity/RoutedPropertyChangedEventArgs.cs

@ -1,46 +0,0 @@
namespace Avalonia.Interactivity
{
/// <summary>
/// Provides both old and new property values with a routed event.
/// </summary>
/// <typeparam name="T">The type of values.</typeparam>
public class RoutedPropertyChangedEventArgs<T> : RoutedEventArgs
{
/// <summary>
/// Initializes a new instance of the <see cref="RoutedPropertyChangedEventArgs{T}"/> class.
/// </summary>
/// <param name="oldValue">The old property value.</param>
/// <param name="newValue">The new property value.</param>
/// <param name="routedEvent">The routed event associated with these event args.</param>
public RoutedPropertyChangedEventArgs(T oldValue, T newValue, RoutedEvent? routedEvent)
: base(routedEvent)
{
OldValue = oldValue;
NewValue = newValue;
}
/// <summary>
/// Initializes a new instance of the <see cref="RoutedPropertyChangedEventArgs{T}"/> class.
/// </summary>
/// <param name="oldValue">The old property value.</param>
/// <param name="newValue">The new property value.</param>
/// <param name="routedEvent">The routed event associated with these event args.</param>
/// <param name="source">The source object that raised the routed event.</param>
public RoutedPropertyChangedEventArgs(T oldValue, T newValue, RoutedEvent? routedEvent, object? source)
: base(routedEvent, source)
{
OldValue = oldValue;
NewValue = newValue;
}
/// <summary>
/// Gets the old value of the property.
/// </summary>
public T OldValue { get; init; }
/// <summary>
/// Gets the new value of the property.
/// </summary>
public T NewValue { get; init; }
}
}

1
src/Avalonia.Base/Media/CharacterHit.cs

@ -19,6 +19,7 @@ namespace Avalonia.Media
/// <param name="firstCharacterIndex">Index of the first character that got hit.</param> /// <param name="firstCharacterIndex">Index of the first character that got hit.</param>
/// <param name="trailingLength">In the case of a leading edge, this value is 0. In the case of a trailing edge, /// <param name="trailingLength">In the case of a leading edge, this value is 0. In the case of a trailing edge,
/// this value is the number of code points until the next valid caret position.</param> /// this value is the number of code points until the next valid caret position.</param>
[DebuggerStepThrough]
public CharacterHit(int firstCharacterIndex, int trailingLength = 0) public CharacterHit(int firstCharacterIndex, int trailingLength = 0)
{ {
FirstCharacterIndex = firstCharacterIndex; FirstCharacterIndex = firstCharacterIndex;

74
src/Avalonia.Base/Media/TextFormatting/BidiReorderer.cs

@ -18,14 +18,14 @@ namespace Avalonia.Media.TextFormatting
public static BidiReorderer Instance public static BidiReorderer Instance
=> t_instance ??= new(); => t_instance ??= new();
public void BidiReorder(Span<TextRun> textRuns, FlowDirection flowDirection) public IndexedTextRun[] BidiReorder(Span<TextRun> textRuns, FlowDirection flowDirection, int firstTextSourceIndex)
{ {
Debug.Assert(_runs.Length == 0); Debug.Assert(_runs.Length == 0);
Debug.Assert(_ranges.Length == 0); Debug.Assert(_ranges.Length == 0);
if (textRuns.IsEmpty) if (textRuns.IsEmpty)
{ {
return; return Array.Empty<IndexedTextRun>();
} }
try try
@ -46,6 +46,22 @@ namespace Avalonia.Media.TextFormatting
// Reorder them into visual order. // Reorder them into visual order.
var firstIndex = LinearReorder(); var firstIndex = LinearReorder();
var indexedTextRuns = new IndexedTextRun[textRuns.Length];
for (var i = 0; i < textRuns.Length; i++)
{
var currentRun = textRuns[i];
indexedTextRuns[i] = new IndexedTextRun
{
TextRun = currentRun,
TextSourceCharacterIndex = firstTextSourceIndex,
RunIndex = i,
NextRunIndex = i + 1
};
firstTextSourceIndex += currentRun.Length;
}
// Now perform a recursive reversal of each run. // Now perform a recursive reversal of each run.
// From the highest level found in the text to the lowest odd level on each line, including intermediate levels // From the highest level found in the text to the lowest odd level on each line, including intermediate levels
@ -76,7 +92,7 @@ namespace Avalonia.Media.TextFormatting
if (max == 0 || (min == max && (max & 1) == 0)) if (max == 0 || (min == max && (max & 1) == 0))
{ {
// Nothing to reverse. // Nothing to reverse.
return; return indexedTextRuns;
} }
// Now apply the reversal and replace the original contents. // Now apply the reversal and replace the original contents.
@ -107,13 +123,25 @@ namespace Avalonia.Media.TextFormatting
var index = 0; var index = 0;
currentIndex = firstIndex; currentIndex = firstIndex;
while (currentIndex >= 0) while (currentIndex >= 0)
{ {
ref var current = ref _runs[currentIndex]; ref var current = ref _runs[currentIndex];
textRuns[index++] = current.Run;
textRuns[index] = current.Run;
var indexedRun = indexedTextRuns[index];
indexedRun.RunIndex = current.RunIndex;
indexedRun.NextRunIndex = current.NextRunIndex;
index++;
currentIndex = current.NextRunIndex; currentIndex = current.NextRunIndex;
} }
return indexedTextRuns;
} }
finally finally
{ {
@ -227,25 +255,6 @@ namespace Avalonia.Media.TextFormatting
return previousIndex; return previousIndex;
} }
private struct OrderedBidiRun
{
public OrderedBidiRun(int runIndex, TextRun run, sbyte level)
{
RunIndex = runIndex;
Run = run;
Level = level;
NextRunIndex = -1;
}
public int RunIndex { get; }
public sbyte Level { get; }
public TextRun Run { get; }
public int NextRunIndex { get; set; } // -1 if none
}
private struct BidiRange private struct BidiRange
{ {
public BidiRange(sbyte level, int leftRunIndex, int rightRunIndex, int previousRangeIndex) public BidiRange(sbyte level, int leftRunIndex, int rightRunIndex, int previousRangeIndex)
@ -265,4 +274,23 @@ namespace Avalonia.Media.TextFormatting
public int PreviousRangeIndex { get; } // -1 if none public int PreviousRangeIndex { get; } // -1 if none
} }
} }
internal struct OrderedBidiRun
{
public OrderedBidiRun(int runIndex, TextRun run, sbyte level)
{
RunIndex = runIndex;
Run = run;
Level = level;
NextRunIndex = -1;
}
public int RunIndex { get; }
public sbyte Level { get; }
public TextRun Run { get; }
public int NextRunIndex { get; set; } // -1 if none
}
} }

10
src/Avalonia.Base/Media/TextFormatting/IndexedTextRun.cs

@ -0,0 +1,10 @@
namespace Avalonia.Media.TextFormatting
{
internal class IndexedTextRun
{
public int TextSourceCharacterIndex { get; init; }
public int RunIndex { get; set; }
public int NextRunIndex { get; set; }
public TextRun? TextRun { get; init; }
}
}

2
src/Avalonia.Base/Media/TextFormatting/TextBounds.cs

@ -1,4 +1,5 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics;
namespace Avalonia.Media.TextFormatting namespace Avalonia.Media.TextFormatting
{ {
@ -10,6 +11,7 @@ namespace Avalonia.Media.TextFormatting
/// <summary> /// <summary>
/// Constructing TextBounds object /// Constructing TextBounds object
/// </summary> /// </summary>
[DebuggerStepThrough]
internal TextBounds(Rect bounds, FlowDirection flowDirection, IList<TextRunBounds> runBounds) internal TextBounds(Rect bounds, FlowDirection flowDirection, IList<TextRunBounds> runBounds)
{ {
Rectangle = bounds; Rectangle = bounds;

594
src/Avalonia.Base/Media/TextFormatting/TextLineImpl.cs

@ -4,8 +4,12 @@ using Avalonia.Utilities;
namespace Avalonia.Media.TextFormatting namespace Avalonia.Media.TextFormatting
{ {
internal sealed class TextLineImpl : TextLine internal class TextLineImpl : TextLine
{ {
internal static Comparer<TextBounds> TextBoundsComparer { get; } =
Comparer<TextBounds>.Create((x, y) => x.Rectangle.Left.CompareTo(y.Rectangle.Left));
private IReadOnlyList<IndexedTextRun>? _indexedTextRuns;
private readonly TextRun[] _textRuns; private readonly TextRun[] _textRuns;
private readonly double _paragraphWidth; private readonly double _paragraphWidth;
private readonly TextParagraphProperties _paragraphProperties; private readonly TextParagraphProperties _paragraphProperties;
@ -338,184 +342,169 @@ namespace Avalonia.Media.TextFormatting
/// <inheritdoc/> /// <inheritdoc/>
public override double GetDistanceFromCharacterHit(CharacterHit characterHit) public override double GetDistanceFromCharacterHit(CharacterHit characterHit)
{ {
var flowDirection = _paragraphProperties.FlowDirection; if (_indexedTextRuns is null || _indexedTextRuns.Count == 0)
var characterIndex = characterHit.FirstCharacterIndex + characterHit.TrailingLength;
var currentPosition = FirstTextSourceIndex;
var remainingLength = characterIndex - FirstTextSourceIndex;
var currentDistance = Start;
if (flowDirection == FlowDirection.LeftToRight)
{ {
for (var index = 0; index < _textRuns.Length; index++) return Start;
{ }
var currentRun = _textRuns[index];
if (currentRun is ShapedTextRun shapedRun && !shapedRun.ShapedBuffer.IsLeftToRight)
{
var i = index;
var rightToLeftWidth = shapedRun.Size.Width;
while (i + 1 <= _textRuns.Length - 1)
{
var nextRun = _textRuns[i + 1];
if (nextRun is ShapedTextRun nextShapedRun && !nextShapedRun.ShapedBuffer.IsLeftToRight)
{
i++;
rightToLeftWidth += nextShapedRun.Size.Width; var characterIndex = Math.Min(
characterHit.FirstCharacterIndex + characterHit.TrailingLength,
FirstTextSourceIndex + Length);
continue; var currentPosition = FirstTextSourceIndex;
}
break; static FlowDirection GetDirection(TextRun textRun, FlowDirection currentDirection)
} {
if (textRun is ShapedTextRun shapedTextRun)
{
return shapedTextRun.ShapedBuffer.IsLeftToRight ?
FlowDirection.LeftToRight :
FlowDirection.RightToLeft;
}
if (i > index) return currentDirection;
{ }
while (i >= index)
{
currentRun = _textRuns[i];
if (currentRun is DrawableTextRun drawable) IndexedTextRun FindIndexedRun()
{ {
rightToLeftWidth -= drawable.Size.Width; var i = 0;
}
if (currentPosition + currentRun.Length >= characterIndex) IndexedTextRun currentIndexedRun = _indexedTextRuns[i];
{
break;
}
currentPosition += currentRun.Length; while(currentIndexedRun.TextSourceCharacterIndex != currentPosition)
{
if(i + 1 < _indexedTextRuns.Count)
{
i++;
remainingLength -= currentRun.Length; currentIndexedRun = _indexedTextRuns[i];
}
}
i--; return currentIndexedRun;
} }
currentDistance += rightToLeftWidth; double GetPreceedingDistance(int firstIndex)
} {
} var distance = 0.0;
if (currentPosition + currentRun.Length >= characterIndex && for (var i = 0; i < firstIndex; i++)
TryGetDistanceFromCharacterHit(currentRun, characterHit, currentPosition, remainingLength, flowDirection, out var distance, out _)) {
{ var currentRun = _textRuns[i];
return Math.Max(0, currentDistance + distance);
}
if (currentRun is DrawableTextRun drawableTextRun) if (currentRun is DrawableTextRun drawableTextRun)
{ {
currentDistance += drawableTextRun.Size.Width; distance += drawableTextRun.Size.Width;
} }
//No hit hit found so we add the full width
currentPosition += currentRun.Length;
remainingLength -= currentRun.Length;
} }
return distance;
} }
else
TextRun? currentTextRun = null;
var currentIndexedRun = FindIndexedRun();
while (currentPosition < FirstTextSourceIndex + Length)
{ {
currentDistance += WidthIncludingTrailingWhitespace; currentTextRun = currentIndexedRun.TextRun;
for (var index = _textRuns.Length - 1; index >= 0; index--) if (currentTextRun == null)
{ {
var currentRun = _textRuns[index]; break;
}
if (TryGetDistanceFromCharacterHit(currentRun, characterHit, currentPosition, remainingLength, if (currentIndexedRun.TextSourceCharacterIndex + currentTextRun.Length <= characterHit.FirstCharacterIndex)
flowDirection, out var distance, out var currentGlyphRun)) {
if (currentPosition + currentTextRun.Length < FirstTextSourceIndex + Length)
{ {
if (currentGlyphRun != null) currentPosition += currentTextRun.Length;
{
currentDistance -= currentGlyphRun.Bounds.Width;
}
return currentDistance + distance; currentIndexedRun = FindIndexedRun();
}
if (currentRun is DrawableTextRun drawableTextRun) continue;
{
currentDistance -= drawableTextRun.Size.Width;
} }
//No hit hit found so we add the full width
currentPosition += currentRun.Length;
remainingLength -= currentRun.Length;
} }
break;
} }
return Math.Max(0, currentDistance); if (currentTextRun == null)
} {
return 0;
}
private static bool TryGetDistanceFromCharacterHit( var directionalWidth = 0.0;
TextRun currentRun, var firstRunIndex = currentIndexedRun.RunIndex;
CharacterHit characterHit, var lastRunIndex = firstRunIndex;
int currentPosition,
int remainingLength,
FlowDirection flowDirection,
out double distance,
out GlyphRun? currentGlyphRun)
{
var characterIndex = characterHit.FirstCharacterIndex + characterHit.TrailingLength;
var isTrailingHit = characterHit.TrailingLength > 0;
distance = 0; var currentDirection = GetDirection(currentTextRun, _resolvedFlowDirection);
currentGlyphRun = null;
switch (currentRun) var currentX = Start + GetPreceedingDistance(currentIndexedRun.RunIndex);
if (currentTextRun is DrawableTextRun currentDrawable)
{ {
case ShapedTextRun shapedTextCharacters: directionalWidth = currentDrawable.Size.Width;
{ }
currentGlyphRun = shapedTextCharacters.GlyphRun;
if (currentPosition + remainingLength <= currentPosition + currentRun.Length) if (currentTextRun is not TextEndOfLine)
{ {
characterHit = new CharacterHit(currentPosition + remainingLength); if (currentDirection == FlowDirection.LeftToRight)
{
// Find consecutive runs of same direction
for (; lastRunIndex + 1 < _textRuns.Length; lastRunIndex++)
{
var nextRun = _textRuns[lastRunIndex + 1];
distance = currentGlyphRun.GetDistanceFromCharacterHit(characterHit); var nextDirection = GetDirection(nextRun, currentDirection);
return true; if (currentDirection != nextDirection)
{
break;
} }
if (currentPosition + remainingLength == currentPosition + currentRun.Length && isTrailingHit) if (nextRun is DrawableTextRun nextDrawable)
{ {
if (currentGlyphRun.IsLeftToRight || flowDirection == FlowDirection.RightToLeft) directionalWidth += nextDrawable.Size.Width;
{
distance = currentGlyphRun.Bounds.Width;
}
return true;
} }
break;
} }
case DrawableTextRun drawableTextRun: }
else
{
// Find consecutive runs of same direction
for (; firstRunIndex - 1 > 0; firstRunIndex--)
{ {
if (characterIndex == currentPosition) var previousRun = _textRuns[firstRunIndex - 1];
var previousDirection = GetDirection(previousRun, currentDirection);
if (currentDirection != previousDirection)
{ {
return true; break;
} }
if (characterIndex == currentPosition + currentRun.Length) if (previousRun is DrawableTextRun previousDrawable)
{ {
distance = drawableTextRun.Size.Width; directionalWidth += previousDrawable.Size.Width;
return true;
currentX -= previousDrawable.Size.Width;
} }
}
}
}
break; switch (currentDirection)
{
case FlowDirection.RightToLeft:
{
return GetTextRunBoundsRightToLeft(firstRunIndex, lastRunIndex, currentX + directionalWidth, characterIndex,
currentPosition, 1, out _, out _).Rectangle.Right;
} }
default: default:
{ {
return false; return GetTextBoundsLeftToRight(firstRunIndex, lastRunIndex, currentX, characterIndex,
currentPosition, 1, out _, out _).Rectangle.Left;
} }
} }
return false;
} }
/// <inheritdoc/> /// <inheritdoc/>
@ -585,7 +574,7 @@ namespace Avalonia.Media.TextFormatting
public override IReadOnlyList<TextBounds> GetTextBounds(int firstTextSourceIndex, int textLength) public override IReadOnlyList<TextBounds> GetTextBounds(int firstTextSourceIndex, int textLength)
{ {
if (_textRuns.Length == 0) if (_indexedTextRuns is null || _indexedTextRuns.Count == 0)
{ {
return Array.Empty<TextBounds>(); return Array.Empty<TextBounds>();
} }
@ -607,303 +596,154 @@ namespace Avalonia.Media.TextFormatting
return currentDirection; return currentDirection;
} }
if (_paragraphProperties.FlowDirection == FlowDirection.LeftToRight) IndexedTextRun FindIndexedRun()
{ {
var currentX = Start; var i = 0;
for (int i = 0; i < _textRuns.Length; i++) IndexedTextRun currentIndexedRun = _indexedTextRuns[i];
{
var currentRun = _textRuns[i];
var firstRunIndex = i; while (currentIndexedRun.TextSourceCharacterIndex != currentPosition)
var lastRunIndex = firstRunIndex; {
var currentDirection = GetDirection(currentRun, FlowDirection.LeftToRight); if (i + 1 < _indexedTextRuns.Count)
var directionalWidth = 0.0;
if (currentRun is DrawableTextRun currentDrawable)
{ {
directionalWidth = currentDrawable.Size.Width; i++;
}
// Find consecutive runs of same direction currentIndexedRun = _indexedTextRuns[i];
for (; lastRunIndex + 1 < _textRuns.Length; lastRunIndex++) }
{ }
var nextRun = _textRuns[lastRunIndex + 1];
var nextDirection = GetDirection(nextRun, currentDirection); return currentIndexedRun;
}
if (currentDirection != nextDirection) double GetPreceedingDistance(int firstIndex)
{ {
break; var distance = 0.0;
}
if (nextRun is DrawableTextRun nextDrawable) for (var i = 0; i < firstIndex; i++)
{ {
directionalWidth += nextDrawable.Size.Width; var currentRun = _textRuns[i];
}
}
//Skip runs that are not part of the hit test range if (currentRun is DrawableTextRun drawableTextRun)
switch (currentDirection)
{ {
case FlowDirection.RightToLeft: distance += drawableTextRun.Size.Width;
{ }
for (; lastRunIndex >= firstRunIndex; lastRunIndex--) }
{
currentRun = _textRuns[lastRunIndex];
if (currentPosition + currentRun.Length > firstTextSourceIndex) return distance;
{ }
break;
}
currentPosition += currentRun.Length; while (remainingLength > 0 && currentPosition < FirstTextSourceIndex + Length)
{
var currentIndexedRun = FindIndexedRun();
if (currentRun is DrawableTextRun drawableTextRun) if (currentIndexedRun == null)
{ {
directionalWidth -= drawableTextRun.Size.Width; break;
currentX += drawableTextRun.Size.Width; }
}
if (lastRunIndex - 1 < 0) var directionalWidth = 0.0;
{ var firstRunIndex = currentIndexedRun.RunIndex;
break; var lastRunIndex = firstRunIndex;
} var currentTextRun = currentIndexedRun.TextRun;
}
break; if (currentTextRun == null)
} {
default: break;
{ }
for (; firstRunIndex <= lastRunIndex; firstRunIndex++)
{
currentRun = _textRuns[firstRunIndex];
if (currentPosition + currentRun.Length > firstTextSourceIndex)
{
break;
}
currentPosition += currentRun.Length; var currentDirection = GetDirection(currentTextRun, _resolvedFlowDirection);
if (currentRun is DrawableTextRun drawableTextRun) if (currentIndexedRun.TextSourceCharacterIndex + currentTextRun.Length <= firstTextSourceIndex)
{ {
currentX += drawableTextRun.Size.Width; currentPosition += currentTextRun.Length;
directionalWidth -= drawableTextRun.Size.Width;
}
if (firstRunIndex + 1 == _textRuns.Length) continue;
{ }
break;
}
}
break; var currentX = Start + GetPreceedingDistance(currentIndexedRun.RunIndex);
}
}
i = lastRunIndex; if (currentTextRun is DrawableTextRun currentDrawable)
{
directionalWidth = currentDrawable.Size.Width;
}
//Possible overlap at runs of different direction if (currentTextRun is not TextEndOfLine)
if (directionalWidth == 0 && i < _textRuns.Length - 1) {
if (currentDirection == FlowDirection.LeftToRight)
{ {
//In case a run only contains a linebreak we don't want to skip it. // Find consecutive runs of same direction
if (currentRun is ShapedTextRun shaped) for (; lastRunIndex + 1 < _textRuns.Length; lastRunIndex++)
{
if (currentRun.Length - shaped.GlyphRun.Metrics.NewLineLength > 0)
{
continue;
}
}
else
{ {
continue; var nextRun = _textRuns[lastRunIndex + 1];
}
}
int coveredLength; var nextDirection = GetDirection(nextRun, currentDirection);
TextBounds? textBounds;
switch (currentDirection) if (currentDirection != nextDirection)
{
case FlowDirection.RightToLeft:
{ {
textBounds = GetTextRunBoundsRightToLeft(firstRunIndex, lastRunIndex, currentX + directionalWidth, firstTextSourceIndex,
currentPosition, remainingLength, out coveredLength, out currentPosition);
currentX += directionalWidth;
break; break;
} }
default:
{
textBounds = GetTextBoundsLeftToRight(firstRunIndex, lastRunIndex, currentX, firstTextSourceIndex,
currentPosition, remainingLength, out coveredLength, out currentPosition);
currentX = textBounds.Rectangle.Right; if (nextRun is DrawableTextRun nextDrawable)
{
break; directionalWidth += nextDrawable.Size.Width;
} }
}
} }
else
if (coveredLength > 0)
{
result.Add(textBounds);
remainingLength -= coveredLength;
}
if (remainingLength <= 0)
{
break;
}
}
}
else
{
var currentX = Start + WidthIncludingTrailingWhitespace;
for (int i = _textRuns.Length - 1; i >= 0; i--)
{
var currentRun = _textRuns[i];
var firstRunIndex = i;
var lastRunIndex = firstRunIndex;
var currentDirection = GetDirection(currentRun, FlowDirection.RightToLeft);
var directionalWidth = 0.0;
if (currentRun is DrawableTextRun currentDrawable)
{
directionalWidth = currentDrawable.Size.Width;
}
// Find consecutive runs of same direction
for (; firstRunIndex - 1 > 0; firstRunIndex--)
{ {
var previousRun = _textRuns[firstRunIndex - 1]; // Find consecutive runs of same direction
for (; firstRunIndex - 1 > 0; firstRunIndex--)
var previousDirection = GetDirection(previousRun, currentDirection);
if (currentDirection != previousDirection)
{ {
break; var previousRun = _textRuns[firstRunIndex - 1];
}
if (currentRun is DrawableTextRun previousDrawable) var previousDirection = GetDirection(previousRun, currentDirection);
{
directionalWidth += previousDrawable.Size.Width;
}
}
//Skip runs that are not part of the hit test range if (currentDirection != previousDirection)
switch (currentDirection)
{
case FlowDirection.RightToLeft:
{ {
for (; lastRunIndex >= firstRunIndex; lastRunIndex--)
{
currentRun = _textRuns[lastRunIndex];
if (currentPosition + currentRun.Length <= firstTextSourceIndex)
{
currentPosition += currentRun.Length;
if (currentRun is DrawableTextRun drawableTextRun)
{
currentX -= drawableTextRun.Size.Width;
directionalWidth -= drawableTextRun.Size.Width;
}
continue;
}
break;
}
break; break;
} }
default:
{
for (; firstRunIndex <= lastRunIndex; firstRunIndex++)
{
currentRun = _textRuns[firstRunIndex];
if (currentPosition + currentRun.Length <= firstTextSourceIndex)
{
currentPosition += currentRun.Length;
if (currentRun is DrawableTextRun drawableTextRun)
{
currentX += drawableTextRun.Size.Width;
directionalWidth -= drawableTextRun.Size.Width;
}
continue; if (previousRun is DrawableTextRun previousDrawable)
} {
directionalWidth += previousDrawable.Size.Width;
break;
}
break; currentX -= previousDrawable.Size.Width;
} }
}
} }
}
i = firstRunIndex; int coveredLength;
TextBounds? textBounds;
//Possible overlap at runs of different direction switch (currentDirection)
if (directionalWidth == 0 && i > 0) {
{ case FlowDirection.RightToLeft:
//In case a run only contains a linebreak we don't want to skip it.
if (currentRun is ShapedTextRun shaped)
{ {
if (currentRun.Length - shaped.GlyphRun.Metrics.NewLineLength > 0) textBounds = GetTextRunBoundsRightToLeft(firstRunIndex, lastRunIndex, currentX + directionalWidth, firstTextSourceIndex,
{ currentPosition, remainingLength, out coveredLength, out currentPosition);
continue;
} break;
} }
else default:
{ {
continue; textBounds = GetTextBoundsLeftToRight(firstRunIndex, lastRunIndex, currentX, firstTextSourceIndex,
} currentPosition, remainingLength, out coveredLength, out currentPosition);
}
int coveredLength;
TextBounds? textBounds;
switch (currentDirection)
{
case FlowDirection.LeftToRight:
{
textBounds = GetTextBoundsLeftToRight(firstRunIndex, lastRunIndex, currentX - directionalWidth, firstTextSourceIndex,
currentPosition, remainingLength, out coveredLength, out currentPosition);
currentX -= directionalWidth;
break;
}
default:
{
textBounds = GetTextRunBoundsRightToLeft(firstRunIndex, lastRunIndex, currentX, firstTextSourceIndex,
currentPosition, remainingLength, out coveredLength, out currentPosition);
currentX = textBounds.Rectangle.Left;
break; break;
} }
} }
//Visual order is always left to right so we need to insert if (coveredLength > 0)
result.Insert(0, textBounds); {
result.Add(textBounds);
remainingLength -= coveredLength; remainingLength -= coveredLength;
if (remainingLength <= 0)
{
break;
}
} }
} }
result.Sort(TextBoundsComparer);
return result; return result;
} }
@ -1164,7 +1004,7 @@ namespace Avalonia.Media.TextFormatting
_textLineBreak = new TextLineBreak(textEndOfLine); _textLineBreak = new TextLineBreak(textEndOfLine);
} }
BidiReorderer.Instance.BidiReorder(_textRuns, _resolvedFlowDirection); _indexedTextRuns = BidiReorderer.Instance.BidiReorder(_textRuns, _paragraphProperties.FlowDirection, FirstTextSourceIndex);
} }
/// <summary> /// <summary>
@ -1211,13 +1051,6 @@ namespace Avalonia.Media.TextFormatting
return true; return true;
} }
//var characterIndex = codepointIndex - shapedRun.Text.Start;
//if (characterIndex < 0 && shapedRun.ShapedBuffer.IsLeftToRight)
//{
// foundCharacterHit = new CharacterHit(foundCharacterHit.FirstCharacterIndex);
//}
nextCharacterHit = isAtEnd || characterHit.TrailingLength != 0 ? nextCharacterHit = isAtEnd || characterHit.TrailingLength != 0 ?
foundCharacterHit : foundCharacterHit :
new CharacterHit(foundCharacterHit.FirstCharacterIndex + foundCharacterHit.TrailingLength); new CharacterHit(foundCharacterHit.FirstCharacterIndex + foundCharacterHit.TrailingLength);
@ -1556,8 +1389,8 @@ namespace Avalonia.Media.TextFormatting
TrailingWhitespaceLength = trailingWhitespaceLength, TrailingWhitespaceLength = trailingWhitespaceLength,
Width = width, Width = width,
WidthIncludingTrailingWhitespace = widthIncludingWhitespace, WidthIncludingTrailingWhitespace = widthIncludingWhitespace,
OverhangLeading= overhangLeading, OverhangLeading = overhangLeading,
OverhangTrailing= overhangTrailing, OverhangTrailing = overhangTrailing,
OverhangAfter = overhangAfter OverhangAfter = overhangAfter
}; };
} }
@ -1615,8 +1448,7 @@ namespace Avalonia.Media.TextFormatting
return Math.Max(0, start); return Math.Max(0, start);
case TextAlignment.Right: case TextAlignment.Right:
return Math.Max(0, _paragraphWidth - width); return Math.Max(0, _paragraphWidth - widthIncludingTrailingWhitespace);
default: default:
return 0; return 0;
} }

2
src/Avalonia.Build.Tasks/GenerateAvaloniaResourcesTask.cs

@ -127,7 +127,7 @@ namespace Avalonia.Build.Tasks
public bool Execute() public bool Execute()
{ {
Enum.TryParse<MessageImportance>(ReportImportance, out _reportImportance); Enum.TryParse(ReportImportance, true, out _reportImportance);
BuildEngine.LogMessage($"GenerateAvaloniaResourcesTask -> Root: {Root}, {Resources?.Count()} resources, Output:{Output}", _reportImportance < MessageImportance.Low ? MessageImportance.High : _reportImportance); BuildEngine.LogMessage($"GenerateAvaloniaResourcesTask -> Root: {Root}, {Resources?.Count()} resources, Output:{Output}", _reportImportance < MessageImportance.Low ? MessageImportance.High : _reportImportance);
var resources = BuildResourceSources(); var resources = BuildResourceSources();

43
src/Avalonia.Build.Tasks/XamlCompilerTaskExecutor.cs

@ -288,6 +288,24 @@ namespace Avalonia.Build.Tasks
if (precompileText != "true") if (precompileText != "true")
throw new XamlParseException("Invalid value for x:Precompile", precompileDirective); throw new XamlParseException("Invalid value for x:Precompile", precompileDirective);
} }
var classModifierDirective = initialRoot.Children.OfType<XamlAstXmlDirective>()
.FirstOrDefault(d => d.Namespace == XamlNamespaces.Xaml2006 && d.Name == "ClassModifier");
bool? classModifierPublic = null;
if (classModifierDirective != null)
{
var classModifierText = (classModifierDirective.Values[0] as XamlAstTextNode)?.Text.Trim()
.ToLowerInvariant();
if ("Public".Equals(classModifierText, StringComparison.OrdinalIgnoreCase))
classModifierPublic = true;
// XAML spec uses "Public" and "NotPublic" values,
// When WPF documentation uses "public" and "internal".
else if ("NotPublic".Equals(classModifierText, StringComparison.OrdinalIgnoreCase)
|| "Internal".Equals(classModifierText, StringComparison.OrdinalIgnoreCase))
classModifierPublic = false;
else
throw new XamlParseException("Invalid value for x:ClassModifier. Expected value are: Public, NotPublic (internal).", precompileDirective);
}
var classDirective = initialRoot.Children.OfType<XamlAstXmlDirective>() var classDirective = initialRoot.Children.OfType<XamlAstXmlDirective>()
.FirstOrDefault(d => d.Namespace == XamlNamespaces.Xaml2006 && d.Name == "Class"); .FirstOrDefault(d => d.Namespace == XamlNamespaces.Xaml2006 && d.Name == "Class");
@ -297,8 +315,21 @@ namespace Avalonia.Build.Tasks
if (classDirective.Values.Count != 1 || !(classDirective.Values[0] is XamlAstTextNode tn)) if (classDirective.Values.Count != 1 || !(classDirective.Values[0] is XamlAstTextNode tn))
throw new XamlParseException("x:Class should have a string value", classDirective); throw new XamlParseException("x:Class should have a string value", classDirective);
classType = typeSystem.TargetAssembly.FindType(tn.Text); classType = typeSystem.TargetAssembly.FindType(tn.Text);
if (classType == null) if (classType == null)
throw new XamlParseException($"Unable to find type `{tn.Text}`", classDirective); throw new XamlParseException($"Unable to find type `{tn.Text}`", classDirective);
var isClassPublic = typeSystem.GetTypeReference(classType).Resolve().IsPublic;
classModifierPublic ??= isClassPublic;
// We do not really need x:ClassModifier support for x:Class, but we can at least use it for validation here.
if (classModifierPublic != isClassPublic)
{
throw new XamlParseException(
"XAML file x:ClassModifier doesn't match the x:Class type modifiers.",
precompileDirective);
}
compiler.OverrideRootType(parsed, compiler.OverrideRootType(parsed,
new XamlAstClrTypeReference(classDirective, classType, false)); new XamlAstClrTypeReference(classDirective, classType, false));
initialRoot.Children.Remove(classDirective); initialRoot.Children.Remove(classDirective);
@ -312,6 +343,8 @@ namespace Avalonia.Build.Tasks
var classTypeDefinition = var classTypeDefinition =
classType == null ? null : typeSystem.GetTypeReference(classType).Resolve(); classType == null ? null : typeSystem.GetTypeReference(classType).Resolve();
// All XAML files are public by default.
classModifierPublic ??= true;
var populateBuilder = classTypeDefinition == null ? var populateBuilder = classTypeDefinition == null ?
builder : builder :
@ -319,10 +352,11 @@ namespace Avalonia.Build.Tasks
((List<XamlDocumentResource>)parsedXamlDocuments).Add(new XamlDocumentResource( ((List<XamlDocumentResource>)parsedXamlDocuments).Add(new XamlDocumentResource(
parsed, res.Uri, res, classType, parsed, res.Uri, res, classType,
classModifierPublic.Value,
populateBuilder, populateBuilder,
compiler.DefinePopulateMethod(populateBuilder, parsed, populateName, compiler.DefinePopulateMethod(populateBuilder, parsed, populateName,
classTypeDefinition == null), classTypeDefinition == null && classModifierPublic.Value),
buildName == null ? null : compiler.DefineBuildMethod(builder, parsed, buildName, true))); buildName == null ? null : compiler.DefineBuildMethod(builder, parsed, buildName, classModifierPublic.Value)));
} }
catch (Exception e) catch (Exception e)
{ {
@ -368,7 +402,7 @@ namespace Avalonia.Build.Tasks
document.PopulateMethod, document.PopulateMethod,
document.BuildMethod, document.BuildMethod,
builder.DefineSubType(compilerConfig.WellKnownTypes.Object, "NamespaceInfo:" + res.Name, builder.DefineSubType(compilerConfig.WellKnownTypes.Object, "NamespaceInfo:" + res.Name,
true), document.IsPublic),
(closureName, closureBaseType) => (closureName, closureBaseType) =>
populateBuilder.DefineSubType(closureBaseType, closureName, false), populateBuilder.DefineSubType(closureBaseType, closureName, false),
(closureName, returnType, parameterTypes) => (closureName, returnType, parameterTypes) =>
@ -502,7 +536,8 @@ namespace Avalonia.Build.Tasks
} }
if (document.BuildMethod != null || classTypeDefinition != null) if (document.IsPublic
&& (document.BuildMethod != null || classTypeDefinition != null))
{ {
var compiledBuildMethod = document.BuildMethod == null ? var compiledBuildMethod = document.BuildMethod == null ?
null : null :

90
src/Avalonia.Controls/Border.cs

@ -47,30 +47,6 @@ namespace Avalonia.Controls
public static readonly StyledProperty<BoxShadows> BoxShadowProperty = public static readonly StyledProperty<BoxShadows> BoxShadowProperty =
AvaloniaProperty.Register<Border, BoxShadows>(nameof(BoxShadow)); AvaloniaProperty.Register<Border, BoxShadows>(nameof(BoxShadow));
/// <summary>
/// Defines the <see cref="BorderDashOffset"/> property.
/// </summary>
public static readonly StyledProperty<double> BorderDashOffsetProperty =
AvaloniaProperty.Register<Border, double>(nameof(BorderDashOffset));
/// <summary>
/// Defines the <see cref="BorderDashArray"/> property.
/// </summary>
public static readonly StyledProperty<AvaloniaList<double>?> BorderDashArrayProperty =
AvaloniaProperty.Register<Border, AvaloniaList<double>?>(nameof(BorderDashArray));
/// <summary>
/// Defines the <see cref="BorderLineCap"/> property.
/// </summary>
public static readonly StyledProperty<PenLineCap> BorderLineCapProperty =
AvaloniaProperty.Register<Border, PenLineCap>(nameof(BorderLineCap), PenLineCap.Flat);
/// <summary>
/// Defines the <see cref="BorderLineJoin"/> property.
/// </summary>
public static readonly StyledProperty<PenLineJoin> BorderLineJoinProperty =
AvaloniaProperty.Register<Border, PenLineJoin>(nameof(BorderLineJoin), PenLineJoin.Miter);
private readonly BorderRenderHelper _borderRenderHelper = new BorderRenderHelper(); private readonly BorderRenderHelper _borderRenderHelper = new BorderRenderHelper();
private Thickness? _layoutThickness; private Thickness? _layoutThickness;
private double _scale; private double _scale;
@ -86,10 +62,6 @@ namespace Avalonia.Controls
BorderBrushProperty, BorderBrushProperty,
BorderThicknessProperty, BorderThicknessProperty,
CornerRadiusProperty, CornerRadiusProperty,
BorderDashArrayProperty,
BorderLineCapProperty,
BorderLineJoinProperty,
BorderDashOffsetProperty,
BoxShadowProperty); BoxShadowProperty);
AffectsMeasure<Border>(BorderThicknessProperty); AffectsMeasure<Border>(BorderThicknessProperty);
} }
@ -115,8 +87,8 @@ namespace Avalonia.Controls
/// </summary> /// </summary>
public IBrush? Background public IBrush? Background
{ {
get { return GetValue(BackgroundProperty); } get => GetValue(BackgroundProperty);
set { SetValue(BackgroundProperty, value); } set => SetValue(BackgroundProperty, value);
} }
/// <summary> /// <summary>
@ -124,17 +96,8 @@ namespace Avalonia.Controls
/// </summary> /// </summary>
public IBrush? BorderBrush public IBrush? BorderBrush
{ {
get { return GetValue(BorderBrushProperty); } get => GetValue(BorderBrushProperty);
set { SetValue(BorderBrushProperty, value); } set => SetValue(BorderBrushProperty, value);
}
/// <summary>
/// Gets or sets a collection of <see cref="double"/> values that indicate the pattern of dashes and gaps that is used to outline shapes.
/// </summary>
public AvaloniaList<double>? BorderDashArray
{
get { return GetValue(BorderDashArrayProperty); }
set { SetValue(BorderDashArrayProperty, value); }
} }
/// <summary> /// <summary>
@ -142,35 +105,8 @@ namespace Avalonia.Controls
/// </summary> /// </summary>
public Thickness BorderThickness public Thickness BorderThickness
{ {
get { return GetValue(BorderThicknessProperty); } get => GetValue(BorderThicknessProperty);
set { SetValue(BorderThicknessProperty, value); } set => SetValue(BorderThicknessProperty, value);
}
/// <summary>
/// Gets or sets a value that specifies the distance within the dash pattern where a dash begins.
/// </summary>
public double BorderDashOffset
{
get { return GetValue(BorderDashOffsetProperty); }
set { SetValue(BorderDashOffsetProperty, value); }
}
/// <summary>
/// Gets or sets a <see cref="PenLineCap"/> enumeration value that describes the shape at the ends of a line.
/// </summary>
public PenLineCap BorderLineCap
{
get { return GetValue(BorderLineCapProperty); }
set { SetValue(BorderLineCapProperty, value); }
}
/// <summary>
/// Gets or sets a <see cref="PenLineJoin"/> enumeration value that specifies the type of join that is used at the vertices of a Shape.
/// </summary>
public PenLineJoin BorderLineJoin
{
get { return GetValue(BorderLineJoinProperty); }
set { SetValue(BorderLineJoinProperty, value); }
} }
/// <summary> /// <summary>
@ -178,8 +114,8 @@ namespace Avalonia.Controls
/// </summary> /// </summary>
public CornerRadius CornerRadius public CornerRadius CornerRadius
{ {
get { return GetValue(CornerRadiusProperty); } get => GetValue(CornerRadiusProperty);
set { SetValue(CornerRadiusProperty, value); } set => SetValue(CornerRadiusProperty, value);
} }
/// <summary> /// <summary>
@ -227,8 +163,14 @@ namespace Avalonia.Controls
/// <param name="context">The drawing context.</param> /// <param name="context">The drawing context.</param>
public sealed override void Render(DrawingContext context) public sealed override void Render(DrawingContext context)
{ {
_borderRenderHelper.Render(context, Bounds.Size, LayoutThickness, CornerRadius, Background, BorderBrush, _borderRenderHelper.Render(
BoxShadow, BorderDashOffset, BorderLineCap, BorderLineJoin, BorderDashArray); context,
Bounds.Size,
LayoutThickness,
CornerRadius,
Background,
BorderBrush,
BoxShadow);
} }
/// <summary> /// <summary>

8
src/Avalonia.Controls/Primitives/RangeBase.cs

@ -45,14 +45,14 @@ namespace Avalonia.Controls.Primitives
/// <summary> /// <summary>
/// Defines the <see cref="ValueChanged"/> event. /// Defines the <see cref="ValueChanged"/> event.
/// </summary> /// </summary>
public static readonly RoutedEvent<RoutedPropertyChangedEventArgs<double>> ValueChangedEvent = public static readonly RoutedEvent<RangeBaseValueChangedEventArgs> ValueChangedEvent =
RoutedEvent.Register<RangeBase, RoutedPropertyChangedEventArgs<double>>( RoutedEvent.Register<RangeBase, RangeBaseValueChangedEventArgs>(
nameof(ValueChanged), RoutingStrategies.Bubble); nameof(ValueChanged), RoutingStrategies.Bubble);
/// <summary> /// <summary>
/// Occurs when the <see cref="Value"/> property changes. /// Occurs when the <see cref="Value"/> property changes.
/// </summary> /// </summary>
public event EventHandler<RoutedPropertyChangedEventArgs<double>>? ValueChanged public event EventHandler<RangeBaseValueChangedEventArgs>? ValueChanged
{ {
add => AddHandler(ValueChangedEvent, value); add => AddHandler(ValueChangedEvent, value);
remove => RemoveHandler(ValueChangedEvent, value); remove => RemoveHandler(ValueChangedEvent, value);
@ -163,7 +163,7 @@ namespace Avalonia.Controls.Primitives
} }
else if (change.Property == ValueProperty) else if (change.Property == ValueProperty)
{ {
var valueChangedEventArgs = new RoutedPropertyChangedEventArgs<double>( var valueChangedEventArgs = new RangeBaseValueChangedEventArgs(
change.GetOldValue<double>(), change.GetOldValue<double>(),
change.GetNewValue<double>(), change.GetNewValue<double>(),
ValueChangedEvent); ValueChangedEvent);

47
src/Avalonia.Controls/Primitives/RangeBaseValueChangedEventArgs.cs

@ -0,0 +1,47 @@
using Avalonia.Interactivity;
namespace Avalonia.Controls.Primitives
{
/// <summary>
/// Provides data specific to a <see cref="RangeBase.ValueChanged"/> event.
/// </summary>
public class RangeBaseValueChangedEventArgs : RoutedEventArgs
{
/// <summary>
/// Initializes a new instance of the <see cref="RangeBaseValueChangedEventArgs"/> class.
/// </summary>
/// <param name="oldValue">The old value of the range value property.</param>
/// <param name="newValue">The new value of the range value property.</param>
/// <param name="routedEvent">The routed event associated with these event args.</param>
public RangeBaseValueChangedEventArgs(double oldValue, double newValue, RoutedEvent? routedEvent)
: base(routedEvent)
{
OldValue = oldValue;
NewValue = newValue;
}
/// <summary>
/// Initializes a new instance of the <see cref="RangeBaseValueChangedEventArgs"/> class.
/// </summary>
/// <param name="oldValue">The old value of the range value property.</param>
/// <param name="newValue">The new value of the range value property.</param>
/// <param name="routedEvent">The routed event associated with these event args.</param>
/// <param name="source">The source object that raised the routed event.</param>
public RangeBaseValueChangedEventArgs(double oldValue, double newValue, RoutedEvent? routedEvent, object? source)
: base(routedEvent, source)
{
OldValue = oldValue;
NewValue = newValue;
}
/// <summary>
/// Gets the old value of the range value property.
/// </summary>
public double OldValue { get; init; }
/// <summary>
/// Gets the new value of the range value property.
/// </summary>
public double NewValue { get; init; }
}
}

32
src/Avalonia.Controls/Shapes/Shape.cs

@ -126,8 +126,8 @@ namespace Avalonia.Controls.Shapes
/// </summary> /// </summary>
public IBrush? Fill public IBrush? Fill
{ {
get { return GetValue(FillProperty); } get => GetValue(FillProperty);
set { SetValue(FillProperty, value); } set => SetValue(FillProperty, value);
} }
/// <summary> /// <summary>
@ -135,8 +135,8 @@ namespace Avalonia.Controls.Shapes
/// </summary> /// </summary>
public Stretch Stretch public Stretch Stretch
{ {
get { return GetValue(StretchProperty); } get => GetValue(StretchProperty);
set { SetValue(StretchProperty, value); } set => SetValue(StretchProperty, value);
} }
/// <summary> /// <summary>
@ -144,8 +144,8 @@ namespace Avalonia.Controls.Shapes
/// </summary> /// </summary>
public IBrush? Stroke public IBrush? Stroke
{ {
get { return GetValue(StrokeProperty); } get => GetValue(StrokeProperty);
set { SetValue(StrokeProperty, value); } set => SetValue(StrokeProperty, value);
} }
/// <summary> /// <summary>
@ -153,8 +153,8 @@ namespace Avalonia.Controls.Shapes
/// </summary> /// </summary>
public AvaloniaList<double>? StrokeDashArray public AvaloniaList<double>? StrokeDashArray
{ {
get { return GetValue(StrokeDashArrayProperty); } get => GetValue(StrokeDashArrayProperty);
set { SetValue(StrokeDashArrayProperty, value); } set => SetValue(StrokeDashArrayProperty, value);
} }
/// <summary> /// <summary>
@ -162,8 +162,8 @@ namespace Avalonia.Controls.Shapes
/// </summary> /// </summary>
public double StrokeDashOffset public double StrokeDashOffset
{ {
get { return GetValue(StrokeDashOffsetProperty); } get => GetValue(StrokeDashOffsetProperty);
set { SetValue(StrokeDashOffsetProperty, value); } set => SetValue(StrokeDashOffsetProperty, value);
} }
/// <summary> /// <summary>
@ -171,8 +171,8 @@ namespace Avalonia.Controls.Shapes
/// </summary> /// </summary>
public double StrokeThickness public double StrokeThickness
{ {
get { return GetValue(StrokeThicknessProperty); } get => GetValue(StrokeThicknessProperty);
set { SetValue(StrokeThicknessProperty, value); } set => SetValue(StrokeThicknessProperty, value);
} }
/// <summary> /// <summary>
@ -180,8 +180,8 @@ namespace Avalonia.Controls.Shapes
/// </summary> /// </summary>
public PenLineCap StrokeLineCap public PenLineCap StrokeLineCap
{ {
get { return GetValue(StrokeLineCapProperty); } get => GetValue(StrokeLineCapProperty);
set { SetValue(StrokeLineCapProperty, value); } set => SetValue(StrokeLineCapProperty, value);
} }
/// <summary> /// <summary>
@ -189,8 +189,8 @@ namespace Avalonia.Controls.Shapes
/// </summary> /// </summary>
public PenLineJoin StrokeJoin public PenLineJoin StrokeJoin
{ {
get { return GetValue(StrokeJoinProperty); } get => GetValue(StrokeJoinProperty);
set { SetValue(StrokeJoinProperty, value); } set => SetValue(StrokeJoinProperty, value);
} }
public sealed override void Render(DrawingContext context) public sealed override void Render(DrawingContext context)

11
src/Avalonia.Controls/TextChangedEventArgs.cs

@ -3,15 +3,24 @@
namespace Avalonia.Controls namespace Avalonia.Controls
{ {
/// <summary> /// <summary>
/// Provides data specific to a TextChanged event. /// Provides data specific to a <see cref="TextBox.TextChanged"/> event.
/// </summary> /// </summary>
public class TextChangedEventArgs : RoutedEventArgs public class TextChangedEventArgs : RoutedEventArgs
{ {
/// <summary>
/// Initializes a new instance of the <see cref="TextChangedEventArgs"/> class.
/// </summary>
/// <param name="routedEvent">The routed event associated with these event args.</param>
public TextChangedEventArgs(RoutedEvent? routedEvent) public TextChangedEventArgs(RoutedEvent? routedEvent)
: base (routedEvent) : base (routedEvent)
{ {
} }
/// <summary>
/// Initializes a new instance of the <see cref="TextChangedEventArgs"/> class.
/// </summary>
/// <param name="routedEvent">The routed event associated with these event args.</param>
/// <param name="source">The source object that raised the routed event.</param>
public TextChangedEventArgs(RoutedEvent? routedEvent, Interactive? source) public TextChangedEventArgs(RoutedEvent? routedEvent, Interactive? source)
: base(routedEvent, source) : base(routedEvent, source)
{ {

11
src/Avalonia.Controls/TextChangingEventArgs.cs

@ -3,15 +3,24 @@
namespace Avalonia.Controls namespace Avalonia.Controls
{ {
/// <summary> /// <summary>
/// Provides data specific to a TextChanging event. /// Provides data specific to a <see cref="TextBox.TextChanging"/> event.
/// </summary> /// </summary>
public class TextChangingEventArgs : RoutedEventArgs public class TextChangingEventArgs : RoutedEventArgs
{ {
/// <summary>
/// Initializes a new instance of the <see cref="TextChangingEventArgs"/> class.
/// </summary>
/// <param name="routedEvent">The routed event associated with these event args.</param>
public TextChangingEventArgs(RoutedEvent? routedEvent) public TextChangingEventArgs(RoutedEvent? routedEvent)
: base (routedEvent) : base (routedEvent)
{ {
} }
/// <summary>
/// Initializes a new instance of the <see cref="TextChangingEventArgs"/> class.
/// </summary>
/// <param name="routedEvent">The routed event associated with these event args.</param>
/// <param name="source">The source object that raised the routed event.</param>
public TextChangingEventArgs(RoutedEvent? routedEvent, Interactive? source) public TextChangingEventArgs(RoutedEvent? routedEvent, Interactive? source)
: base(routedEvent, source) : base(routedEvent, source)
{ {

3
src/Avalonia.Themes.Fluent/Accents/BaseColorsPalette.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<!-- https://docs.microsoft.com/en-us/previous-versions/windows/apps/dn518235(v=win.10)?redirectedfrom=MSDN --> <!-- https://docs.microsoft.com/en-us/previous-versions/windows/apps/dn518235(v=win.10)?redirectedfrom=MSDN -->
<ResourceDictionary.ThemeDictionaries> <ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Default"> <ResourceDictionary x:Key="Default">

3
src/Avalonia.Themes.Fluent/Accents/BaseResources.xaml

@ -1,7 +1,8 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="using:System" xmlns:sys="using:System"
xmlns:converters="using:Avalonia.Controls.Converters"> xmlns:converters="using:Avalonia.Controls.Converters"
x:ClassModifier="internal">
<FontFamily x:Key="ContentControlThemeFontFamily">fonts:Inter#Inter, $Default</FontFamily> <FontFamily x:Key="ContentControlThemeFontFamily">fonts:Inter#Inter, $Default</FontFamily>
<sys:Double x:Key="ControlContentThemeFontSize">14</sys:Double> <sys:Double x:Key="ControlContentThemeFontSize">14</sys:Double>

3
src/Avalonia.Themes.Fluent/Accents/FluentControlResources.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<ResourceDictionary.ThemeDictionaries> <ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Default"> <ResourceDictionary x:Key="Default">
<!-- Resources for Button.xaml --> <!-- Resources for Button.xaml -->

2
src/Avalonia.Themes.Fluent/Avalonia.Themes.Fluent.csproj

@ -1,8 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks> <TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks>
<!-- NativeMenuBar uses ReflectionBinding -->
<NoWarn>$(NoWarn);IL2026</NoWarn>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Avalonia.Base\Avalonia.Base.csproj" /> <ProjectReference Include="..\Avalonia.Base\Avalonia.Base.csproj" />

3
src/Avalonia.Themes.Fluent/Controls/AdornerLayer.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<Thickness x:Key="SystemControlFocusVisualMargin">0</Thickness> <Thickness x:Key="SystemControlFocusVisualMargin">0</Thickness>
<Thickness x:Key="SystemControlFocusVisualPrimaryThickness">2</Thickness> <Thickness x:Key="SystemControlFocusVisualPrimaryThickness">2</Thickness>
<Thickness x:Key="SystemControlFocusVisualSecondaryThickness">1</Thickness> <Thickness x:Key="SystemControlFocusVisualSecondaryThickness">1</Thickness>

3
src/Avalonia.Themes.Fluent/Controls/AutoCompleteBox.xaml

@ -1,6 +1,7 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:generic="using:System.Collections.Generic"> xmlns:generic="using:System.Collections.Generic"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<Border Padding="20"> <Border Padding="20">
<AutoCompleteBox Width="200"> <AutoCompleteBox Width="200">

3
src/Avalonia.Themes.Fluent/Controls/Button.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<Border Padding="20"> <Border Padding="20">
<StackPanel Spacing="20"> <StackPanel Spacing="20">

3
src/Avalonia.Themes.Fluent/Controls/ButtonSpinner.xaml

@ -1,7 +1,8 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="using:System" xmlns:sys="using:System"
xmlns:converters="using:Avalonia.Controls.Converters"> xmlns:converters="using:Avalonia.Controls.Converters"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<Border Padding="20"> <Border Padding="20">
<StackPanel Spacing="20"> <StackPanel Spacing="20">

3
src/Avalonia.Themes.Fluent/Controls/Calendar.xaml

@ -6,7 +6,8 @@
--> -->
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<Border Padding="20"> <Border Padding="20">
<Calendar /> <Calendar />

3
src/Avalonia.Themes.Fluent/Controls/CalendarButton.xaml

@ -5,7 +5,8 @@
// All other rights reserved. // All other rights reserved.
--> -->
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<Border Padding="20"> <Border Padding="20">
<StackPanel Spacing="20"> <StackPanel Spacing="20">

3
src/Avalonia.Themes.Fluent/Controls/CalendarDatePicker.xaml

@ -1,6 +1,7 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="using:System"> xmlns:sys="using:System"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<Border Margin="20, 20, 20, 200"> <Border Margin="20, 20, 20, 200">
<CalendarDatePicker Width="200" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" /> <CalendarDatePicker Width="200" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" />

3
src/Avalonia.Themes.Fluent/Controls/CalendarDayButton.xaml

@ -5,7 +5,8 @@
// All other rights reserved. // All other rights reserved.
--> -->
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<Border Padding="20"> <Border Padding="20">
<StackPanel Spacing="20"> <StackPanel Spacing="20">

3
src/Avalonia.Themes.Fluent/Controls/CalendarItem.xaml

@ -6,7 +6,8 @@
--> -->
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="using:System"> xmlns:sys="using:System"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<Border Padding="20"> <Border Padding="20">
<Calendar DisplayDate="2000-01-01"> <Calendar DisplayDate="2000-01-01">

3
src/Avalonia.Themes.Fluent/Controls/CaptionButtons.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<Border Padding="20"> <Border Padding="20">
<StackPanel Spacing="20"> <StackPanel Spacing="20">

3
src/Avalonia.Themes.Fluent/Controls/Carousel.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<ControlTheme x:Key="{x:Type Carousel}" TargetType="Carousel"> <ControlTheme x:Key="{x:Type Carousel}" TargetType="Carousel">
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate> <ControlTemplate>

3
src/Avalonia.Themes.Fluent/Controls/CheckBox.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<Border Padding="20"> <Border Padding="20">
<StackPanel Spacing="20"> <StackPanel Spacing="20">

3
src/Avalonia.Themes.Fluent/Controls/ComboBox.xaml

@ -1,6 +1,7 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="using:System"> xmlns:sys="using:System"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<Border Padding="20"> <Border Padding="20">
<StackPanel Spacing="10"> <StackPanel Spacing="10">

3
src/Avalonia.Themes.Fluent/Controls/ComboBoxItem.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<Border Padding="20"> <Border Padding="20">
<Border Background="{DynamicResource ComboBoxDropDownBackground}" BorderBrush="{DynamicResource ComboBoxDropDownBorderBrush}" BorderThickness="{DynamicResource ComboBoxDropdownBorderThickness}" Margin="0,-1,0,-1" Padding="{DynamicResource ComboBoxDropdownBorderPadding}" CornerRadius="{DynamicResource OverlayCornerRadius}"> <Border Background="{DynamicResource ComboBoxDropDownBackground}" BorderBrush="{DynamicResource ComboBoxDropDownBorderBrush}" BorderThickness="{DynamicResource ComboBoxDropdownBorderThickness}" Margin="0,-1,0,-1" Padding="{DynamicResource ComboBoxDropdownBorderPadding}" CornerRadius="{DynamicResource OverlayCornerRadius}">

3
src/Avalonia.Themes.Fluent/Controls/ContentControl.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<ControlTheme x:Key="{x:Type ContentControl}" TargetType="ContentControl"> <ControlTheme x:Key="{x:Type ContentControl}" TargetType="ContentControl">
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate> <ControlTemplate>

3
src/Avalonia.Themes.Fluent/Controls/ContextMenu.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<Border Background="{DynamicResource SystemAccentColor}" <Border Background="{DynamicResource SystemAccentColor}"
Margin="16" Margin="16"

3
src/Avalonia.Themes.Fluent/Controls/DataValidationErrors.xaml

@ -1,7 +1,8 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="using:System" xmlns:sys="using:System"
xmlns:collections="using:System.Collections"> xmlns:collections="using:System.Collections"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<Border Padding="20"> <Border Padding="20">
<StackPanel Spacing="20"> <StackPanel Spacing="20">

3
src/Avalonia.Themes.Fluent/Controls/DatePicker.xaml

@ -7,7 +7,8 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="using:System"> xmlns:sys="using:System"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<Border Padding="20" Height="500"> <Border Padding="20" Height="500">
<StackPanel Spacing="20" VerticalAlignment="Center"> <StackPanel Spacing="20" VerticalAlignment="Center">

3
src/Avalonia.Themes.Fluent/Controls/DateTimePickerShared.xaml

@ -6,7 +6,8 @@
--> -->
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<Border Padding="20" Width="200"> <Border Padding="20" Width="200">
<StackPanel Spacing="20"> <StackPanel Spacing="20">

3
src/Avalonia.Themes.Fluent/Controls/DropDownButton.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<Border Padding="20"> <Border Padding="20">
<StackPanel Spacing="20"> <StackPanel Spacing="20">

3
src/Avalonia.Themes.Fluent/Controls/EmbeddableControlRoot.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<ControlTheme x:Key="{x:Type EmbeddableControlRoot}" TargetType="EmbeddableControlRoot"> <ControlTheme x:Key="{x:Type EmbeddableControlRoot}" TargetType="EmbeddableControlRoot">
<Setter Property="Foreground" Value="{DynamicResource SystemControlForegroundBaseHighBrush}"/> <Setter Property="Foreground" Value="{DynamicResource SystemControlForegroundBaseHighBrush}"/>
<Setter Property="Background" Value="{DynamicResource SystemRegionBrush}"/> <Setter Property="Background" Value="{DynamicResource SystemRegionBrush}"/>

3
src/Avalonia.Themes.Fluent/Controls/Expander.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<Border Padding="20"> <Border Padding="20">

3
src/Avalonia.Themes.Fluent/Controls/FluentControls.xaml

@ -1,6 +1,7 @@
<Styles <Styles
xmlns="https://github.com/avaloniaui" xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<Styles.Resources> <Styles.Resources>
<ResourceDictionary> <ResourceDictionary>
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>

3
src/Avalonia.Themes.Fluent/Controls/FlyoutPresenter.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<Thickness x:Key="FlyoutBorderThemeThickness">1</Thickness> <Thickness x:Key="FlyoutBorderThemeThickness">1</Thickness>
<ControlTheme x:Key="{x:Type FlyoutPresenter}" TargetType="FlyoutPresenter"> <ControlTheme x:Key="{x:Type FlyoutPresenter}" TargetType="FlyoutPresenter">
<Setter Property="HorizontalContentAlignment" Value="Stretch" /> <Setter Property="HorizontalContentAlignment" Value="Stretch" />

3
src/Avalonia.Themes.Fluent/Controls/GridSplitter.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<ControlTheme x:Key="{x:Type GridSplitter}" TargetType="GridSplitter"> <ControlTheme x:Key="{x:Type GridSplitter}" TargetType="GridSplitter">
<Setter Property="Focusable" Value="True" /> <Setter Property="Focusable" Value="True" />
<Setter Property="MinWidth" Value="6" /> <Setter Property="MinWidth" Value="6" />

3
src/Avalonia.Themes.Fluent/Controls/ItemsControl.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<ControlTheme x:Key="{x:Type ItemsControl}" TargetType="ItemsControl"> <ControlTheme x:Key="{x:Type ItemsControl}" TargetType="ItemsControl">
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate> <ControlTemplate>

3
src/Avalonia.Themes.Fluent/Controls/Label.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<ControlTheme x:Key="{x:Type Label}" TargetType="Label"> <ControlTheme x:Key="{x:Type Label}" TargetType="Label">
<Setter Property="Padding" Value="3"/> <Setter Property="Padding" Value="3"/>

3
src/Avalonia.Themes.Fluent/Controls/ListBox.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<Border Padding="20"> <Border Padding="20">
<ListBox> <ListBox>

3
src/Avalonia.Themes.Fluent/Controls/ListBoxItem.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<Border Padding="0"> <Border Padding="0">
<ListBox> <ListBox>

3
src/Avalonia.Themes.Fluent/Controls/ManagedFileChooser.xaml

@ -1,7 +1,8 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dialogs="using:Avalonia.Dialogs" xmlns:dialogs="using:Avalonia.Dialogs"
xmlns:internal="using:Avalonia.Dialogs.Internal"> xmlns:internal="using:Avalonia.Dialogs.Internal"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<Border Padding="20" Width="800" Height="500"> <Border Padding="20" Width="800" Height="500">
<dialogs:ManagedFileChooser/> <dialogs:ManagedFileChooser/>

3
src/Avalonia.Themes.Fluent/Controls/Menu.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<Border Padding="20"> <Border Padding="20">
<Menu> <Menu>

3
src/Avalonia.Themes.Fluent/Controls/MenuFlyoutPresenter.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<ControlTheme x:Key="{x:Type MenuFlyoutPresenter}" TargetType="MenuFlyoutPresenter"> <ControlTheme x:Key="{x:Type MenuFlyoutPresenter}" TargetType="MenuFlyoutPresenter">
<Setter Property="Background" Value="{DynamicResource MenuFlyoutPresenterBackground}" /> <Setter Property="Background" Value="{DynamicResource MenuFlyoutPresenterBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource MenuFlyoutPresenterBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource MenuFlyoutPresenterBorderBrush}" />

3
src/Avalonia.Themes.Fluent/Controls/MenuItem.xaml

@ -1,6 +1,7 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:conv="using:Avalonia.Controls.Converters"> xmlns:conv="using:Avalonia.Controls.Converters"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<Border Padding="20" Width="320"> <Border Padding="20" Width="320">
<StackPanel Spacing="20" HorizontalAlignment="Left"> <StackPanel Spacing="20" HorizontalAlignment="Left">

3
src/Avalonia.Themes.Fluent/Controls/MenuScrollViewer.xaml

@ -1,6 +1,7 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="using:Avalonia.Controls.Converters"> xmlns:converters="using:Avalonia.Controls.Converters"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<ScrollViewer Theme="{DynamicResource FluentMenuScrollViewer}" Width="200" Height="200"> <ScrollViewer Theme="{DynamicResource FluentMenuScrollViewer}" Width="200" Height="200">

3
src/Avalonia.Themes.Fluent/Controls/NativeMenuBar.xaml

@ -1,6 +1,7 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Avalonia.Themes.Fluent"> xmlns:local="using:Avalonia.Themes.Fluent"
x:ClassModifier="internal">
<local:IBitmapToImageConverter x:Key="AvaloniaThemesFluentNativeMenuBarIBitmapToImageConverter"/> <local:IBitmapToImageConverter x:Key="AvaloniaThemesFluentNativeMenuBarIBitmapToImageConverter"/>
<ControlTheme x:Key="{x:Type NativeMenuBar}" TargetType="NativeMenuBar"> <ControlTheme x:Key="{x:Type NativeMenuBar}" TargetType="NativeMenuBar">
<Setter Property="Template"> <Setter Property="Template">

3
src/Avalonia.Themes.Fluent/Controls/NotificationCard.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<Border Padding="0" Background="White"> <Border Padding="0" Background="White">
<NotificationCard Content="Testing" /> <NotificationCard Content="Testing" />

3
src/Avalonia.Themes.Fluent/Controls/NumericUpDown.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<Border Padding="20"> <Border Padding="20">
<StackPanel Spacing="20"> <StackPanel Spacing="20">

3
src/Avalonia.Themes.Fluent/Controls/OverlayPopupHost.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<ControlTheme x:Key="{x:Type OverlayPopupHost}" TargetType="OverlayPopupHost"> <ControlTheme x:Key="{x:Type OverlayPopupHost}" TargetType="OverlayPopupHost">
<Setter Property="Foreground" Value="{DynamicResource SystemControlForegroundBaseHighBrush}"/> <Setter Property="Foreground" Value="{DynamicResource SystemControlForegroundBaseHighBrush}"/>
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}"/> <Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}"/>

3
src/Avalonia.Themes.Fluent/Controls/PathIcon.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<StackPanel> <StackPanel>
<StackPanel.Resources> <StackPanel.Resources>

3
src/Avalonia.Themes.Fluent/Controls/PopupRoot.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<ControlTheme x:Key="{x:Type PopupRoot}" TargetType="PopupRoot"> <ControlTheme x:Key="{x:Type PopupRoot}" TargetType="PopupRoot">
<Setter Property="Background" Value="{x:Null}" /> <Setter Property="Background" Value="{x:Null}" />
<Setter Property="TransparencyLevelHint" Value="Transparent" /> <Setter Property="TransparencyLevelHint" Value="Transparent" />

3
src/Avalonia.Themes.Fluent/Controls/ProgressBar.xaml

@ -1,6 +1,7 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="using:Avalonia.Controls.Converters"> xmlns:converters="using:Avalonia.Controls.Converters"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<Border Padding="20"> <Border Padding="20">
<StackPanel Orientation="Horizontal" Spacing="10"> <StackPanel Orientation="Horizontal" Spacing="10">

3
src/Avalonia.Themes.Fluent/Controls/RadioButton.xaml

@ -1,4 +1,5 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<Border Padding="20"> <Border Padding="20">
<StackPanel Spacing="10"> <StackPanel Spacing="10">

3
src/Avalonia.Themes.Fluent/Controls/RefreshContainer.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<ControlTheme x:Key="{x:Type RefreshContainer}" <ControlTheme x:Key="{x:Type RefreshContainer}"
TargetType="RefreshContainer"> TargetType="RefreshContainer">
<Setter Property="Template"> <Setter Property="Template">

3
src/Avalonia.Themes.Fluent/Controls/RefreshVisualizer.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<ControlTheme x:Key="{x:Type RefreshVisualizer}" <ControlTheme x:Key="{x:Type RefreshVisualizer}"
TargetType="RefreshVisualizer"> TargetType="RefreshVisualizer">
<Setter Property="IsTabStop" Value="False"/> <Setter Property="IsTabStop" Value="False"/>

3
src/Avalonia.Themes.Fluent/Controls/RepeatButton.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<Border Padding="20"> <Border Padding="20">
<StackPanel Spacing="20"> <StackPanel Spacing="20">

3
src/Avalonia.Themes.Fluent/Controls/ScrollBar.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<Border Padding="20"> <Border Padding="20">
<StackPanel Orientation="Horizontal" Spacing="20"> <StackPanel Orientation="Horizontal" Spacing="20">

3
src/Avalonia.Themes.Fluent/Controls/ScrollViewer.xaml

@ -1,6 +1,7 @@
<ResourceDictionary <ResourceDictionary
xmlns="https://github.com/avaloniaui" xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<ScrollViewer Width="200" Height="200" <ScrollViewer Width="200" Height="200"
HorizontalScrollBarVisibility="Auto"> HorizontalScrollBarVisibility="Auto">

3
src/Avalonia.Themes.Fluent/Controls/SelectableTextBlock.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<SelectableTextBlock Text="Preview" /> <SelectableTextBlock Text="Preview" />
</Design.PreviewWith> </Design.PreviewWith>

3
src/Avalonia.Themes.Fluent/Controls/Separator.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<ControlTheme x:Key="{x:Type Separator}" TargetType="Separator"> <ControlTheme x:Key="{x:Type Separator}" TargetType="Separator">
<Setter Property="Background" Value="{DynamicResource SystemControlForegroundBaseMediumLowBrush}" /> <Setter Property="Background" Value="{DynamicResource SystemControlForegroundBaseMediumLowBrush}" />
<Setter Property="Focusable" Value="False" /> <Setter Property="Focusable" Value="False" />

3
src/Avalonia.Themes.Fluent/Controls/Slider.xaml

@ -1,6 +1,7 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="using:System"> xmlns:sys="using:System"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<Border Margin="20" Width="400" Height="600"> <Border Margin="20" Width="400" Height="600">
<DockPanel LastChildFill="True"> <DockPanel LastChildFill="True">

3
src/Avalonia.Themes.Fluent/Controls/SplitButton.xaml

@ -1,6 +1,7 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="using:Avalonia.Controls.Converters"> xmlns:converters="using:Avalonia.Controls.Converters"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<Border Padding="60"> <Border Padding="60">
<StackPanel Spacing="20"> <StackPanel Spacing="20">

3
src/Avalonia.Themes.Fluent/Controls/SplitView.xaml

@ -1,6 +1,7 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="using:System"> xmlns:sys="using:System"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<Border Width="400" Height="400"> <Border Width="400" Height="400">
<SplitView DisplayMode="Inline" <SplitView DisplayMode="Inline"

3
src/Avalonia.Themes.Fluent/Controls/TabControl.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<Border Width="400"> <Border Width="400">
<TabControl> <TabControl>

3
src/Avalonia.Themes.Fluent/Controls/TabItem.xaml

@ -1,6 +1,7 @@
<ResourceDictionary <ResourceDictionary
xmlns="https://github.com/avaloniaui" xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<Border Padding="20"> <Border Padding="20">
<StackPanel Spacing="20"> <StackPanel Spacing="20">

3
src/Avalonia.Themes.Fluent/Controls/TabStrip.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<Border Padding="20"> <Border Padding="20">
<TabStrip> <TabStrip>

3
src/Avalonia.Themes.Fluent/Controls/TabStripItem.xaml

@ -1,6 +1,7 @@
<ResourceDictionary <ResourceDictionary
xmlns="https://github.com/avaloniaui" xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<Border Padding="20"> <Border Padding="20">
<StackPanel Spacing="20"> <StackPanel Spacing="20">

3
src/Avalonia.Themes.Fluent/Controls/TextBox.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<Border Padding="20"> <Border Padding="20">
<StackPanel Spacing="20"> <StackPanel Spacing="20">

3
src/Avalonia.Themes.Fluent/Controls/ThemeVariantScope.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<ControlTheme x:Key="{x:Type ThemeVariantScope}" <ControlTheme x:Key="{x:Type ThemeVariantScope}"
TargetType="ThemeVariantScope"> TargetType="ThemeVariantScope">
<Setter Property="TextElement.Foreground" Value="{DynamicResource SystemControlForegroundBaseHighBrush}"/> <Setter Property="TextElement.Foreground" Value="{DynamicResource SystemControlForegroundBaseHighBrush}"/>

3
src/Avalonia.Themes.Fluent/Controls/TimePicker.xaml

@ -7,7 +7,8 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="using:System"> xmlns:sys="using:System"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<Border Padding="20" Height="500"> <Border Padding="20" Height="500">
<StackPanel Spacing="20" VerticalAlignment="Center"> <StackPanel Spacing="20" VerticalAlignment="Center">

3
src/Avalonia.Themes.Fluent/Controls/TitleBar.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<Border Height="30" Width="300"> <Border Height="30" Width="300">
<TitleBar Background="SkyBlue" Foreground="Black" /> <TitleBar Background="SkyBlue" Foreground="Black" />

3
src/Avalonia.Themes.Fluent/Controls/ToggleButton.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<Border Padding="20"> <Border Padding="20">
<StackPanel Spacing="20"> <StackPanel Spacing="20">

3
src/Avalonia.Themes.Fluent/Controls/ToggleSwitch.xaml

@ -1,6 +1,7 @@
<ResourceDictionary <ResourceDictionary
xmlns="https://github.com/avaloniaui" xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<StackPanel Margin="20" Width="250" Spacing="24"> <StackPanel Margin="20" Width="250" Spacing="24">
<StackPanel Spacing="12" > <StackPanel Spacing="12" >

3
src/Avalonia.Themes.Fluent/Controls/ToolTip.xaml

@ -1,6 +1,7 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="using:System"> xmlns:sys="using:System"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<Border Padding="20"> <Border Padding="20">
<StackPanel Spacing="20"> <StackPanel Spacing="20">

3
src/Avalonia.Themes.Fluent/Controls/TransitioningContentControl.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<ControlTheme x:Key="{x:Type TransitioningContentControl}" TargetType="TransitioningContentControl"> <ControlTheme x:Key="{x:Type TransitioningContentControl}" TargetType="TransitioningContentControl">
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate> <ControlTemplate>

3
src/Avalonia.Themes.Fluent/Controls/TreeView.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<Border Padding="20"> <Border Padding="20">
<StackPanel Spacing="20"> <StackPanel Spacing="20">

3
src/Avalonia.Themes.Fluent/Controls/TreeViewItem.xaml

@ -1,6 +1,7 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="using:Avalonia.Controls.Converters"> xmlns:converters="using:Avalonia.Controls.Converters"
x:ClassModifier="internal">
<Design.PreviewWith> <Design.PreviewWith>
<Border Padding="20" <Border Padding="20"

3
src/Avalonia.Themes.Fluent/Controls/UserControl.xaml

@ -1,6 +1,7 @@
<Style xmlns="https://github.com/avaloniaui" <Style xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Selector=":is(UserControl)"> Selector=":is(UserControl)"
x:ClassModifier="internal">
<Style.Resources> <Style.Resources>
<ControlTheme x:Key="FluentUserControl" TargetType="UserControl"> <ControlTheme x:Key="FluentUserControl" TargetType="UserControl">
<Setter Property="Template"> <Setter Property="Template">

3
src/Avalonia.Themes.Fluent/Controls/Window.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<ControlTheme x:Key="{x:Type Window}" TargetType="Window"> <ControlTheme x:Key="{x:Type Window}" TargetType="Window">
<Setter Property="Background" Value="{DynamicResource SystemRegionBrush}"/> <Setter Property="Background" Value="{DynamicResource SystemRegionBrush}"/>
<Setter Property="TransparencyBackgroundFallback" Value="{DynamicResource SystemControlBackgroundAltHighBrush}" /> <Setter Property="TransparencyBackgroundFallback" Value="{DynamicResource SystemControlBackgroundAltHighBrush}" />

3
src/Avalonia.Themes.Fluent/Controls/WindowNotificationManager.xaml

@ -1,6 +1,7 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:DataType="WindowNotificationManager"> x:DataType="WindowNotificationManager"
x:ClassModifier="internal">
<ControlTheme x:Key="{x:Type WindowNotificationManager}" TargetType="WindowNotificationManager"> <ControlTheme x:Key="{x:Type WindowNotificationManager}" TargetType="WindowNotificationManager">
<Setter Property="Margin" Value="0 0" /> <Setter Property="Margin" Value="0 0" />
<Setter Property="Template"> <Setter Property="Template">

3
src/Avalonia.Themes.Fluent/DensityStyles/Compact.xaml

@ -1,5 +1,6 @@
<Styles xmlns="https://github.com/avaloniaui" <Styles xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<Style Selector="TextBlock" > <Style Selector="TextBlock" >
<Setter Property="FontSize" Value="14" /> <Setter Property="FontSize" Value="14" />
</Style> </Style>

2
src/Avalonia.Themes.Fluent/FluentTheme.xaml

@ -2,7 +2,7 @@
xmlns="https://github.com/avaloniaui" xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:fluent="using:Avalonia.Themes.Fluent" xmlns:fluent="using:Avalonia.Themes.Fluent"
xmlns:accents="clr-namespace:Avalonia.Themes.Fluent.Accents"> xmlns:accents="using:Avalonia.Themes.Fluent.Accents">
<Styles.Resources> <Styles.Resources>
<ResourceDictionary> <ResourceDictionary>
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>

3
src/Avalonia.Themes.Simple/Accents/Base.xaml

@ -1,6 +1,7 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="using:System"> xmlns:sys="using:System"
x:ClassModifier="internal">
<ResourceDictionary.ThemeDictionaries> <ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Default"> <ResourceDictionary x:Key="Default">
<Color x:Key="ThemeBackgroundColor">#FFFFFFFF</Color> <Color x:Key="ThemeBackgroundColor">#FFFFFFFF</Color>

2
src/Avalonia.Themes.Simple/Avalonia.Themes.Simple.csproj

@ -1,8 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks> <TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks>
<!-- NativeMenuBar uses ReflectionBinding -->
<NoWarn>$(NoWarn);IL2026</NoWarn>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Avalonia.Base\Avalonia.Base.csproj" /> <ProjectReference Include="..\Avalonia.Base\Avalonia.Base.csproj" />

3
src/Avalonia.Themes.Simple/Controls/AdornerLayer.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<ControlTheme x:Key="{x:Type AdornerLayer}" TargetType="AdornerLayer"> <ControlTheme x:Key="{x:Type AdornerLayer}" TargetType="AdornerLayer">
<Setter Property="DefaultFocusAdorner"> <Setter Property="DefaultFocusAdorner">
<FocusAdornerTemplate> <FocusAdornerTemplate>

3
src/Avalonia.Themes.Simple/Controls/AutoCompleteBox.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<ControlTheme x:Key="{x:Type AutoCompleteBox}" <ControlTheme x:Key="{x:Type AutoCompleteBox}"
TargetType="AutoCompleteBox"> TargetType="AutoCompleteBox">
<Setter Property="Background" Value="{DynamicResource ThemeBackgroundBrush}" /> <Setter Property="Background" Value="{DynamicResource ThemeBackgroundBrush}" />

3
src/Avalonia.Themes.Simple/Controls/Button.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<ControlTheme x:Key="{x:Type Button}" <ControlTheme x:Key="{x:Type Button}"
TargetType="Button"> TargetType="Button">
<Setter Property="Background" Value="{DynamicResource ThemeControlMidBrush}" /> <Setter Property="Background" Value="{DynamicResource ThemeControlMidBrush}" />

3
src/Avalonia.Themes.Simple/Controls/ButtonSpinner.xaml

@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<ControlTheme x:Key="SimpleButtonSpinnerRepeatButton" <ControlTheme x:Key="SimpleButtonSpinnerRepeatButton"
BasedOn="{StaticResource {x:Type RepeatButton}}" BasedOn="{StaticResource {x:Type RepeatButton}}"

3
src/Avalonia.Themes.Simple/Controls/Calendar.xaml

@ -6,7 +6,8 @@
--> -->
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<ControlTheme x:Key="{x:Type Calendar}" <ControlTheme x:Key="{x:Type Calendar}"
TargetType="Calendar"> TargetType="Calendar">
<!--<Setter Property="Focusable" Value="False" />--> <!--<Setter Property="Focusable" Value="False" />-->

3
src/Avalonia.Themes.Simple/Controls/CalendarButton.xaml

@ -6,7 +6,8 @@
--> -->
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<ControlTheme x:Key="{x:Type CalendarButton}" <ControlTheme x:Key="{x:Type CalendarButton}"
TargetType="CalendarButton"> TargetType="CalendarButton">
<Setter Property="Foreground" Value="{DynamicResource ThemeForegroundBrush}" /> <Setter Property="Foreground" Value="{DynamicResource ThemeForegroundBrush}" />

3
src/Avalonia.Themes.Simple/Controls/CalendarDatePicker.xaml

@ -7,7 +7,8 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" <ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="using:System"> xmlns:sys="using:System"
x:ClassModifier="internal">
<ControlTheme x:Key="{x:Type CalendarDatePicker}" <ControlTheme x:Key="{x:Type CalendarDatePicker}"
TargetType="CalendarDatePicker"> TargetType="CalendarDatePicker">
<Setter Property="Background" Value="{DynamicResource ThemeBackgroundBrush}" /> <Setter Property="Background" Value="{DynamicResource ThemeBackgroundBrush}" />

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save