namespace OSS.Application.WebServices
{
#nullable disable
///
/// The BreadcrumbItem data-model supports Breadcrumb and TreeView type web components.
///
public class BreadcrumbItem
{
//--- unique to Telerik Components: TreeView and Breadcrumb ----------
///
/// The text shown for the breadcrumb (or treeview item).
/// Defines the Text DataField of the Datasource.
///
public string Text
{
get
{
return _text;
}
set
{
_text = value;
_originalText = value;
}
}
protected string _text;
protected string _originalText;
//*** Graphics ***
// NOTE: only one value will be used in the following order of precedence: ImageUrl, Icon, IconClass
///
/// Defines the ImageUrl DataField of the Datasource.
///
public string ImageUrl { get; set; } // <-- not sure about this one
///
/// Defines the Icon DataField of the Datasource.
/// A CSS selector to a font-image to display along side Text.
/// Its value is taken with priority over the 'ImageUrl' property-field.
///
public string Icon { get; set; }
///
/// Defines the IconClass DataField of the Datasource.
/// To display along side Text.
/// Its value is taken with priority over the 'Icon' and 'ImageUrl' property-fields.
///
public string IconClass { get; set; }
//*** Navigation ***
/**
Defines the Url DataField of the Datasource.
How To disable the auto-click Url navigation in the TelerikTreeView component:
Assign the Telerik 'URLField' attribute-parameter a value that does not match a property name in the model assigned to the 'Data' attribute-parameter:
Example: add the following attribute-parameter:
<TreeViewBinding UrlField="UrlDummy"></TreeViewBinding>
Now use NavigationManager.NavigateTo() in your on-click custom code-behind.
*/
public string Url // <-- CAUTION: if the target model uses the same name (ie 'Url') the Telerik TreeView may auto-attempt navigation
{
get
{
if (Disabled) return null;
return _url;
}
set
{
_url = value;
}
}
private string _url;
//--- unique to telerik Breadcrumb -----------------------------------
///
/// Typically shown as tooltip type text.
/// Title supports a defacto standard HTML Tag attribute (eg title="over-over tooltip here").
///
public string Title { get; set; }
///
/// 'true' = not clickable.
///
public bool Disabled { get; set; }
///
/// The CSS class that will be rendered on the main wrapping container of the item.
///
public string Class { get; set; }
//--- Not Telerik Properties: the following are related and used along with the URL Property ---
///
/// Hide (emove) the Item.
/// if also a 'TreeItem' then the items removed from the list for items with HasChildren = false.
///
public bool Hidden { get; set; }
///
/// The Blazor Component name to be shown as the page content area (ie @Body in MainLayout.razor).
/// Reccommended using the name of the actual blazor .net component ( ie (SystemUserGrid) ).
///
public string PageComponent { get; set; }
///
/// An optional route segment value to further qualify to a single TreeItem unique route.
/// Leave this value as if used in the PageComponent to programatically modify the visual UI appearance of the page content.
///
public string SegmentAction1 { get; set; }
///
/// An optional route segment value to further qualify to a single TreeItem unique route.
/// Leave this value as if used in the PageComponent to programatically modify the visual UI appearance of the page content.
///
public string SegmentAction2 { get; set; }
// public IDictionary ComponentParameters { get; set; } // <-- if a match, then can include extra parameters
///
/// The query string portion of the Url.
/// Does not include the question mark ('?').
///
public string Query { get; set; }
///
/// Use this to navigate to an on-page HTML "Anchor".
/// The fragment portion of the Url (eg #myfragment).
/// Does not include the pound sign ('#').
///
public string Fragment { get; set; } // <-- use this to navigate to an on-page HTML "Anchor"
///
/// An enum specifying the intent of the link type related properties (eg Url, Query, Fragment and ComponentType).
///
public LinkIntent Intent { get; set; }
public object PageState { get; set; }
//public int PageNumber { get; set; } = 1;
//public int? PageSize { get; set; }
}
}
/* TELERIK BREADCRUMB
Telerik Page: https://docs.telerik.com/blazor-ui/components/breadcrumb/data-binding
Breadcrumb Item Features:
*** Displayed Text ***
TextField => Text ###
TitleField => Title
*** Functional & Additional Rendering ***
DisabledField => Disabled
ClassField => Class
*** Graphics ***
ImageUrlField => ImageUrl ###
IconField => Icon ###
IconClassField => IconClass ###
*** Naviation ***
UrlField => Url ###
NOTE: '###' denotes are also properties of the Telerik TreeView component too
*/
/* TELERIK TREEVIEW
Telerik Page: https://docs.telerik.com/blazor-ui/components/treeview/data-binding/overview
Treeview Item Features:
*** Unique Id and Displayed Text ***
IdField => Id
TextField => Text ###
*** Item Relations ***
HasChildrenField => HasChildren
ParentIdField => ParentId
ItemsField => Items
Level -
*** Graphics ***
ImageUrlField => ImageUrl ###
IconField => Icon ###
IconClassField => IconClass ###
*** Naviation ***
UrlField => Url ###
NOTE: '###' denotes are also properties of the Telerik BreadCrumb component too
Level: Used for defining different bindings for different levels.
If no level is set, the bindings are taken as default for any level that does not have explicit settings.
You should have one TelerikTreeViewBinding without a level.
*/