-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Avalonia Properties Page (#12562)
* feat: Avalonia Properties Page * fix: Address review * feat: Add EnableAvaloniaXamlCompilation * feat: Add AvaloniaXamlIlVerifyIl * fix: remove AvaloniaUseExternalMSBuild * fix: Default value * fix: Name Generator missing CompilerVisibleProperty * fix: Address review * fix: Address review * feat: Add HelpUrl * feat: Hide Name Generation options when AvaloniaNameGeneratorIsEnabled is false * fix: VisibilityCondition
- Loading branch information
1 parent
a2b7ca4
commit f430981
Showing
5 changed files
with
147 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Rule Name="Avalonia" DisplayName="Avalonia" Order="70" PageTemplate="generic" xmlns="http://schemas.microsoft.com/build/2009/properties"> | ||
|
||
<Rule.Categories> | ||
<Category Name="Compile" DisplayName="Compiling" /> | ||
<Category Name="Debug" DisplayName="Debug" /> | ||
<Category Name="NameGenerator" DisplayName="Name Generator" /> | ||
</Rule.Categories> | ||
|
||
<Rule.DataSource> | ||
<DataSource Persistence="ProjectFile" HasConfigurationCondition="false" Label="Avalonia" /> | ||
</Rule.DataSource> | ||
|
||
<!-- Compile --> | ||
|
||
<BoolProperty Name="EnableAvaloniaXamlCompilation" | ||
DisplayName="XAML Compiling" | ||
Description="Enable/Disable XAML Compiling" | ||
Category="Compile" /> | ||
|
||
<BoolProperty Name="AvaloniaXamlIlVerifyIl" | ||
DisplayName="Verify IL" | ||
Description="Enable/Disable Verify IL after XAML Compiling" | ||
Category="Compile" /> | ||
|
||
<BoolProperty Name="AvaloniaUseCompiledBindingsByDefault" | ||
DisplayName="Use CompiledBindings" | ||
Description="Use compiled bindings by default" | ||
HelpUrl="https://docs.avaloniaui.net/docs/next/basics/data/data-binding/compiled-bindings" | ||
Category="Compile" /> | ||
|
||
<!-- Debug --> | ||
|
||
<BoolProperty Name="AvaloniaXamlIlDebuggerLaunch" | ||
DisplayName="Debug XAML Compiler" | ||
Description="Allow debug XAML compilation" | ||
Category="Debug" /> | ||
|
||
<EnumProperty Name="AvaloniaXamlReportImportance" | ||
DisplayName="XAML Report Importance" | ||
Description="Provides levels of importance for XAML Compiler messages" | ||
Category="Debug"> | ||
<EnumValue Name="Low" DisplayName="Low" Description="Set XAML Compiler report message to Low importance" /> | ||
<EnumValue Name="Normal" DisplayName="Normal" Description="Set XAML Compiler report message to Normal importance" /> | ||
<EnumValue Name="High" DisplayName="High" Description="Set XAML Compiler report message to High importance" /> | ||
</EnumProperty> | ||
|
||
<!-- NameGenerator --> | ||
|
||
<BoolProperty Name="AvaloniaNameGeneratorIsEnabled" | ||
DisplayName="Use Name Generator" | ||
Description="Enable/Disable Avalonia Name Source Generator" | ||
HelpUrl="https://github.com/AvaloniaUI/Avalonia/blob/master/src/tools/Avalonia.Generators/README.md" | ||
Category="NameGenerator" /> | ||
|
||
<EnumProperty Name="AvaloniaNameGeneratorBehavior" | ||
DisplayName="Generator Behavior" | ||
Description="Customize behavior of name generator" | ||
Category="NameGenerator"> | ||
<EnumValue Name="InitializeComponent" DisplayName="InitializeComponent" Description="Generates get-only properties to access controls by name and an InitializeComponent method to set them automatically. This is closest to other XAML UI framework functionality" /> | ||
<EnumValue Name="OnlyProperties" DisplayName="OnlyProperties" Description="Generates get-only properties to access controls by name but does not generate an InitializeComponent method to set them. This allows custom InitializeComponent method implementations" /> | ||
<EnumProperty.Metadata> | ||
<NameValuePair Name="DependsOn" Value="Avalonia::AvaloniaNameGeneratorIsEnabled" /> | ||
<NameValuePair Name="VisibilityCondition"> | ||
<NameValuePair.Value>(has-evaluated-value "Avalonia" "AvaloniaNameGeneratorIsEnabled" True)</NameValuePair.Value> | ||
</NameValuePair> | ||
</EnumProperty.Metadata> | ||
</EnumProperty> | ||
|
||
<EnumProperty Name="AvaloniaNameGeneratorDefaultFieldModifier" | ||
DisplayName="Default Class Field/Property Modifier" | ||
Description="Defines the access modifiers used for generated members" | ||
Category="NameGenerator"> | ||
<EnumValue Name="Internal" DisplayName="Internal" Description="The type or member can be accessed by any code in the same assembly, but not from another assembly. In other words, internal types or members can be accessed from code that is part of the same compilation" /> | ||
<EnumValue Name="Public" DisplayName="Public" Description="The type or member can be accessed by any other code in the same assembly or another assembly that references it. The accessibility level of public members of a type is controlled by the accessibility level of the type itself" /> | ||
<EnumValue Name="Protected" DisplayName="Protected" Description="The type or member can be accessed only by code in the same class, or in a class that is derived from that class" /> | ||
<EnumValue Name="Private" DisplayName="Private" Description="TThe type or member can be accessed by types derived from the class that are declared within its containing assembly" /> | ||
<EnumProperty.Metadata> | ||
<NameValuePair Name="DependsOn" Value="Avalonia::AvaloniaNameGeneratorIsEnabled" /> | ||
<NameValuePair Name="VisibilityCondition"> | ||
<NameValuePair.Value>(has-evaluated-value "Avalonia" "AvaloniaNameGeneratorIsEnabled" True)</NameValuePair.Value> | ||
</NameValuePair> | ||
</EnumProperty.Metadata> | ||
</EnumProperty> | ||
|
||
<StringProperty Name="AvaloniaNameGeneratorFilterByPath" | ||
DisplayName="Filter By Path" | ||
Description="The generator will process only XAML files with paths matching the specified glob pattern(s). Example: */Views/*View.xaml, *View.axaml;*Control.axaml" | ||
Category="NameGenerator"> | ||
<StringProperty.Metadata> | ||
<NameValuePair Name="DependsOn" Value="Avalonia::AvaloniaNameGeneratorIsEnabled" /> | ||
<NameValuePair Name="VisibilityCondition"> | ||
<NameValuePair.Value>(has-evaluated-value "Avalonia" "AvaloniaNameGeneratorIsEnabled" True)</NameValuePair.Value> | ||
</NameValuePair> | ||
</StringProperty.Metadata> | ||
</StringProperty> | ||
|
||
<StringProperty Name="AvaloniaNameGeneratorFilterByNamespace" | ||
DisplayName="Filter By Namespace" | ||
Description="The generator will process only XAML files with base classes' namespaces matching the specified glob pattern(s). | ||
Example: MyApp.Presentation.*, MyApp.Presentation.Views;MyApp.Presentation.Controls" | ||
Category="NameGenerator"> | ||
<StringProperty.Metadata> | ||
<NameValuePair Name="DependsOn" Value="Avalonia::AvaloniaNameGeneratorIsEnabled" /> | ||
<NameValuePair Name="VisibilityCondition"> | ||
<NameValuePair.Value>(has-evaluated-value "Avalonia" "AvaloniaNameGeneratorIsEnabled" True)</NameValuePair.Value> | ||
</NameValuePair> | ||
</StringProperty.Metadata> | ||
</StringProperty> | ||
|
||
<EnumProperty Name="AvaloniaNameGeneratorViewFileNamingStrategy" | ||
DisplayName="File Naming Strategy" | ||
Description="Determines how the automatically generated view files should be named" | ||
Category="NameGenerator"> | ||
<EnumValue Name="ClassName" DisplayName="ClassName" Description="Only Class name" /> | ||
<EnumValue Name="NamespaceAndClassName" DisplayName="NamespaceAndClassName" Description="Namespace And ClassName" /> | ||
<EnumProperty.Metadata> | ||
<NameValuePair Name="DependsOn" Value="Avalonia::AvaloniaNameGeneratorIsEnabled" /> | ||
<NameValuePair Name="VisibilityCondition"> | ||
<NameValuePair.Value>(has-evaluated-value "Avalonia" "AvaloniaNameGeneratorIsEnabled" True)</NameValuePair.Value> | ||
</NameValuePair> | ||
</EnumProperty.Metadata> | ||
</EnumProperty> | ||
|
||
</Rule> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters