Class LayoutDescriptor
All layouts in the system are described using this class. It can be retrieved from either a GenerateLayout(string, string), or the serialized value of LayoutConfig
It contains a list of LayoutTabSetting and associated LayoutDescriptorGroup.
Each group contains a collection of LayoutViewDescriptorThese views can then be displayed appropriately within the UI of the client application depending on what is avilable within that app
Inherited Members
Namespace: LemonEdge.Client.Core.Views.DefaultLayouts
Assembly: LemonEdge.Client.UI.API.dll
Syntax
[DataContract(IsReference = true)]
public class LayoutDescriptor : ICloneable, ICloneable<LayoutDescriptor>
Constructors
LayoutDescriptor()
Declaration
public LayoutDescriptor()
Properties
Name
The name of this layout descriptor
Declaration
public string? Name { get; set; }
Property Value
Type | Description |
---|---|
string |
SelectedTab
The current user selected tab
Declaration
public LayoutTabSetting? SelectedTab { get; }
Property Value
Type | Description |
---|---|
LayoutTabSetting |
Methods
AddTab(LayoutTabSetting)
Adds the specified tab to this layout descriptor.
Used extensively when coding a DefaultLayoutGenerator
Declaration
public LayoutDescriptorGroup AddTab(LayoutTabSetting tab)
Parameters
Type | Name | Description |
---|---|---|
LayoutTabSetting | tab | The tab to add to the collection of tabs for this layout descriptor |
Returns
Type | Description |
---|---|
LayoutDescriptorGroup | The group created for this tab |
Clone()
Creates a new instance of this class (of type LayoutDescriptor) with all the same property values as this instance
Declaration
public LayoutDescriptor Clone()
Returns
Type | Description |
---|---|
LayoutDescriptor | A new instance of this class with all the same property values as this instance |
CopyFromSource(LayoutDescriptor)
Updates all properties in this item to have the same properties as the source object.
Declaration
public void CopyFromSource(LayoutDescriptor source)
Parameters
Type | Name | Description |
---|---|---|
LayoutDescriptor | source | The source object to copy all values from. |
CopyFromSource(object)
Updates all properties in this item to have the same properties as the source object.
The source object should be of the same type as this one
Declaration
public void CopyFromSource(object source)
Parameters
Type | Name | Description |
---|---|---|
object | source | The source object to copy all values from. Should be of the same type as this one. |
GetTabMainGroup(LayoutTabSetting)
Returns the associated group description of the specified tab
Declaration
public LayoutDescriptorGroup GetTabMainGroup(LayoutTabSetting tab)
Parameters
Type | Name | Description |
---|---|---|
LayoutTabSetting | tab | The tab to retrieve the associated group for |
Returns
Type | Description |
---|---|
LayoutDescriptorGroup | The associated group description of the specified tab |
GetTabs()
A list of all tabs in the layout descriptor in their specified order
Declaration
public IEnumerable<LayoutTabSetting> GetTabs()
Returns
Type | Description |
---|---|
IEnumerable<LayoutTabSetting> | A list of all tabs in the layout descriptor in their specified order |
MoveTabLeft(LayoutTabSetting)
Moves the specified tab to the left (uness it is already first) in the order of tabs displayed to the user of this layout descriptor
Declaration
public void MoveTabLeft(LayoutTabSetting tab)
Parameters
Type | Name | Description |
---|---|---|
LayoutTabSetting | tab | The tab to move the position of |
MoveTabRight(LayoutTabSetting)
Moves the specified tab to the right (unless it is already last) in the order of tabs displayed to the user of this layout descriptor
Declaration
public void MoveTabRight(LayoutTabSetting tab)
Parameters
Type | Name | Description |
---|---|---|
LayoutTabSetting | tab | The tab to move the position of |
RemoveTab(LayoutTabSetting)
Removes the specified tab from this layout descriptor
Declaration
public void RemoveTab(LayoutTabSetting tab)
Parameters
Type | Name | Description |
---|---|---|
LayoutTabSetting | tab | The tab to remove from this layout descriptor |
SelectTab(LayoutTabSetting)
Stores which tab is currently selected by the user within the set of tabs in this layout descriptor
Declaration
public void SelectTab(LayoutTabSetting tab)
Parameters
Type | Name | Description |
---|---|---|
LayoutTabSetting | tab | The current selected tab by the user |