4 using SiliconStudio.Core;
5 using System.Diagnostics;
6 using SiliconStudio.Core.Mathematics;
8 namespace SiliconStudio.
Paradox.UI.Controls
13 [DebuggerDisplay(
"ContentPresenter - Name={Name}")]
20 if(oldContent == presenter.Content)
23 if (oldContent != null)
24 SetVisualParent(oldContent, null);
26 if (presenter.Content != null)
27 SetVisualParent(presenter.Content, presenter);
29 presenter.InvalidateMeasure();
37 private Matrix contentWorldMatrix;
49 get {
return DependencyProperties.Get(ContentPropertyKey); }
50 set { DependencyProperties.Set(ContentPropertyKey, value); }
56 var childDesiredSizeWithMargins = Vector3.Zero;
59 Content.Measure(availableSizeWithoutMargins);
60 childDesiredSizeWithMargins = Content.DesiredSizeWithMargins;
63 return childDesiredSizeWithMargins;
72 Content.Arrange(finalSizeWithoutMargins, IsCollapsed);
75 return finalSizeWithoutMargins;
80 var contentWorldMatrixChanged = parentWorldChanged || ArrangeChanged || LocalMatrixChanged;
82 base.UpdateWorldMatrix(ref parentWorldMatrix, parentWorldChanged);
86 if (contentWorldMatrixChanged)
88 contentWorldMatrix = WorldMatrixInternal;
89 var contentMatrix = Matrix.Translation(-RenderSize / 2);
90 Matrix.Multiply(ref contentMatrix, ref WorldMatrixInternal, out contentWorldMatrix);
Provides a base class for all the User Interface elements in Paradox applications.
Interface for the update of the UIElements.
override Vector3 ArrangeOverride(Vector3 finalSizeWithoutMargins)
When overridden in a derived class, positions possible child elements and determines a size for a UIE...
Represents a three dimensional mathematical vector.
DepthAlignment
Describes how a child element is positioned in depth or stretched within a parent's layout slot...
override void UpdateWorldMatrix(ref Matrix parentWorldMatrix, bool parentWorldChanged)
Method called by IUIElementUpdate.UpdateWorldMatrix. Parents are in charge of recursively calling thi...
override Vector3 MeasureOverride(Vector3 availableSizeWithoutMargins)
When overridden in a derived class, measures the size in layout required for possible child elements ...
A class aiming at presenting another UIElement.
Only valid for a property / field that has a class or struct type. When restored, instead of recreati...
A class that represents a tag propety.
Represents a 4x4 mathematical matrix.