Lehonti Ramos
d1444b4f7c
Modernized accessor syntax in several places ( #13044 )
* Modernized accessor syntax in several places
* Toned down the getter modernization
* Block body for properties with code
---------
Co-authored-by: Lehonti Ramos <lehonti@ramos>
3 years ago
Max Katz
89e1680501
Fix DefinitionList parsing
3 years ago
Steven Kirk
3882bc0217
Remove ControlTemplateResult.
Use `TempateResult<Control>` instead as described in #6666 .
Fixes #10525 .
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
f8eceb4af9
Update usages of ItemsControl Items/ItemsSource.
- Use `ItemsSource` when appropriate
- When `Items` is appropriate, don't use the setter
3 years ago
Max Katz
d5a5efa90c
Fix tests after style changes
3 years ago
Max Katz
be22b361c8
Add theme variants specific tests
3 years ago
Simon Cropp
dba476c11c
fix more typos
3 years ago
Max Katz
bdceb1c3df
Do not require matching ctor, if top level element
3 years ago
Max Katz
c8120fbbe7
Update tests with "LoadGroup" method instead of assetloader hacks
3 years ago
Steven Kirk
086c2c7e70
Don't apply styling in TopLevel ctor.
Applying styling in the constructor isn't a good idea as demonstrated by #8549..
Instead apply styling when showing a window, or if it's needed call `ApplyStyling` manually, e.g. in unit tests.
Fixes #8549
4 years ago
Max Katz
fcf26fe4f2
Inject generated types into Ref assembly as well
3 years ago
Max Katz
1731f88822
Rename Default to Simple
4 years ago
Max Katz
33931e99bb
Fix unit tests
4 years ago
Benedikt Stebner
fdb19912b8
Fix tests
4 years ago
Benedikt Stebner
1408e52199
Add IAddChild support
4 years ago
Benedikt Stebner
9250d93407
Implement embedded runs
Improve text edit navigation
Implement IncrementalTabWidth
4 years ago
Benedikt Stebner
95769ff007
Add TextBlock inlines support
4 years ago
Steven Kirk
a26059630f
Add failing test for control template value priority.
Add tests to check that template values are assigned with Style priority and move other XAML control template tests alongside it in a new test class.
4 years ago
Steven Kirk
ddb8f9c7de
Update unit tests to use new default theme URLs.
4 years ago
Dariusz Komosinski
cca1d4abc4
Fix even more tests.
5 years ago
Nikita Tsukanov
d355007c57
Extracted runtime XAML loader to a separate package
6 years ago
Steven Kirk
4d01dacd77
Remove copyright headers.
Some of our files had them, some didn't. They serve no purpose legally so best to remove the ceremony.
6 years ago
Andrey Kunchev
b1cc2a1d9c
enable valid xamlil test (disabled before because of portable.xaml)
6 years ago
Andrey Kunchev
a04d0b7bbb
add failing test for ControlTemplate don't respect TargetType
6 years ago
Steven Kirk
a6c9086782
Fix flaky XAML tests.
Make tests that load XAML inherit from `XamlTestBase` which ensures that `Avalonia.Markup` is loaded.
7 years ago
Nikita Tsukanov
fe5c1cec76
Use INameScope from IServiceProvider
7 years ago
Steven Kirk
0225023d53
Added failing tests for #2372 .
7 years ago
Nikita Tsukanov
76f9c8fdc5
Removed legacy XAML loader
7 years ago
Steven Kirk
9d99cf699a
Remove test that is no longer true.
`UserControl`s should no longer be added to parent namescope.
7 years ago
Steven Kirk
208361b8fa
Don't register controls with parent namescope.
This reverts the changes in #843 because they were causing problems, as described by #2512 .
This should however not cause #829 to reappear because since #843 was merged we moved to Portable.Xaml and we're now registering controls with the root namescope in the XAML engine: b4577a1631/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaXamlObjectWriter.cs (L67)
Fixes #2512
7 years ago
Nikita Tsukanov
fe251ee1aa
Support for properties "attached" by AddOwner
7 years ago
Nikita Tsukanov
ece2199d57
Disable tests checking that read-only properties can be set
7 years ago
Nikita Tsukanov
d0301bb4c4
Now passing most of the tests
7 years ago
Nikita Tsukanov
4c7551b9fa
CECIL
7 years ago
Nikita Tsukanov
04228b6d03
Support for mc:Ignorable + d:DataContext
8 years ago
Steven Kirk
b8f127fce7
Reimplemented TemplateBinding.
Rather than just use a standard `Binding`, make `TemplateBinding` a lightweight binding in the case where the binding is simply to a property on the templated parent.
8 years ago
Jeremy Koritzinsky
b38b46a280
PR Feedback.
8 years ago
Jeremy Koritzinsky
cf8244b37a
Move current contents of Avalonia.Markup to Avalonia.Base. Move Avalonia.Markup.Xaml.Data/Parser classes to Avalonia.Markup since they're not Xaml-specific.
Use pattern-matching switch.
Fix bug from cleanup.
8 years ago
Steven Kirk
71c3cb3b72
Added failing assert for #1559 .
8 years ago
Steven Kirk
6dfd705660
Added failing test for #1548 .
Caused by a bug in Portable.Xaml: https://github.com/cwensley/Portable.Xaml/issues/95
8 years ago
Steven Kirk
bdc8100961
Fix failing tests.
8 years ago
Steven Kirk
7b4cd4f96d
Modify/add tests for non-registered properties.
We should change to the behavior of other XAML frameworks where non-registered `AvaloniaProperty`s can be set on `AvaloniaObject`s via code.
8 years ago
Steven Kirk
d01e19e3f4
Added failing test for #1275 .
8 years ago
Steven Kirk
5cc5b91930
Fix xunit warnings.
9 years ago
Nikita Tsukanov
9152cbbe72
Added a unit test for attached properties with namespace
9 years ago
Jeremy Koritzinsky
3b1b3cb9cd
Change test logic to working version.
9 years ago
Jeremy Koritzinsky
8d22a25a66
Bring back original logic of test. Still trying to figure out what's going on.
9 years ago
Jeremy Koritzinsky
b0a1f3f3df
Update tests to use `x:Static`.
9 years ago