José Pedro
12bf8bd181
Fixed templated parent theme changed loop.
4 years ago
Julien Lebosquain
e1138f2cb6
Nullability fixes for Avalonia.Controls
4 years ago
Steven Kirk
6f03f1c3d6
Removed ITemplatedControl.
4 years ago
Steven Kirk
ec74057151
Removed a number of interfaces.
`IAvaloniaObject`, `IControl`, `ILayoutable`, `IPanel`, `IStyledElement`, `IVisual`.
4 years ago
Steven Kirk
326dac2328
Refactored how we switch control themes.
Instead of simply wiping all control themes and styles that are applied to a control, we can now just remove the `ValueFrame`s which relate to the control theme that was changed.
To do this, added `ValueFrame.FramePriority` which encodes both the `BindingPriority` and source of the frame (style, control theme, templated parent control theme).
4 years ago
Takoooooo
00c08235cc
Remove obsolete members from Avalonia.Controls assembly.
4 years ago
Steven Kirk
b1bee7961d
Detach control theme from template children.
4 years ago
Steven Kirk
71785b73d8
Initial refactor of AvaloniaObject value store.
Most (but not all) tests passing, all features mostly implemented exception coercion.
4 years ago
Steven Kirk
5da9d528c9
Added missing param docs.
4 years ago
Steven Kirk
78a7257a5a
Don't apply templated parent if already set.
When applying the `TemplatedParent`, don't move into trees that already have the `TemplatedParent` property set - in this case we can assume that the templated parent has already been set for this tree, and it fixes the problem with menus added in the previous commit.
4 years ago
Max Katz
49aad04861
Apply target's TemplatedParent to a Flyout and Tooltip, when it's opened ( #8412 )
* Apply target's TemplatedParent to a Flyout and Tooltip, when it's opened
* Add flyout and tooltip leak tests
* Fix Flyout_Is_Freed
4 years ago
Steven Kirk
4bdcb8eeea
Invalidate template control styles when Theme changes.
4 years ago
Steven Kirk
fc3c036b02
Move Theme to StyledElement.
The WPF equivalent (`Style`) is in `FrameworkElement` so it would make sense. Will also make stuff a lot easier and removes the need for an `IThemed` interface.
4 years ago
Steven Kirk
088d8cfc5c
Initial implementation of control themes.
4 years ago
robloo
197ab047a5
Add braces
4 years ago
Wiesław Šoltés
6af332b7d0
Use nameof in RoutedEvent.Register
4 years ago
Benedikt Stebner
b99e1b6b2c
Cleanup attached properties
4 years ago
Benedikt Stebner
9250d93407
Implement embedded runs
Improve text edit navigation
Implement IncrementalTabWidth
4 years ago
robloo
78a90a8340
Add comments for TemplatedControl.OnApplyTemplate()
5 years ago
Steven Kirk
d80cfbca18
Remove #nullable directives.
5 years ago
Steven Kirk
77d059be22
Add nullable annotations to Avalonia.Controls.
5 years ago
Max Katz
64922a34a9
Add CornerRadius to TemplatedControl and use it where possible
5 years ago
Dariusz Komosinski
a778800d2e
Remove boxing from TemplatedControl as well.
6 years ago
Steven Kirk
479d480ad9
Parameterize logger on area as well as level.
So we can filter our more logging calls early.
6 years ago
Steven Kirk
7022c137e7
Propagate ResourcesChanged to template children.
Makes `Changing_Resource_In_Templated_Parent_Should_Affect_Templated_Child` pass again.
6 years ago
Steven Kirk
f16f5713a9
Call obsolete method for compatibility.
6 years ago
Steven Kirk
2fcde9e34d
Use OnApplyTemplate instead of OnTemplateApplied.
- More similar to WPF API
- Less bug-prone (see #3744 )
`OnTemplateApplied` still exists, but is deprecated and does nothing.
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.
7 years ago
Dariusz Komosinski
a2c6bc1b7c
Remove usage of AddClassHandler that returns new lambda per invocation.
7 years ago
Dariusz Komosinski
5814bd7163
Remove direct logging functions.
7 years ago
Dariusz Komosinski
01a404836e
Reduce allocations caused by logging.
7 years ago
Nikita Tsukanov
fe5c1cec76
Use INameScope from IServiceProvider
7 years ago
Nikita Tsukanov
fa55755b71
Manually handle name scope registrations
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
Steven Kirk
e5cac827b1
Make TemplatedParent a direct property.
During initial layout, `TemplatedParent` is read tens of thousands of times. This being a styled property that used `inherits: true` meant that it was showing up in profiling as taking up a significant amount of time.
Make `TemplatedParent` a direct property so that reading it is a simple property access. This doesn't actually complicate the code much at all as once set the property value doesn't change, so `inherited: true` semantics are not that important.
8 years ago
Steven Kirk
95fe6f4cdf
Clear templated child's parent when template detached.
8 years ago
Benedikt Schroeder
3b308d8d19
Direct2D1 experimental
8 years ago
Steven Kirk
f8791ecad7
Make attached property accessors static.
9 years ago
Benedikt Schroeder
27a666467c
Initial
9 years ago
José Pedro
7cccc6bda0
Use nameof where possible.
9 years ago
Steven Kirk
a232b137b5
Allow reuse of existing tooltip popup.
To do this, had to fix a problem where templated children weren't notified of being re-attached to a logical tree.
9 years ago
Steven Kirk
3ee83263c8
Make indexer produce/consume IBinding.
10 years ago
Steven Kirk
72cb1cf311
Don't reapply templates unnecessarily.
When detaching and re-attaching to the same logical tree.
10 years ago
Steven Kirk
5be41985c3
Renamed Perspex -> Avalonia
10 years ago
Steven Kirk
a40f0be1d9
Make SolidColorBrush properly immutable.
Previous its color was immutable but because it inherited from Brush, its Opacity was mutable. This wasn't good, as it meant that e.g. Brushes.Red could be changed. Make it properly immutable by using the IBrush interface everywhere and not inheriting from Brush.
11 years ago
Steven Kirk
ea6b1d4cfd
Starting removing hard dependency on Serilog.
Instead log through a static Logger, and provide a Serilog consumer for
this.
11 years ago
Steven Kirk
1ae6b929b3
Think I've fixed the leak...
But I think it's showing up bugs elsewhere that need to be fixed.
11 years ago
Steven Kirk
d0efd0c6d4
Clear TemplatedParent of ex-template children.
This prevents them still being bound to their ex-TemplatedParent. Fixes
#435 .
11 years ago
Steven Kirk
d85a4eae16
Fixed typo.
11 years ago
Steven Kirk
b6c60cf334
Added FontWeight to TemplatedControl.
11 years ago