API ReferenceSandbox.UI

Panelclass

A simple User Interface panel. Can be styled with CSS.

objectPanel
Namespace
Sandbox.UI
Assembly
Sandbox.Engine
Declaration
public class Sandbox.UI.Panel

Constructors3

Showing 3 constructors

Methods118

Showing 118 methods

public void AddClass(string classname)PUBLIC

Adds CSS class(es) separated by spaces to this panel.

ParameterTypeDescription
classnamestring
Returns:void

protected virtual void AddScrollVelocity()PROTECTEDVIRTUAL

Returns:void

public void BindClass(string className, System.Func`1<bool> func)PUBLIC

ParameterTypeDescription
classNamestring
funcFunc<bool>
Returns:void

public bool Blur()PUBLIC

Remove input focus from this panel.

Returns:bool

public virtual void BuildCommandList(Sandbox.Rendering.CommandList commandList)PUBLICVIRTUALOBSOLETE

Obsolete: Use Draw

ParameterTypeDescription
commandListCommandList
Returns:void

public virtual void BuildContentCommandList(Sandbox.Rendering.CommandList commandList, Sandbox.UI.RenderState state)PUBLICVIRTUALOBSOLETE

Obsolete: Use Draw

ParameterTypeDescription
commandListCommandList
stateRenderState
Returns:void

protected virtual int BuildHash()PROTECTEDVIRTUAL

By overriding this you can return a hash of variables used by the Razor layout, which will cause a rebuild when changed. This is useful when your layout uses a global variable because by adding it to a HashCode.Combine here you can easily trigger a build when it changes.

Returns:int

protected virtual void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder tree)PROTECTEDVIRTUAL

Overridden/implemented by Razor templating to build a render tree.

ParameterTypeDescription
treeRenderTreeBuilder
Returns:void

public void CancelInvoke(string name)PUBLIC

Cancel a named invocation

ParameterTypeDescription
namestring
Returns:void

public System.Collections.Generic.IEnumerable`1<T> ChildrenOfType()PUBLIC

Returns a list of child panels of given type.

Returns:IEnumerable<T>

protected virtual void ConstrainScrolling(Vector2 size)PROTECTEDVIRTUAL

Constrain scrolling to the given size.

ParameterTypeDescription
sizeVector2
Returns:void

protected virtual Sandbox.UI.Panel CreateTooltipPanel()PROTECTEDVIRTUAL

Create a tooltip panel. You can override this to create a custom tooltip panel. If you're overriding this and not setting `Sandbox.UI.Panel.Tooltip`, then you must override and return true in `Sandbox.UI.Panel.HasTooltip`.

Returns:Panel

protected void CreateValueEvent(string name, object value)PROTECTED

Call this when the value has changed due to user input etc. This updates any bindings, backwards. Also triggers $"{name}.changed" event, with value being the Value on the event.

ParameterTypeDescription
namestring
valueobject
Returns:void

public virtual void Delete(bool immediate = False)PUBLICVIRTUAL

Deletes the panel.

ParameterTypeDescription
immediate = FalseboolIf , will skip any outros. (`:outro` CSS pseudo class)
Returns:void

public void DeleteChildren(bool immediate = False)PUBLIC

Deletes all child panels via `Sandbox.UI.Panel.Delete(System.Boolean)`.

ParameterTypeDescription
immediate = Falsebool
Returns:void

public virtual void DrawBackground(Sandbox.UI.RenderState state)PUBLICVIRTUALOBSOLETE

Obsolete: Use Draw

ParameterTypeDescription
stateRenderState
Returns:void

protected void DrawBackgroundTexture(Sandbox.Texture texture, Sandbox.UI.Length defaultSize)PROTECTED

Draws a texture using this panel's CSS box styling (border radius, border image, background position/size, tint, blend mode, filter mode, etc.) and adds the resulting descriptor to `Sandbox.UI.Panel.CachedDescriptors`. This is intended for controls like `Sandbox.UI.Image`, `Sandbox.UI.ScenePanel`, and `Sandbox.UI.SvgPanel` that render a texture as their primary content while respecting the panel's CSS properties. For simple texture drawing without CSS styling, use `Sandbox.UI.Panel.Draw.Texture(Sandbox.Texture,Sandbox.Rect,System.Nullable)` instead.

ParameterTypeDescription
textureTextureThe texture to draw. If null or invalid, draws the styled box without a texture.
defaultSizeLengthControls how the texture is sized within the panel (e.g. `Sandbox.UI.Length.Cover`, `Sandbox.UI.Length.Contain`, `Sandbox.UI.Length.Auto`).
Returns:void

public virtual void DrawContent(Sandbox.UI.RenderState state)PUBLICVIRTUALOBSOLETE

Obsolete: Use Draw

ParameterTypeDescription
stateRenderState
Returns:void

protected void EmptyStateChanged()PROTECTED

Should be called if overriding IsEmpty to notify the panel that its empty state has changed.

Returns:void

public virtual void FinalLayout(Vector2 offset)PUBLICVIRTUAL

Takes a `Sandbox.UI.LayoutCascade` and returns an outer rect

ParameterTypeDescription
offsetVector2
Returns:void

protected virtual void FinalLayoutChildren(Vector2 offset)PROTECTEDVIRTUAL

Layout the children of this panel.

ParameterTypeDescription
offsetVector2The parent's position.
Returns:void

public System.Collections.Generic.IEnumerable`1<Sandbox.UI.Panel> FindInRect(Sandbox.Rect box, bool fullyInside)PUBLIC

Find and return any children of this panel (including self) within the given rect.

ParameterTypeDescription
boxRectThe area to look for panels in, in screen-space coordinates.
fullyInsideboolWhether we want only the panels that are completely within the given bounds.
Returns:IEnumerable<Panel>

public virtual Sandbox.UI.Panel FindPopupPanel()PUBLICVIRTUAL

Returns the first ancestor panel that has no parent.

Returns:Panel

public Sandbox.UI.RootPanel FindRootPanel()PUBLIC

Returns the `Sandbox.UI.RootPanel` we are ultimately attached to, if any.

Returns:RootPanel

public void FlashClass(string classname, float seconds)PUBLIC

Add a class for a set amount of seconds. If called multiple times, we will stomp the earlier call.

ParameterTypeDescription
classnamestring
secondsfloat
Returns:void

public bool Focus()PUBLIC

Give input focus to this panel.

Returns:bool

public string GetAttribute(string k, string defaultIfNotFound = null)PUBLIC

Used in templates, try to get the attribute that was set in creation.

ParameterTypeDescription
kstring
defaultIfNotFound = nullstring
Returns:string

public Sandbox.UI.Panel GetChild(int index, bool loop = False)PUBLIC

Return a child at given index.

ParameterTypeDescription
indexintIndex at which to look.
loop = FalseboolWhether to loop indices when out of bounds, i.e. -1 becomes last child, 11 becomes second child in a list of 10, etc.
Returns:PanelReturns the requested child, or if it was not found.

public int GetChildIndex(Sandbox.UI.Panel panel)PUBLIC

Returns the index at which the given panel is parented to this panel, or -1 if it is not.

ParameterTypeDescription
panelPanel
Returns:int

public virtual string GetClipboardValue(bool cut)PUBLICVIRTUAL

If we have a value that can be copied to the clipboard, return it here.

ParameterTypeDescription
cutbool
Returns:string

protected virtual string GetRenderTreeChecksum()PROTECTEDVIRTUAL

Overridden/implemented by Razor templating, contains render tree checksum to determine when the render tree content has changed.

Returns:string

public virtual Vector2 GetTransformPosition(Vector2 pos)PUBLICVIRTUAL

Called by `Sandbox.UI.PanelInput.CheckHover(Sandbox.UI.Panel,Vector2,Sandbox.UI.Panel@)` to transform the current mouse position using the panel's LocalMatrix (by default). This can be overriden for special cases.

ParameterTypeDescription
posVector2
Returns:Vector2

public bool HasClass(string classname)PUBLIC

Whether we have the given CSS class or not.

ParameterTypeDescription
classnamestring
Returns:bool

protected virtual void InitializeEvents()PROTECTEDVIRTUAL

Called on creation and hotload to delete and re-initialize event listeners.

Returns:void

public void Invoke(float seconds, System.Action action)PUBLIC

Invoke a method after a delay. If the panel is deleted before this delay the method will not be called.

ParameterTypeDescription
secondsfloat
actionAction
Returns:void

public void InvokeOnce(string name, float seconds, System.Action action)PUBLIC

Invoke a method after a delay. If the panel is deleted before this delay the method will not be called. If the invoke is called while the old one is waiting, the old one will be cancelled.

ParameterTypeDescription
namestring
secondsfloat
actionAction
Returns:void

public bool IsAncestor(Sandbox.UI.Panel panel)PUBLIC

Is the given panel a parent, grandparent, etc.

ParameterTypeDescription
panelPanel
Returns:bool

protected virtual bool IsPanelEmpty()PROTECTEDVIRTUAL

Can be overridden by children to determine whether the panel is empty, and the :empty pseudo-class should be applied.

Returns:bool

public virtual void LanguageChanged()PUBLICVIRTUAL

Called when the current language has changed. This allows you to rebuild anything that might need rebuilding. Tokenized text labels should automatically update.

Returns:void

public void MarkRenderDirty()PUBLIC

Returns:void

public void MoveAfterSibling(Sandbox.UI.Panel previousSibling)PUBLIC

Move this panel to be after the given sibling.

ParameterTypeDescription
previousSiblingPanel
Returns:void

protected virtual void OnAfterTreeRender(bool firstTime)PROTECTEDVIRTUAL

Called after the razor tree has been created/rendered.

ParameterTypeDescription
firstTimebool
Returns:void

protected virtual void OnBack(Sandbox.UI.PanelEvent e)PROTECTEDVIRTUAL

Called when the player presses the "Back" button while hovering this panel, which is typically "mouse 5", aka one of the mouse buttons on its side.

ParameterTypeDescription
ePanelEvent
Returns:void

protected virtual void OnBlur(Sandbox.UI.PanelEvent e)PROTECTEDVIRTUAL

Called when this panel loses input focus.

ParameterTypeDescription
ePanelEvent
Returns:void

public virtual void OnButtonEvent(Sandbox.UI.ButtonEvent e)PUBLICVIRTUAL

Called when any button, mouse (except for mouse4/5) and keyboard, are pressed or depressed while hovering this panel.

ParameterTypeDescription
eButtonEvent
Returns:void

public virtual void OnButtonTyped(Sandbox.UI.ButtonEvent e)PUBLICVIRTUAL

Called when any keyboard button has been typed (pressed) while this panel has input focus. (`Sandbox.UI.Panel.Focus`)

ParameterTypeDescription
eButtonEvent
Returns:void

protected virtual void OnChildAdded(Sandbox.UI.Panel child)PROTECTEDVIRTUAL

A child panel has been added to this panel.

ParameterTypeDescription
childPanel
Returns:void

protected virtual void OnChildRemoved(Sandbox.UI.Panel child)PROTECTEDVIRTUAL

A child panel has been removed from this panel.

ParameterTypeDescription
childPanel
Returns:void

protected virtual void OnClick(Sandbox.UI.MousePanelEvent e)PROTECTEDVIRTUAL

Called when the player releases their left mouse button (Mouse 1) while hovering this panel.

ParameterTypeDescription
eMousePanelEvent
Returns:void

public virtual void OnDeleted()PUBLICVIRTUAL

Called when the panel is about to be deleted.

Returns:void

protected virtual void OnDoubleClick(Sandbox.UI.MousePanelEvent e)PROTECTEDVIRTUAL

Called when the player double clicks the panel with the left mouse button.

ParameterTypeDescription
eMousePanelEvent
Returns:void

protected virtual void OnDrag(Sandbox.UI.DragEvent e)PROTECTEDVIRTUAL

ParameterTypeDescription
eDragEvent
Returns:void

protected virtual void OnDragEnd(Sandbox.UI.DragEvent e)PROTECTEDVIRTUAL

ParameterTypeDescription
eDragEvent
Returns:void

protected virtual void OnDragEnter(Sandbox.UI.PanelEvent e)PROTECTEDVIRTUAL

Called when a panel is being dragged over this panel. Fires continuously as the cursor moves.

ParameterTypeDescription
ePanelEvent
Returns:void

protected virtual void OnDragLeave(Sandbox.UI.PanelEvent e)PROTECTEDVIRTUAL

Called when a panel being dragged leaves this panel's bounds.

ParameterTypeDescription
ePanelEvent
Returns:void

protected virtual void OnDragSelect(Sandbox.UI.SelectionEvent e)PROTECTEDVIRTUAL

Called when the player moves the mouse after "press and holding" (or dragging) the panel.

ParameterTypeDescription
eSelectionEvent
Returns:void

protected virtual void OnDragStart(Sandbox.UI.DragEvent e)PROTECTEDVIRTUALLIFECYCLE

ParameterTypeDescription
eDragEvent
Returns:void

public virtual void OnDraw()PUBLICVIRTUAL

Override this to draw custom graphics for this panel using the `Sandbox.UI.Panel.Draw` API. public override void OnDraw() { var r = Box.RectInner; Draw.Rect( r, Color.Blue.WithAlpha( 0.2f ), cornerRadius: 4 ); Draw.Text( "Score: 100", r, 16, Color.White, TextFlag.Center ); }

Returns:void

protected virtual void OnDrop(Sandbox.UI.PanelEvent e)PROTECTEDVIRTUAL

Called when a dragged panel is released over this panel.

ParameterTypeDescription
ePanelEvent
Returns:void

protected virtual void OnEscape(Sandbox.UI.PanelEvent e)PROTECTEDVIRTUAL

Called when the escape key is pressed

ParameterTypeDescription
ePanelEvent
Returns:void

protected virtual void OnEvent(Sandbox.UI.PanelEvent e)PROTECTEDVIRTUAL

Called when various `Sandbox.UI.PanelEvent`s happen. Handles event listeners and many standard events by default.

ParameterTypeDescription
ePanelEvent
Returns:void

protected virtual void OnFocus(Sandbox.UI.PanelEvent e)PROTECTEDVIRTUAL

Called when this panel receives input focus.

ParameterTypeDescription
ePanelEvent
Returns:void

protected virtual void OnForward(Sandbox.UI.PanelEvent e)PROTECTEDVIRTUAL

Called when the player presses the "Forward" button while hovering this panel, which is typically "mouse 4", aka one of the mouse buttons on its side.

ParameterTypeDescription
ePanelEvent
Returns:void

public virtual void OnHotloaded()PUBLICVIRTUAL

Called when a hotload happened. (Not necessarily on this panel)

Returns:void

public virtual void OnKeyTyped(char k)PUBLICVIRTUAL

Called when a printable character has been typed (pressed) while this panel has input focus. (`Sandbox.UI.Panel.Focus`)

ParameterTypeDescription
kchar
Returns:void

public virtual void OnLayout(Sandbox.Rect layoutRect)PUBLICVIRTUAL

This panel has just been laid out. You can modify its position now and it will affect its children. This is a useful place to restrict shit to the screen etc.

ParameterTypeDescription
layoutRectRect
Returns:void

protected virtual void OnMiddleClick(Sandbox.UI.MousePanelEvent e)PROTECTEDVIRTUAL

Called when the player releases their middle mouse button (Mouse 3) while hovering this panel.

ParameterTypeDescription
eMousePanelEvent
Returns:void

protected virtual void OnMouseDown(Sandbox.UI.MousePanelEvent e)PROTECTEDVIRTUAL

Called when the player presses down the left or right mouse buttons while hovering this panel.

ParameterTypeDescription
eMousePanelEvent
Returns:void

protected virtual void OnMouseMove(Sandbox.UI.MousePanelEvent e)PROTECTEDVIRTUAL

Called when the cursor moves while hovering this panel.

ParameterTypeDescription
eMousePanelEvent
Returns:void

protected virtual void OnMouseOut(Sandbox.UI.MousePanelEvent e)PROTECTEDVIRTUAL

Called when the cursor leaves this panel.

ParameterTypeDescription
eMousePanelEvent
Returns:void

protected virtual void OnMouseOver(Sandbox.UI.MousePanelEvent e)PROTECTEDVIRTUAL

Called when the cursor enters this panel.

ParameterTypeDescription
eMousePanelEvent
Returns:void

protected virtual void OnMouseUp(Sandbox.UI.MousePanelEvent e)PROTECTEDVIRTUAL

Called when the player releases left or right mouse button.

ParameterTypeDescription
eMousePanelEvent
Returns:void

public virtual void OnMouseWheel(Vector2 value)PUBLICVIRTUAL

Called when the player scrolls their mouse wheel while hovering this panel.

ParameterTypeDescription
valueVector2The scroll wheel delta. Positive values are scrolling down, negative - up.
Returns:void

protected virtual void OnParametersSet()PROTECTEDVIRTUAL

Called after all templated panel binds have been set.

Returns:void

protected virtual System.Threading.Tasks.Task OnParametersSetAsync()PROTECTEDVIRTUAL

Called after all templated panel binds have been set.

Returns:Task

public virtual void OnParentChanged()PUBLICVIRTUAL

Called after the parent of this panel has changed.

Returns:void

public virtual void OnPaste(string text)PUBLICVIRTUAL

Called when the user presses CTRL+V while this panel has input focus.

ParameterTypeDescription
textstring
Returns:void

public void OnRenderFragmentChanged(Sandbox.UI.Panel upTo)PUBLIC

A RenderFragment has been set on us, so our tree has potential changes now. Lets update and see.

ParameterTypeDescription
upToPanel
Returns:void

protected virtual void OnRightClick(Sandbox.UI.MousePanelEvent e)PROTECTEDVIRTUAL

Called when the player releases their right mouse button (Mouse 2) while hovering this panel.

ParameterTypeDescription
eMousePanelEvent
Returns:void

public virtual void OnTemplateSlot(Sandbox.Html.INode element, string slotName, Sandbox.UI.Panel panel)PUBLICVIRTUAL

TODO: Obsolete this and instead maybe we have something like [PanelSlot( "slotname" )] that is applied on properties. Then when we find a slot="slotname" we chase up the heirachy and set the property.

ParameterTypeDescription
elementINode
slotNamestring
panelPanel
Returns:void

protected virtual void OnVisibilityChanged()PROTECTEDVIRTUAL

Called when the visibility of the current panel changes. This could be because our own style changed, or a parent style. You can check visibility using `Sandbox.UI.Panel.IsVisible` and `Sandbox.UI.Panel.IsVisibleSelf`.

Returns:void

public Vector2 PanelPositionToScreenPosition(Vector2 pos)PUBLIC

Convert a point from local space to screen space

ParameterTypeDescription
posVector2
Returns:Vector2

public void PlaySound(string sound)PUBLIC

Play a sound from this panel.

ParameterTypeDescription
soundstring
Returns:void

public virtual bool RayToLocalPosition(Ray ray, Vector2 position, float distance)PUBLICVIRTUAL

Transform a ray in 3D space to a position on the panel. This is used for world panel input.

ParameterTypeDescription
rayRayThe ray in 3D world space to test against this panel.
positionVector2Position on the panel where the intersection happened, local to the panel's top left corner.
distancefloatDistance from the ray's origin to the intersection in 3D space.
Returns:boolReturn true if a hit/intersection was detected.

public void RemoveClass(string classname)PUBLIC

Removes given CSS class from this panel.

ParameterTypeDescription
classnamestring
Returns:void

public Vector2 ScreenPositionToPanelDelta(Vector2 pos)PUBLIC

Convert a point from the screen to a point representing a delta on this panel where the top left is [0,0] and the bottom right is [1,1]

ParameterTypeDescription
posVector2
Returns:Vector2

public Vector2 ScreenPositionToPanelPosition(Vector2 pos)PUBLIC

Convert a point from the screen to a position relative to the top left of this panel

ParameterTypeDescription
posVector2
Returns:Vector2

public void SelectAllInChildren()PUBLIC

If AllowChildSelection is enabled, we'll try to select all children text

Returns:void

public void SetAttribute(string k, string v)PUBLIC

Used in templates, gets an attribute that was set in the template.

ParameterTypeDescription
kstring
vstring
Returns:void

public void SetChildIndex(Sandbox.UI.Panel child, int newIndex)PUBLIC

Move given child panel to be given index, where 0 is the first child.

ParameterTypeDescription
childPanel
newIndexint
Returns:void

public void SetClass(string classname, bool active)PUBLIC

Sets a specific CSS class active or not.

ParameterTypeDescription
classnamestring
activebool
Returns:void

public virtual void SetContent(string value)PUBLICVIRTUAL

Called by the templating system when an element has content between its tags.

ParameterTypeDescription
valuestring
Returns:void

public void SetMouseCapture(bool b)PUBLIC

Captures the mouse cursor while active. The cursor will be hidden and will be stuck in place. You will want to use `Sandbox.Mouse.Delta` in `Sandbox.UI.Panel.Tick` while `Sandbox.UI.Panel.HasMouseCapture` to read mouse movements.You can call this from `Sandbox.UI.Panel.OnButtonEvent(Sandbox.UI.ButtonEvent)` for mouse clicks.

ParameterTypeDescription
bboolWhether to enable or disable the capture.
Returns:void

public virtual void SetProperty(string name, string value)PUBLICVIRTUAL

Set a property on the panel, such as special properties (`class`, `id`, `style` and `value`, etc.) and properties of the panel's C# class.

ParameterTypeDescription
namestringname of the property to modify.
valuestringValue to assign to the property.
Returns:void

public virtual void SetPropertyObject(string name, object value)PUBLICVIRTUAL

Same as `Sandbox.UI.Panel.SetProperty(System.String,System.String)`, but first tries to set the property on the panel object, then process any special properties such as `class`.

ParameterTypeDescription
namestring
valueobject
Returns:void

public void SkipTransitions()PUBLIC

Any transitions running, or about to run, will jump straight to the end.

Returns:void

public void StateHasChanged()PUBLIC

For razor panels, call when the state of the render tree has changed such that it would be a good idea to re-render the tree. You would usually not need to call this manually.

Returns:void

protected void StyleSelectorsChanged(bool ancestors, bool descendants, Sandbox.UI.RootPanel root = null)PROTECTED

Should be called when something happens that means that this panel's stylesheets need to be re-evaluated. Like becoming hovered or classes changed. You don't call this when changing styles directly on the panel, just on anything that will change which stylesheets should get selected.

ParameterTypeDescription
ancestorsboolAlso re-evaluate all ancestor panels. (for `:has()`)
descendantsboolAlso re-evaluate all child panels. (for parent selectors)
root = nullRootPanelRoot panel cache so we don't need to keep looking it up.
Returns:void

public bool Switch(Sandbox.UI.PseudoClass c, bool state)PUBLIC

Switch a pseudo class on or off.

ParameterTypeDescription
cPseudoClass
statebool
Returns:bool

public virtual void Tick()PUBLICVIRTUAL

Called every frame. This is your "Think" function.

Returns:void

public void ToggleClass(string classname)PUBLIC

Add a class if we don't have it, remove a class if we do have it

ParameterTypeDescription
classnamestring
Returns:void

public bool TryFindKeyframe(string name, Sandbox.UI.KeyFrames keyframes)PUBLIC

Try to find `@keyframes` CSS rule with given name in `Sandbox.UI.Panel.AllStyleSheets`.

ParameterTypeDescription
namestringThe name to search for.
keyframesKeyFramesThe keyframes, if any are found, or .
Returns:boolif `@keyframes` with given name were found.

public bool TryScroll(Vector2 value)PUBLIC

Called from `Sandbox.UI.Panel.OnMouseWheel(Vector2)` to try to scroll.

ParameterTypeDescription
valueVector2The scroll wheel delta. Positive values are scrolling down, negative - up.
Returns:boolReturn true to NOT propagate the event to the `Sandbox.UI.Panel.Parent`.

public bool TryScrollToBottom()PUBLIC

Scroll to the bottom, if the panel has scrolling enabled.

Returns:boolWhether we scrolled to the bottom or not.

public void UnselectAllInChildren()PUBLIC

Clear any selection in children

Returns:void

public virtual bool WantsMouseInput()PUBLICVIRTUALINGEST

Returns true if this panel would like the mouse cursor to be visible.

Returns:bool

Properties63

Showing 63 properties

public bool Sandbox.UI.Panel.AcceptsFocus { get; set; }PUBLICGETSET

False by default, can this element accept keyboard focus. If an element accepts focus it'll be able to receive keyboard input.

Returns:bool

public virtual bool Sandbox.UI.Panel.AcceptsImeInput { get; set; }PUBLICVIRTUALGETSETINGEST

False by default. Anything that is capable of accepting IME input should return true. Which is probably just a TextEntry.

Returns:bool

public virtual sealed System.Collections.Generic.IEnumerable`1<Sandbox.UI.IStyleBlock> Sandbox.UI.Panel.ActiveStyleBlocks { get; set; }PUBLICVIRTUALGETSET

A importance sorted list of style blocks that are active on this panel

Returns:IEnumerable<IStyleBlock>

public Sandbox.UI.Construct.PanelCreator Sandbox.UI.Panel.Add { get; set; }PUBLICGETSET

Quickly add common panels with certain values as children.

Returns:PanelCreator

public bool Sandbox.UI.Panel.AllowChildSelection { get; set; }PUBLICGETSET

Allow selecting child text

Returns:bool

public System.Collections.Generic.IEnumerable`1<Sandbox.UI.StyleSheet> Sandbox.UI.Panel.AllStyleSheets { get; set; }PUBLICGETSET

List of all `Sandbox.UI.StyleSheet`s applied to this panel and all its ancestors.

Returns:IEnumerable<StyleSheet>

public System.Collections.Generic.IEnumerable`1<Sandbox.UI.Panel> Sandbox.UI.Panel.Ancestors { get; set; }PUBLICGETSET

Returns all ancestors, i.e. the parent, parent of our parent, etc.

Returns:IEnumerable<Panel>

public System.Collections.Generic.IEnumerable`1<Sandbox.UI.Panel> Sandbox.UI.Panel.AncestorsAndSelf { get; set; }PUBLICGETSET

Returns this panel and all its ancestors, i.e. the Parent, parent of its parent, etc.

Returns:IEnumerable<Panel>

public Sandbox.UI.Box Sandbox.UI.Panel.Box { get; set; }PUBLICGETSET

Access to various bounding boxes of this panel.

Returns:Box

public virtual sealed Sandbox.UI.PanelInputType Sandbox.UI.Panel.ButtonInput { get; set; }PUBLICVIRTUALGETSETINGEST

Describe what to do with keyboard input. The default is InputMode.UI which means that when focused, this panel will receive Keys Typed and Button Events. If you set this to InputMode.Game, this panel will redirect its inputs to the game, which means for example that if you're focused on this panel and press space, it'll send the jump button to the game.

Returns:PanelInputType

public bool Sandbox.UI.Panel.CanDragScroll { get; set; }PUBLICGETSET

Set this to false if you want to opt out of drag scrolling

Returns:bool

public Microsoft.AspNetCore.Components.RenderFragment Sandbox.UI.Panel.ChildContent { get; set; }PUBLICGETSET

Returns:RenderFragment

public System.Collections.Generic.IEnumerable`1<Sandbox.UI.Panel> Sandbox.UI.Panel.Children { get; set; }PUBLICGETSET

List of panels that are attached/parented directly to this one.

Returns:IEnumerable<Panel>

public int Sandbox.UI.Panel.ChildrenCount { get; set; }PUBLICGETSET

Amount of panels directly parented to this panel.

Returns:int

public System.Collections.Generic.IEnumerable`1<string> Sandbox.UI.Panel.Class { get; set; }PUBLICGETSET

A list of CSS classes applied to this panel.

Returns:IEnumerable<string>

public string Sandbox.UI.Panel.Classes { get; set; }PUBLICGETSET

All CSS classes applied to this panel, separated with spaces.

Returns:string

public Sandbox.UI.Styles Sandbox.UI.Panel.ComputedStyle { get; set; }PUBLICGETSET

This is the style that we computed last. If you're looking to see which styles are set on this panel then this is what you're looking for.

Returns:Styles

public System.Threading.CancellationToken Sandbox.UI.Panel.DeletionToken { get; set; }PUBLICGETSET

Get a token that is cancelled when the panel is deleted

Returns:CancellationToken

public System.Collections.Generic.IEnumerable`1<Sandbox.UI.Panel> Sandbox.UI.Panel.Descendants { get; set; }PUBLICGETSET

List of all panels that are attached to this panel, recursively, i.e. all children of this panel, children of those children, etc.

Returns:IEnumerable<Panel>

public string Sandbox.UI.Panel.ElementName { get; set; }PUBLICGETSET

The element name. If you've created this Panel via a template this will be whatever the element name is on there. If not then it'll be the name of the class (ie Panel, Button)

Returns:string

public System.Nullable`1<Matrix> Sandbox.UI.Panel.GlobalMatrix { get; set; }PUBLICGETSET

If this panel or its parents have transforms, they'll be compounded here.

Returns:Nullable<Matrix>

public bool Sandbox.UI.Panel.HasActive { get; set; }PUBLICGETSET

Whether this panel has the `:active` pseudo class active.

Returns:bool

public bool Sandbox.UI.Panel.HasActiveTransitions { get; set; }PUBLICGETSET

Returns true if this panel has any active CSS transitions.

Returns:bool

public bool Sandbox.UI.Panel.HasChildren { get; set; }PUBLICGETSET

Whether this panel has any child panels at all.

Returns:bool

public virtual bool Sandbox.UI.Panel.HasContent { get; set; }PUBLICVIRTUALGETSETOBSOLETE

If true, calls `Sandbox.UI.Panel.DrawContent(Sandbox.UI.PanelRenderer,Sandbox.UI.RenderState@)`.

Obsolete: Use Draw

Returns:bool

public bool Sandbox.UI.Panel.HasFocus { get; set; }PUBLICGETSET

Whether this panel has the `:focus` pseudo class active.

Returns:bool

public bool Sandbox.UI.Panel.HasHovered { get; set; }PUBLICGETSET

Whether this panel has the `:hover` pseudo class active.

Returns:bool

public bool Sandbox.UI.Panel.HasIntro { get; set; }PUBLICGETSET

Whether this panel has the `:intro` pseudo class active.

Returns:bool

public bool Sandbox.UI.Panel.HasMouseCapture { get; set; }PUBLICGETSET

Whether this panel is capturing the mouse cursor. See `Sandbox.UI.Panel.SetMouseCapture(System.Boolean)`.

Returns:bool

public bool Sandbox.UI.Panel.HasOutro { get; set; }PUBLICGETSET

Whether this panel has the `:outro` pseudo class active.

Returns:bool

public bool Sandbox.UI.Panel.HasScrollX { get; set; }PUBLICGETSET

Return true if this panel is scrollable on the X axis

Returns:bool

public bool Sandbox.UI.Panel.HasScrollY { get; set; }PUBLICGETSET

Return true if this panel is scrollable on the Y axis

Returns:bool

public virtual bool Sandbox.UI.Panel.HasTooltip { get; set; }PUBLICVIRTUALGETSET

You should override and return true if you're overriding `Sandbox.UI.Panel.CreateTooltipPanel`. Otherwise this will return true if `Sandbox.UI.Panel.Tooltip` is not empty.

Returns:bool

public virtual sealed string Sandbox.UI.Panel.Id { get; set; }PUBLICVIRTUALGETSET

Works the same as the html id="" attribute. If you set Id to "poop", it'll match any styles that define #poop in their selector.

Returns:string

public bool Sandbox.UI.Panel.IsDeleting { get; set; }PUBLICGETSET

Whether `Sandbox.UI.Panel.Delete(System.Boolean)` was called on this panel.

Returns:bool

public bool Sandbox.UI.Panel.IsDragScrolling { get; set; }PUBLICGETSET

Is this panel currently being scrolled by dragging?

Returns:bool

public bool Sandbox.UI.Panel.IsScrollAtBottom { get; set; }PUBLICGETSET

Whether the scrolling is currently pinned to the bottom of the panel as dictated by `Sandbox.UI.Panel.PreferScrollToBottom`.

Returns:bool

public virtual sealed bool Sandbox.UI.Panel.IsValid { get; set; }PUBLICVIRTUALGETSET

Returns:bool

public bool Sandbox.UI.Panel.IsVisible { get; set; }PUBLICGETSET

Return true if this panel isn't hidden by opacity or displaymode.

Returns:bool

public bool Sandbox.UI.Panel.IsVisibleSelf { get; set; }PUBLICGETSET

Return true if this panel isn't hidden by opacity or displaymode.

Returns:bool

public System.Nullable`1<Matrix> Sandbox.UI.Panel.LocalMatrix { get; set; }PUBLICGETSET

If this panel has transforms, they'll be reflected here

Returns:Nullable<Matrix>

public Vector2 Sandbox.UI.Panel.MousePosition { get; set; }PUBLICGETSET

Current mouse position local to this panels top left corner.

Returns:Vector2

public float Sandbox.UI.Panel.Opacity { get; set; }PUBLICGETSET

The currently calculated opacity. This is set by multiplying our current style opacity with our parent's opacity.

Returns:float

public Sandbox.UI.Panel Sandbox.UI.Panel.Parent { get; set; }PUBLICGETSET

The panel we are directly attached to. This panel will be positioned relative to the given parent, and therefore move with it, typically also be hidden by the parents bounds.

Returns:Panel

public bool Sandbox.UI.Panel.PreferScrollToBottom { get; set; }PUBLICGETSET

If true, we'll try to stay scrolled to the bottom when the panel changes size

Returns:bool

public float Sandbox.UI.Panel.ScaleFromScreen { get; set; }PUBLICGETSET

Inverse scale of `Sandbox.UI.Panel.ScaleToScreen`.

Returns:float

public float Sandbox.UI.Panel.ScaleToScreen { get; set; }PUBLICGETSET

Scale of the panel on the screen.

Returns:float

public Sandbox.Scene Sandbox.UI.Panel.Scene { get; set; }PUBLICGETSET

Returns the scene that this panel belongs to

Returns:Scene

public Vector2 Sandbox.UI.Panel.ScrollOffset { get; set; }PUBLICGETSET

Offset of the panel's children position for scrolling purposes.

Returns:Vector2

public Vector2 Sandbox.UI.Panel.ScrollSize { get; set; }PUBLICGETSET

The size of the scrollable area within this panel.

Returns:Vector2

public int Sandbox.UI.Panel.SiblingIndex { get; set; }PUBLICGETSET

The index of this panel in its parent's child list.

Returns:int

public virtual sealed string Sandbox.UI.Panel.SourceFile { get; set; }PUBLICVIRTUALGETSET

If this was created by razor, this is the file in which it was created

Returns:string

public virtual sealed int Sandbox.UI.Panel.SourceLine { get; set; }PUBLICVIRTUALGETSET

If this was created by razor, this is the line number in the file

Returns:int

public virtual string Sandbox.UI.Panel.StringValue { get; set; }PUBLICVIRTUALGETSET

Set via `"value"` property from HTML.

Returns:string

public Sandbox.UI.PanelStyle Sandbox.UI.Panel.Style { get; set; }PUBLICGETSET

Allows you to set styles specifically on this panel. Setting the style will only affect this panel and no others and will override any other styles.

Returns:PanelStyle

public string Sandbox.UI.Panel.Tooltip { get; set; }PUBLICGETSET

A string to show when hovering over this panel.

Returns:string

public string Sandbox.UI.Panel.TooltipClass { get; set; }PUBLICGETSET

The created tooltip element will have this class, if set.

Returns:string

public object Sandbox.UI.Panel.UserData { get; set; }PUBLICGETSET

Can be used to store random data without sub-classing the panel.

Returns:object

public virtual bool Sandbox.UI.Panel.WantsDrag { get; set; }PUBLICVIRTUALGETSET

Return true if this panel wants to be dragged

Returns:bool

protected virtual bool Sandbox.UI.Panel.WantsDragScrolling { get; set; }PROTECTEDVIRTUALGETSET

Returns:bool

On this page

Constructorspublic Panel()public Panel(Sandbox.UI.Panel parent, System.String classnames)public Panel(Sandbox.UI.Panel parent)Methodspublic T AddChild(T p)public System.Boolean AddChild(T outPanel, System.String classnames = null)public T AddChild(System.String classnames = null)public System.Void AddClass(System.String classname)public System.Void AddEventListener(System.String eventName, System.Action action)public System.Void AddEventListener(System.String eventName, System.Action`1<Sandbox.UI.PanelEvent> e)protected virtual System.Void AddScrollVelocity()public System.Void BindClass(System.String className, System.Func`1<System.Boolean> func)public System.Boolean Blur()public virtual System.Void BuildCommandList(Sandbox.Rendering.CommandList commandList)public virtual System.Void BuildContentCommandList(Sandbox.Rendering.CommandList commandList, Sandbox.UI.RenderState state)protected virtual System.Int32 BuildHash()protected virtual System.Void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder tree)public System.Void CancelInvoke(System.String name)public System.Collections.Generic.IEnumerable`1<T> ChildrenOfType()protected virtual System.Void ConstrainScrolling(Vector2 size)public virtual System.Void CreateEvent(Sandbox.UI.PanelEvent evnt)public virtual System.Void CreateEvent(System.String name, System.Object value = null, System.Nullable`1<System.Single> debounce = null)protected virtual Sandbox.UI.Panel CreateTooltipPanel()protected System.Void CreateValueEvent(System.String name, System.Object value)public virtual System.Void Delete(System.Boolean immediate = False)public System.Void DeleteChildren(System.Boolean immediate = False)public virtual System.Void DrawBackground(Sandbox.UI.RenderState state)protected System.Void DrawBackgroundTexture(Sandbox.Texture texture, Sandbox.UI.Length defaultSize)public virtual System.Void DrawContent(Sandbox.UI.RenderState state)protected System.Void EmptyStateChanged()public virtual System.Void FinalLayout(Vector2 offset)protected virtual System.Void FinalLayoutChildren(Vector2 offset)public System.Collections.Generic.IEnumerable`1<Sandbox.UI.Panel> FindInRect(Sandbox.Rect box, System.Boolean fullyInside)public virtual Sandbox.UI.Panel FindPopupPanel()public Sandbox.UI.RootPanel FindRootPanel()public System.Void FlashClass(System.String classname, System.Single seconds)public System.Boolean Focus()public System.String GetAttribute(System.String k, System.String defaultIfNotFound = null)public Sandbox.UI.Panel GetChild(System.Int32 index, System.Boolean loop = False)public System.Int32 GetChildIndex(Sandbox.UI.Panel panel)public virtual System.String GetClipboardValue(System.Boolean cut)protected virtual System.String GetRenderTreeChecksum()public virtual Vector2 GetTransformPosition(Vector2 pos)public System.Boolean HasClass(System.String classname)protected virtual System.Void InitializeEvents()public System.Void Invoke(System.Single seconds, System.Action action)public System.Void InvokeOnce(System.String name, System.Single seconds, System.Action action)public System.Boolean IsAncestor(Sandbox.UI.Panel panel)public System.Boolean IsInside(Sandbox.Rect rect, System.Boolean fullyInside)public System.Boolean IsInside(Vector2 pos)protected virtual System.Boolean IsPanelEmpty()public virtual System.Void LanguageChanged()public System.Void MarkRenderDirty()public System.Void MoveAfterSibling(Sandbox.UI.Panel previousSibling)protected virtual System.Void OnAfterTreeRender(System.Boolean firstTime)protected virtual System.Void OnBack(Sandbox.UI.PanelEvent e)protected virtual System.Void OnBlur(Sandbox.UI.PanelEvent e)public virtual System.Void OnButtonEvent(Sandbox.UI.ButtonEvent e)public virtual System.Void OnButtonTyped(Sandbox.UI.ButtonEvent e)protected virtual System.Void OnChildAdded(Sandbox.UI.Panel child)protected virtual System.Void OnChildRemoved(Sandbox.UI.Panel child)protected virtual System.Void OnClick(Sandbox.UI.MousePanelEvent e)public virtual System.Void OnDeleted()protected virtual System.Void OnDoubleClick(Sandbox.UI.MousePanelEvent e)protected virtual System.Void OnDrag(Sandbox.UI.DragEvent e)protected virtual System.Void OnDragEnd(Sandbox.UI.DragEvent e)protected virtual System.Void OnDragEnter(Sandbox.UI.PanelEvent e)protected virtual System.Void OnDragLeave(Sandbox.UI.PanelEvent e)protected virtual System.Void OnDragSelect(Sandbox.UI.SelectionEvent e)protected virtual System.Void OnDragStart(Sandbox.UI.DragEvent e)public virtual System.Void OnDraw()protected virtual System.Void OnDrop(Sandbox.UI.PanelEvent e)protected virtual System.Void OnEscape(Sandbox.UI.PanelEvent e)protected virtual System.Void OnEvent(Sandbox.UI.PanelEvent e)protected virtual System.Void OnFocus(Sandbox.UI.PanelEvent e)protected virtual System.Void OnForward(Sandbox.UI.PanelEvent e)public virtual System.Void OnHotloaded()public virtual System.Void OnKeyTyped(System.Char k)public virtual System.Void OnLayout(Sandbox.Rect layoutRect)protected virtual System.Void OnMiddleClick(Sandbox.UI.MousePanelEvent e)protected virtual System.Void OnMouseDown(Sandbox.UI.MousePanelEvent e)protected virtual System.Void OnMouseMove(Sandbox.UI.MousePanelEvent e)protected virtual System.Void OnMouseOut(Sandbox.UI.MousePanelEvent e)protected virtual System.Void OnMouseOver(Sandbox.UI.MousePanelEvent e)protected virtual System.Void OnMouseUp(Sandbox.UI.MousePanelEvent e)public virtual System.Void OnMouseWheel(Vector2 value)protected virtual System.Void OnParametersSet()protected virtual System.Threading.Tasks.Task OnParametersSetAsync()public virtual System.Void OnParentChanged()public virtual System.Void OnPaste(System.String text)public System.Void OnRenderFragmentChanged(Sandbox.UI.Panel upTo)protected virtual System.Void OnRightClick(Sandbox.UI.MousePanelEvent e)public virtual System.Void OnTemplateSlot(Sandbox.Html.INode element, System.String slotName, Sandbox.UI.Panel panel)protected virtual System.Void OnVisibilityChanged()public Vector2 PanelPositionToScreenPosition(Vector2 pos)public System.Void PlaySound(System.String sound)public virtual System.Boolean RayToLocalPosition(Ray ray, Vector2 position, System.Single distance)public System.Void RemoveClass(System.String classname)public Vector2 ScreenPositionToPanelDelta(Vector2 pos)public Vector2 ScreenPositionToPanelPosition(Vector2 pos)public System.Void SelectAllInChildren()public System.Void SetAttribute(System.String k, System.String v)public System.Void SetChildIndex(Sandbox.UI.Panel child, System.Int32 newIndex)public System.Void SetClass(System.String classname, System.Boolean active)public virtual System.Void SetContent(System.String value)public System.Void SetMouseCapture(System.Boolean b)public virtual System.Void SetProperty(System.String name, System.String value)public virtual System.Void SetPropertyObject(System.String name, System.Object value)public System.Void SkipTransitions()public System.Void SortChildren(System.Comparison`1<Sandbox.UI.Panel> sorter)public System.Void SortChildren(System.Func`2<Sandbox.UI.Panel,System.Int32> sorter)public System.Void SortChildren(System.Func`2<TargetType,System.Int32> sorter)public System.Void StateHasChanged()protected System.Void StyleSelectorsChanged(System.Boolean ancestors, System.Boolean descendants, Sandbox.UI.RootPanel root = null)public System.Boolean Switch(Sandbox.UI.PseudoClass c, System.Boolean state)public virtual System.Void Tick()public System.Void ToggleClass(System.String classname)public System.Boolean TryFindKeyframe(System.String name, Sandbox.UI.KeyFrames keyframes)public System.Boolean TryScroll(Vector2 value)public System.Boolean TryScrollToBottom()public System.Void UnselectAllInChildren()public virtual System.Boolean WantsMouseInput()Propertiespublic System.Boolean Sandbox.UI.Panel.AcceptsFocus { get; set; }public virtual System.Boolean Sandbox.UI.Panel.AcceptsImeInput { get; set; }public virtual sealed System.Collections.Generic.IEnumerable`1<Sandbox.UI.IStyleBlock> Sandbox.UI.Panel.ActiveStyleBlocks { get; set; }public Sandbox.UI.Construct.PanelCreator Sandbox.UI.Panel.Add { get; set; }public System.Boolean Sandbox.UI.Panel.AllowChildSelection { get; set; }public System.Collections.Generic.IEnumerable`1<Sandbox.UI.StyleSheet> Sandbox.UI.Panel.AllStyleSheets { get; set; }public System.Collections.Generic.IEnumerable`1<Sandbox.UI.Panel> Sandbox.UI.Panel.Ancestors { get; set; }public System.Collections.Generic.IEnumerable`1<Sandbox.UI.Panel> Sandbox.UI.Panel.AncestorsAndSelf { get; set; }public Sandbox.UI.Box Sandbox.UI.Panel.Box { get; set; }public virtual sealed Sandbox.UI.PanelInputType Sandbox.UI.Panel.ButtonInput { get; set; }public System.Boolean Sandbox.UI.Panel.CanDragScroll { get; set; }public Microsoft.AspNetCore.Components.RenderFragment Sandbox.UI.Panel.ChildContent { get; set; }public System.Collections.Generic.IEnumerable`1<Sandbox.UI.Panel> Sandbox.UI.Panel.Children { get; set; }public System.Int32 Sandbox.UI.Panel.ChildrenCount { get; set; }public System.Collections.Generic.IEnumerable`1<System.String> Sandbox.UI.Panel.Class { get; set; }public System.String Sandbox.UI.Panel.Classes { get; set; }public Sandbox.UI.Styles Sandbox.UI.Panel.ComputedStyle { get; set; }public System.Threading.CancellationToken Sandbox.UI.Panel.DeletionToken { get; set; }public System.Collections.Generic.IEnumerable`1<Sandbox.UI.Panel> Sandbox.UI.Panel.Descendants { get; set; }public System.String Sandbox.UI.Panel.ElementName { get; set; }public Sandbox.GameObject Sandbox.UI.Panel.GameObject { get; set; }public System.Nullable`1<Matrix> Sandbox.UI.Panel.GlobalMatrix { get; set; }public System.Boolean Sandbox.UI.Panel.HasActive { get; set; }public System.Boolean Sandbox.UI.Panel.HasActiveTransitions { get; set; }public System.Boolean Sandbox.UI.Panel.HasChildren { get; set; }public virtual System.Boolean Sandbox.UI.Panel.HasContent { get; set; }public System.Boolean Sandbox.UI.Panel.HasFocus { get; set; }public System.Boolean Sandbox.UI.Panel.HasHovered { get; set; }public System.Boolean Sandbox.UI.Panel.HasIntro { get; set; }public System.Boolean Sandbox.UI.Panel.HasMouseCapture { get; set; }public System.Boolean Sandbox.UI.Panel.HasOutro { get; set; }public System.Boolean Sandbox.UI.Panel.HasScrollX { get; set; }public System.Boolean Sandbox.UI.Panel.HasScrollY { get; set; }public virtual System.Boolean Sandbox.UI.Panel.HasTooltip { get; set; }public virtual sealed System.String Sandbox.UI.Panel.Id { get; set; }public System.Boolean Sandbox.UI.Panel.IsDeleting { get; set; }public System.Boolean Sandbox.UI.Panel.IsDragScrolling { get; set; }public System.Boolean Sandbox.UI.Panel.IsScrollAtBottom { get; set; }public virtual sealed System.Boolean Sandbox.UI.Panel.IsValid { get; set; }public System.Boolean Sandbox.UI.Panel.IsVisible { get; set; }public System.Boolean Sandbox.UI.Panel.IsVisibleSelf { get; set; }public System.Nullable`1<Matrix> Sandbox.UI.Panel.LocalMatrix { get; set; }public Vector2 Sandbox.UI.Panel.MousePosition { get; set; }public System.Single Sandbox.UI.Panel.Opacity { get; set; }public Sandbox.UI.Panel Sandbox.UI.Panel.Parent { get; set; }public System.Boolean Sandbox.UI.Panel.PreferScrollToBottom { get; set; }public virtual sealed Sandbox.UI.PseudoClass Sandbox.UI.Panel.PseudoClass { get; set; }public System.Single Sandbox.UI.Panel.ScaleFromScreen { get; set; }public System.Single Sandbox.UI.Panel.ScaleToScreen { get; set; }public Sandbox.Scene Sandbox.UI.Panel.Scene { get; set; }public Vector2 Sandbox.UI.Panel.ScrollOffset { get; set; }public Vector2 Sandbox.UI.Panel.ScrollSize { get; set; }public System.Int32 Sandbox.UI.Panel.SiblingIndex { get; set; }public virtual sealed System.String Sandbox.UI.Panel.SourceFile { get; set; }public virtual sealed System.Int32 Sandbox.UI.Panel.SourceLine { get; set; }public virtual System.String Sandbox.UI.Panel.StringValue { get; set; }public Sandbox.UI.PanelStyle Sandbox.UI.Panel.Style { get; set; }public System.String Sandbox.UI.Panel.Tooltip { get; set; }public System.String Sandbox.UI.Panel.TooltipClass { get; set; }public Sandbox.UI.Transitions Sandbox.UI.Panel.Transitions { get; set; }public System.Object Sandbox.UI.Panel.UserData { get; set; }public virtual System.Boolean Sandbox.UI.Panel.WantsDrag { get; set; }protected virtual System.Boolean Sandbox.UI.Panel.WantsDragScrolling { get; set; }Metadata