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
Inheritance
Inherited Members
Namespace: LemonEdge.Client.Core.Views.DefaultLayouts
Assembly: ClientCore.dll
Syntax
[DataContract(IsReference = true)]
public class LayoutDescriptor : ICloneable, ICloneable<LayoutDescriptor>
Properties
Name
The name of this layout descriptor
Declaration
public string Name { get; set; }
Property Value
| Type | Description |
|---|---|
| System.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()
Declaration
public LayoutDescriptor Clone()
Returns
| Type | Description |
|---|---|
| LayoutDescriptor |
CopyFromSource(LayoutDescriptor)
Declaration
public void CopyFromSource(LayoutDescriptor source)
Parameters
| Type | Name | Description |
|---|---|---|
| LayoutDescriptor | source |
CopyFromSource(Object)
Declaration
public void CopyFromSource(object source)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | source |
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 |
|---|---|
| System.Collections.Generic.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 |
Explicit Interface Implementations
ICloneable.Clone()
Declaration
object ICloneable.Clone()
Returns
| Type | Description |
|---|---|
| System.Object |