Browse Source

Merge pull request #11551 from AvaloniaUI/internalize-fluent-simple-theme

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

1
samples/Sandbox/Sandbox.csproj

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

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

@ -127,7 +127,7 @@ namespace Avalonia.Build.Tasks
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);
var resources = BuildResourceSources();

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

@ -288,6 +288,24 @@ namespace Avalonia.Build.Tasks
if (precompileText != "true")
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>()
.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))
throw new XamlParseException("x:Class should have a string value", classDirective);
classType = typeSystem.TargetAssembly.FindType(tn.Text);
if (classType == null)
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,
new XamlAstClrTypeReference(classDirective, classType, false));
initialRoot.Children.Remove(classDirective);
@ -312,6 +343,8 @@ namespace Avalonia.Build.Tasks
var classTypeDefinition =
classType == null ? null : typeSystem.GetTypeReference(classType).Resolve();
// All XAML files are public by default.
classModifierPublic ??= true;
var populateBuilder = classTypeDefinition == null ?
builder :
@ -319,10 +352,11 @@ namespace Avalonia.Build.Tasks
((List<XamlDocumentResource>)parsedXamlDocuments).Add(new XamlDocumentResource(
parsed, res.Uri, res, classType,
classModifierPublic.Value,
populateBuilder,
compiler.DefinePopulateMethod(populateBuilder, parsed, populateName,
classTypeDefinition == null),
buildName == null ? null : compiler.DefineBuildMethod(builder, parsed, buildName, true)));
classTypeDefinition == null && classModifierPublic.Value),
buildName == null ? null : compiler.DefineBuildMethod(builder, parsed, buildName, classModifierPublic.Value)));
}
catch (Exception e)
{
@ -368,7 +402,7 @@ namespace Avalonia.Build.Tasks
document.PopulateMethod,
document.BuildMethod,
builder.DefineSubType(compilerConfig.WellKnownTypes.Object, "NamespaceInfo:" + res.Name,
true),
document.IsPublic),
(closureName, closureBaseType) =>
populateBuilder.DefineSubType(closureBaseType, closureName, false),
(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 ?
null :

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

@ -1,5 +1,6 @@
<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 -->
<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Default">

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

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

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

@ -1,8 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks>
<!-- NativeMenuBar uses ReflectionBinding -->
<NoWarn>$(NoWarn);IL2026</NoWarn>
</PropertyGroup>
<ItemGroup>
<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"
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="SystemControlFocusVisualPrimaryThickness">2</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"
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>
<Border Padding="20">
<AutoCompleteBox Width="200">

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

@ -1,5 +1,6 @@
<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>
<Border Padding="20">
<StackPanel Spacing="20">

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

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

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

@ -6,7 +6,8 @@
-->
<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>
<Border Padding="20">
<Calendar />

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

@ -5,7 +5,8 @@
// All other rights reserved.
-->
<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>
<Border Padding="20">
<StackPanel Spacing="20">

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

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

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

@ -5,7 +5,8 @@
// All other rights reserved.
-->
<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>
<Border Padding="20">
<StackPanel Spacing="20">

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

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

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

@ -1,5 +1,6 @@
<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>
<Border Padding="20">
<StackPanel Spacing="20">

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

@ -1,5 +1,6 @@
<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">
<Setter Property="Template">
<ControlTemplate>

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

@ -1,5 +1,6 @@
<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>
<Border Padding="20">
<StackPanel Spacing="20">

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

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

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

@ -1,5 +1,6 @@
<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>
<Border Padding="20">
<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"
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">
<Setter Property="Template">
<ControlTemplate>

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

@ -1,5 +1,6 @@
<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>
<Border Background="{DynamicResource SystemAccentColor}"
Margin="16"

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

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

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

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

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

@ -6,7 +6,8 @@
-->
<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>
<Border Padding="20" Width="200">
<StackPanel Spacing="20">

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

@ -1,5 +1,6 @@
<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>
<Border Padding="20">
<StackPanel Spacing="20">

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

@ -1,5 +1,6 @@
<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">
<Setter Property="Foreground" Value="{DynamicResource SystemControlForegroundBaseHighBrush}"/>
<Setter Property="Background" Value="{DynamicResource SystemRegionBrush}"/>

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

@ -1,5 +1,6 @@
<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>
<Border Padding="20">

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

@ -1,6 +1,7 @@
<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">
<Styles.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>

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

@ -1,5 +1,6 @@
<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>
<ControlTheme x:Key="{x:Type FlyoutPresenter}" TargetType="FlyoutPresenter">
<Setter Property="HorizontalContentAlignment" Value="Stretch" />

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

@ -1,5 +1,6 @@
<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">
<Setter Property="Focusable" Value="True" />
<Setter Property="MinWidth" Value="6" />

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

@ -1,5 +1,6 @@
<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">
<Setter Property="Template">
<ControlTemplate>

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

@ -1,5 +1,6 @@
<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">
<Setter Property="Padding" Value="3"/>

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

@ -1,5 +1,6 @@
<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>
<Border Padding="20">
<ListBox>

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

@ -1,5 +1,6 @@
<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>
<Border Padding="0">
<ListBox>

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

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

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

@ -1,5 +1,6 @@
<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>
<Border Padding="20">
<Menu>

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

@ -1,5 +1,6 @@
<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">
<Setter Property="Background" Value="{DynamicResource MenuFlyoutPresenterBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource MenuFlyoutPresenterBorderBrush}" />

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

@ -1,6 +1,7 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
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>
<Border Padding="20" Width="320">
<StackPanel Spacing="20" HorizontalAlignment="Left">

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

@ -1,6 +1,7 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
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>
<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"
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"/>
<ControlTheme x:Key="{x:Type NativeMenuBar}" TargetType="NativeMenuBar">
<Setter Property="Template">

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

@ -1,5 +1,6 @@
<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>
<Border Padding="0" Background="White">
<NotificationCard Content="Testing" />

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

@ -1,5 +1,6 @@
<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>
<Border Padding="20">
<StackPanel Spacing="20">

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

@ -1,5 +1,6 @@
<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">
<Setter Property="Foreground" Value="{DynamicResource SystemControlForegroundBaseHighBrush}"/>
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}"/>

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

@ -1,5 +1,6 @@
<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>
<StackPanel>
<StackPanel.Resources>

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

@ -1,5 +1,6 @@
<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">
<Setter Property="Background" Value="{x:Null}" />
<Setter Property="TransparencyLevelHint" Value="Transparent" />

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

@ -1,6 +1,7 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
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>
<Border Padding="20">
<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>
<Border Padding="20">
<StackPanel Spacing="10">

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

@ -1,5 +1,6 @@
<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}"
TargetType="RefreshContainer">
<Setter Property="Template">

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

@ -1,5 +1,6 @@
<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}"
TargetType="RefreshVisualizer">
<Setter Property="IsTabStop" Value="False"/>

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

@ -1,5 +1,6 @@
<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>
<Border Padding="20">
<StackPanel Spacing="20">

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

@ -1,5 +1,6 @@
<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>
<Border Padding="20">
<StackPanel Orientation="Horizontal" Spacing="20">

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

@ -1,6 +1,7 @@
<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>
<ScrollViewer Width="200" Height="200"
HorizontalScrollBarVisibility="Auto">

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

@ -1,5 +1,6 @@
<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>
<SelectableTextBlock Text="Preview" />
</Design.PreviewWith>

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

@ -1,5 +1,6 @@
<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">
<Setter Property="Background" Value="{DynamicResource SystemControlForegroundBaseMediumLowBrush}" />
<Setter Property="Focusable" Value="False" />

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

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

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

@ -1,6 +1,7 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
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>
<Border Padding="60">
<StackPanel Spacing="20">

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

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

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

@ -1,5 +1,6 @@
<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>
<Border Width="400">
<TabControl>

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

@ -1,6 +1,7 @@
<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>
<Border Padding="20">
<StackPanel Spacing="20">

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

@ -1,5 +1,6 @@
<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>
<Border Padding="20">
<TabStrip>

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

@ -1,6 +1,7 @@
<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>
<Border Padding="20">
<StackPanel Spacing="20">

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

@ -1,5 +1,6 @@
<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>
<Border Padding="20">
<StackPanel Spacing="20">

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

@ -1,5 +1,6 @@
<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}"
TargetType="ThemeVariantScope">
<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"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="using:System">
xmlns:sys="using:System"
x:ClassModifier="internal">
<Design.PreviewWith>
<Border Padding="20" Height="500">
<StackPanel Spacing="20" VerticalAlignment="Center">

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

@ -1,5 +1,6 @@
<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>
<Border Height="30" Width="300">
<TitleBar Background="SkyBlue" Foreground="Black" />

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

@ -1,5 +1,6 @@
<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>
<Border Padding="20">
<StackPanel Spacing="20">

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

@ -1,6 +1,7 @@
<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>
<StackPanel Margin="20" Width="250" Spacing="24">
<StackPanel Spacing="12" >

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

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

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

@ -1,5 +1,6 @@
<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">
<Setter Property="Template">
<ControlTemplate>

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

@ -1,5 +1,6 @@
<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>
<Border Padding="20">
<StackPanel Spacing="20">

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

@ -1,6 +1,7 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
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>
<Border Padding="20"

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

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

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

@ -1,5 +1,6 @@
<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">
<Setter Property="Background" Value="{DynamicResource SystemRegionBrush}"/>
<Setter Property="TransparencyBackgroundFallback" Value="{DynamicResource SystemControlBackgroundAltHighBrush}" />

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

@ -1,6 +1,7 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
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">
<Setter Property="Margin" Value="0 0" />
<Setter Property="Template">

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

@ -1,5 +1,6 @@
<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" >
<Setter Property="FontSize" Value="14" />
</Style>

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

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

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

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

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

@ -1,8 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks>
<!-- NativeMenuBar uses ReflectionBinding -->
<NoWarn>$(NoWarn);IL2026</NoWarn>
</PropertyGroup>
<ItemGroup>
<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"
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">
<Setter Property="DefaultFocusAdorner">
<FocusAdornerTemplate>

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

@ -1,5 +1,6 @@
<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}"
TargetType="AutoCompleteBox">
<Setter Property="Background" Value="{DynamicResource ThemeBackgroundBrush}" />

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

@ -1,5 +1,6 @@
<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}"
TargetType="Button">
<Setter Property="Background" Value="{DynamicResource ThemeControlMidBrush}" />

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

@ -1,5 +1,6 @@
<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"
BasedOn="{StaticResource {x:Type RepeatButton}}"

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

@ -6,7 +6,8 @@
-->
<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}"
TargetType="Calendar">
<!--<Setter Property="Focusable" Value="False" />-->

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

@ -6,7 +6,8 @@
-->
<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}"
TargetType="CalendarButton">
<Setter Property="Foreground" Value="{DynamicResource ThemeForegroundBrush}" />

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

@ -7,7 +7,8 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
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}"
TargetType="CalendarDatePicker">
<Setter Property="Background" Value="{DynamicResource ThemeBackgroundBrush}" />

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

@ -6,7 +6,8 @@
-->
<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 CalendarDayButton}"
TargetType="CalendarDayButton">
<Setter Property="Background" Value="{DynamicResource ThemeAccentBrush2}" />

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

@ -6,7 +6,8 @@
-->
<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 CalendarItem}"
TargetType="CalendarItem">
<Setter Property="CornerRadius" Value="1" />

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

@ -1,5 +1,6 @@
<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>
<Border Padding="20">
<StackPanel Spacing="20">

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

@ -1,5 +1,6 @@
<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">
<Setter Property="Template">
<ControlTemplate>

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

@ -1,5 +1,6 @@
<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 CheckBox}"
TargetType="CheckBox">
<Setter Property="Foreground" Value="{DynamicResource ThemeForegroundBrush}" />

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

@ -1,5 +1,6 @@
<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 ComboBox}"
TargetType="ComboBox">
<Setter Property="Background" Value="Transparent" />

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

@ -1,5 +1,6 @@
<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 ComboBoxItem}"
TargetType="ComboBoxItem">
<Setter Property="Background" Value="Transparent" />

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

@ -1,5 +1,6 @@
<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">
<Setter Property="Template">

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

@ -1,5 +1,6 @@
<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 ContextMenu}"
TargetType="ContextMenu">
<Setter Property="Background" Value="{DynamicResource ThemeBackgroundBrush}" />

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

@ -1,5 +1,6 @@
<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 DataValidationErrors}"
TargetType="DataValidationErrors">
<Setter Property="Template">

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

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

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

@ -6,7 +6,8 @@
-->
<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>
<Border Width="200"
Padding="20">

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

@ -1,5 +1,6 @@
<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 DropDownButton}"
TargetType="DropDownButton">
<Setter Property="Background" Value="{DynamicResource ThemeControlMidBrush}" />

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

Loading…
Cancel
Save