Steven Kirk
7ac3556983
Fixed StackPanel arrange pass.
Now follow's WPF's behavior better. In order to get the desired outcome, the `.Constrain(availableSize)` call in `Layoutable.Measure` had to be removed. Controls that relied on that (`Image` and `ViewBox`) have to now call `Constrain` themselves.
Fixes #2350
7 years ago
Steven Kirk
f39e38545d
Use inner methods for invalidation.
8 years ago
Steven Kirk
c7b42d1326
Add the old overloads back in.
And mark them as `[Obsolete]`.
8 years ago
Steven Kirk
fad2e317ba
Make AffectsMeasure/Arrange/Render typed.
8 years ago
Miha Markič
0a38876590
Spellchecks all projects except for Base, Controls, Samples and Testing
8 years ago
Nikita Tsukanov
35f353c2db
Use OnMeasureInvalidated instead of virtual InvalidateMeasure
9 years ago
Steven Kirk
5a34acac2d
Don't need to do this.
We don't need to invalidate newly added controls with the layout manager - this is already handed by the parent control.
9 years ago
Steven Kirk
40c342989b
Assert control invalidation behavior.
Controls not attached to the visual tree should not notify the `LayoutManager` that they have had their layout invalidated. Similarly when added to the visual tree their parents and themselves should have their layout invalidated.
9 years ago
Nikita Tsukanov
09c9d7b7d5
Layout integration seems to be working now
9 years ago
Nikita Tsukanov
317b0f7034
testtesttest
9 years ago
Nikita Tsukanov
3126901721
WPF embedding improvements
9 years ago
Nikita Tsukanov
eb6bfd3de8
Moved layout manager from service locator to ILayoutRoot
9 years ago
Steven Kirk
4730ee1c41
Fix spelling of descendant.
While "descendent" is an acceptable English spelling, "descendant" is the common spelling.
9 years ago
Steven Kirk
16a47dac61
Apply margin before width/height.
Fixes #993 .
9 years ago
Steven Kirk
cfd2be07ec
Added LayoutUpdated event.
Fixes #825 .
9 years ago
Steven Kirk
c554467d13
Invalidate measure when control removed
When a control's parent changes, invalidate its measure and the measure
of all descendents.
10 years ago
Steven Kirk
5be41985c3
Renamed Perspex -> Avalonia
10 years ago
Steven Kirk
46c93b70bf
Fix layout error.
10 years ago
Steven Kirk
75e13dc02b
Fix arrange size with margins.
Fixes #432 .
10 years ago
Steven Kirk
ea6b1d4cfd
Starting removing hard dependency on Serilog.
Instead log through a static Logger, and provide a Serilog consumer for
this.
10 years ago
Steven Kirk
5802040d3e
Optimize ContentPresenter.
Make ContentPresenter have many of Border's properties so that every
instance of a ContentPresenter doesn't need to be wrapped in a Border.
Idea stolen from UWP.
10 years ago
Steven Kirk
a70c5aaa44
Invalidate visual on invalidate measure/arrange.
10 years ago
Steven Kirk
93b4d810b9
Moved scaling to per-window.
Always returning a scaling factor of 1 currently.
10 years ago
Steven Kirk
d460ec9fd0
Implemented basic layout scaling.
Maybe works... I don't have a high DPI monitor to test on...
10 years ago
Steven Kirk
d8725286aa
Fix layout bug with ScrollViewer.
When calling Measure from Arrange, use previous measure constraint if
available.
10 years ago
Steven Kirk
f7f2fc65b7
Make Arrange call Measure if !IsMeasureValid.
To follow WPF. Also removed force parameter from Arrange and fixed
Decorator measure invalidation.
10 years ago
Steven Kirk
5489487131
Make LayoutManager global.
Also made a few other changes along the way:
- Add MaxClientSize to ILayoutRoot
- Store IRenderRoot in Visual and use that to calculate
IsAttachedToVisualTree
- Make Affects* methods take multiple properties
10 years ago
Steven Kirk
72baba2f0e
Removed 'force' parameter from Measure.
10 years ago
Steven Kirk
b310ead6a1
Removed 'distance' argument to LayoutManager.
No longer needed.
10 years ago
Steven Kirk
0e2cee8810
Overhauled layout system.
From lessons learnt from porting moonlight's Grid tests. Instead of
making a child invalidate its parents directly, send a message from the
child to the parent when its DesiredSize changes. LayoutManager also
needed rewriting to allow this.
10 years ago
Steven Kirk
1202eaa876
Updated PerspexProperties to new classes
i.e. AttachedProperty, DirectProperty or StyledProperty.
10 years ago
Steven Kirk
928e159aba
Added DesiredSize as a readonly PP.
10 years ago
Steven Kirk
7925fa8c65
Cache Margin in MeasureCore.
11 years ago
Steven Kirk
4ef9639f3e
Removed LINQ from MeasureOverride.
And removed empty MeasureOverride methods.
11 years ago
Steven Kirk
9ad94743c0
Fix small layout bug with UseLayoutRounding.
11 years ago
Steven Kirk
8e2830ad05
Don't return negative size from Measure.
In the case of a negative margin larger than the available size.
11 years ago
Steven Kirk
67835cc09b
Applied a bunch of resharper suggestions.
11 years ago
Steven Kirk
01a5b5a345
Fix clipping with UseLayoutRounding.
11 years ago
José Manuel Nieto Sánchez
b3b2b0db60
Fixed issue https://github.com/Perspex/Perspex/issues/169
11 years ago
Nikita Tsukanov
3cd3579475
"field can be readonly"
11 years ago
Nikita Tsukanov
21a3554260
Change property getter to expression properties
11 years ago
Nikita Tsukanov
01e2c90bc5
Removed this.
11 years ago
Steven Kirk
145411020b
Ran .net core code formatter.
11 years ago
Steven Kirk
6151aef188
Removed file headers.
11 years ago
Steven Kirk
6167bacf54
Moved to more standard filesystem layout.
Based on https://gist.github.com/davidfowl/ed7564297c61fe9ab814 and https://github.com/fsprojects/ProjectScaffold
11 years ago
Steven Kirk
1c58e1554f
Removed extra call to ArrangeOverride.
Not sure how that crept in there!
11 years ago
Steven Kirk
f1a15335aa
Documented Layoutable and friends.
11 years ago
Steven Kirk
09d6e22f5e
Fix scrollable controls in XAML.
11 years ago
Steven Kirk
aa147f0423
More stylecoping.
11 years ago
Steven Kirk
2763e59adb
Use serilog for logging.
11 years ago