Steven Kirk
3882bc0217
Remove ControlTemplateResult.
Use `TempateResult<Control>` instead as described in #6666 .
Fixes #10525 .
3 years ago
Dan Walmsley
071691a764
fix typo
3 years ago
Steven Kirk
1135895b73
Make Classes properties readonly.
Makes the `StyledElement.Classes` and `Flyout.FlyoutPresenterClasses` properties readonly. Adds a transformer to the XAML compiler to convert attribute syntax classes setters to collection syntax so that they will be added to the existing `Classes` object.
Prevents an unneeded allocation of a `Classes` object when setting `Classes` from XAML.
3 years ago
Steven Kirk
1a3b8fbcac
Don't allow binding to `ItemsControl.Items`.
Depends on https://github.com/kekekeks/XamlX/pull/85 : this PR disallows invoking "collection behavior" for property setters when using attribute syntax.
Required adding a `Flyout.FlyoutPresenterClasses` setter. This property was previously buggy without the setter (see https://github.com/AvaloniaUI/Avalonia/issues/10946#issuecomment-1506563268 ). Added tests for setting classes that I put in place when investigating this.
Fixes #10946
3 years ago
Steven Kirk
060e290fc1
Revert "Support multiple `InheritDataTypeFromItems`."
This reverts commit 57c997bed7 .
3 years ago
Julien Lebosquain
aa55ad2329
Addressed feedback on PR #10608
3 years ago
Julien Lebosquain
e3c1cbd2e0
Nullable annotations for Markup.Xaml
3 years ago
Steven Kirk
57c997bed7
Support multiple `InheritDataTypeFromItems`.
To allow binding both `ItemsControl.Items` and `ItemsSource` we need to support multiple `InheritDataTypeFromItems` attributes.
3 years ago
Tom Edwards
81530c4231
Converted a variety of writeable DirectProperty definitions to StyledProperty
3 years ago
Max Katz
29d92f75dc
Fix Relative Source with {x:Type} bindings
3 years ago
Julien Lebosquain
765bce78d7
Avoid unneeded allocations in CompiledBindingPath
3 years ago
Nikita Tsukanov
8280b83e95
Automatically dispatch PropertyChanged notification to the UI thread
3 years ago
Dmitry Zhelnin
69b3db42a2
Cleanup attributes
Enable rules CA1018: Mark attributes with AttributeUsageAttribute; CA1813: Avoid unsealed attributes
3 years ago
Max Katz
f2050c868a
Extract theme related properties to IThemeVariantHost and move property definitions to ThemeVariantScope
3 years ago
Max Katz
35662ad4cb
Allow only well known ThemeVariant values in xaml compiler, add more documentation.
3 years ago
Dmitry Zhelnin
0b726e1eff
add Style and ControlTheme to WellKnownTypes
3 years ago
Dmitry Zhelnin
a2c7f67c41
throw XamlParseException if there are duplicate property setters in style or control theme
3 years ago
Max Katz
90f48b040b
Update src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/XamlIlBindingPathHelper.cs
3 years ago
Max Katz
6e271ed069
Fix test cases with DataTemplates
3 years ago
Max Katz
e9a01c6c21
Update naming
3 years ago
Max Katz
d8d2240ecb
Implement support for DataTypeInheritFromAttribute
3 years ago
Steven Kirk
0065a962ac
Move ItemsRepeater to separate assembly.
3 years ago
Max Katz
2d1d27bc2e
Fix TemplateBinding with converter inside of MultiBinding
3 years ago
Steven Kirk
17c3291c80
Remove StyledPropertyBase class.
Originally `StyledPropertyBase` was the base class for `StyledProperty` and `AttachedProperty` however #1499 made `AttachedProperty` derive directly from `StyledProperty` meaning that there is no longer any need for a separate `StyledPropertyBase` class.
3 years ago
Steven Kirk
67c9221d3c
Tweaked InstancedBinding API.
- Remove `Value` from the API, will always contain an `IObservable<object?>` from now
- Remove subject from the API, caller can try to cast the observable itself
3 years ago
Steven Kirk
cb8a21fb83
Make ExpressionNode (and derived) internal.
3 years ago
Steven Kirk
7788a29a96
Make BindingExpression and ExpressionObserver internal.
3 years ago
Max Katz
bd9c9783ab
Parse ThemeVariant compile time and merge ThemeDictionaries
3 years ago
Max Katz
253ecd028d
Introduce ThemeVariant API
3 years ago
Max Katz
a78b0edd42
Changes after review
3 years ago
Simon Cropp
4ab3eb1064
.
3 years ago
Simon Cropp
fb37ab1e77
leverage GetRequiredService
3 years ago
Simon Cropp
dba476c11c
fix more typos
3 years ago
Simon Cropp
f84cdbeda9
respect success in LoadGroupSre
3 years ago
Max Katz
ab64b33470
Remove IRuntimePlatform.OperatingSystem API and replace with trimmable OperatingSystem API
3 years ago
Max Katz
9f633b8411
Fix OnPlatform-like extensions with a single input parameter
3 years ago
Max Katz
8a78f134c5
Remove JetBrains.Annotations from the repo
3 years ago
Max Katz
59d7874b1d
Replace System.Reactive with internal extensions
3 years ago
Steven Kirk
f371f18870
Use correct submodule commit.
Somehow got changed to an older commit.
3 years ago
Max Katz
19b9cd2ee6
Inherit ResourceInclude from the MergeResourceInclude
3 years ago
Max Katz
60159ffb59
Update documentation and add missing trimming attribute
3 years ago
Steven Kirk
d7201d28e6
Removed IItemsPresenterHost.
3 years ago
Steven Kirk
4a92fadd34
Fix StyleIncludeTests.
Wasn't finding `RelativeSource` type at times.
3 years ago
Max Katz
ba1c4dcc1b
Switch to upstream xamlx
3 years ago
Max Katz
bdceb1c3df
Do not require matching ctor, if top level element
3 years ago
Max Katz
5bdbca1fad
Fix build
3 years ago
Max Katz
526d9d052b
Avalonia.Base and controls related project trimming attributes
3 years ago
Giuseppe Lippolis
2aa79269e8
fix: Address reviw
3 years ago
Max Katz
6ed60610c9
Add ServiceProvider to the xaml runtime loader too
3 years ago
robloo
1bb84cab7c
Ensure invariant culture in relevant string interpolation
3 years ago