Back to Devexpress

CustomProperties.GetValue(String) Method

dashboard-devexpress-dot-dashboardcommon-dot-customproperties-dot-getvalue-x28-system-dot-string-x29.md

latest6.9 KB
Original Source

CustomProperties.GetValue(String) Method

Returns a value for the custom property name.

Namespace : DevExpress.DashboardCommon

Assembly : DevExpress.Dashboard.v25.2.Core.dll

NuGet Package : DevExpress.Dashboard.Core

Declaration

csharp
public string GetValue(
    string propertyName
)
vb
Public Function GetValue(
    propertyName As String
) As String

Parameters

NameTypeDescription
propertyNameString

A custom property name.

|

Returns

TypeDescription
String

A custom property value.

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the GetValue(String) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-dashboard-custom-properties/CS/WinForms-Dashboard-Custom-Properties/Modules/CustomPropertyExtensions.cs#L9

csharp
public static T GetValue<T>(this CustomProperties property, string name) where T : struct {
    var value = property.GetValue(name);
    if(value == null) return default(T);

wpf-dashboard-custom-properties/CS/Wpf-Dashboard-Custom-Properties/Modules/GridFixedColumnModule/GridFixedColumnModule.cs#L36

csharp
if(column != null) {
    string customProperty = column.CustomProperties.GetValue(GridFixedColumnModule.FixedColumnsPropertyName);
    if(!string.IsNullOrEmpty(customProperty)) {

winforms-dashboard-save-restore-dashboard-state/CS/WinFormsDashboard_DashboardState/Form1.cs#L41

csharp
DashboardState GetStateFromCustomProperty() {
    var customPropertyValue = dashboardViewer1.Dashboard.CustomProperties.GetValue(PropertyName);
    DashboardState state = new DashboardState();

winforms-designer-save-and-apply-dashboard-state/CS/WinDesignerDashboardState/DesignerForm1.cs#L28

csharp
DevExpress.DashboardWin.SetInitialDashboardStateEventArgs e) {
var state = GetDataFromString(dashboardDesigner.Dashboard.CustomProperties.GetValue(PropertyName));
e.InitialState = state;

wpf-dashboard-how-to-set-initial-dashboard-state/CS/WpfDashboard_DashboardState/MainWindow.xaml.cs#L35

csharp
{
    var state = GetDataFromString(dashboardControl.Dashboard.CustomProperties.GetValue(PropertyName));
    e.InitialState = state;

winforms-dashboard-custom-properties/VB/WinForms-Dashboard-Custom-Properties/Modules/CustomPropertyExtensions.vb#L10

vb
Public Function GetValue(Of T As Structure)(ByVal [property] As CustomProperties, ByVal name As String) As T
    Dim value = [property].GetValue(name)
    If value Is Nothing Then

wpf-dashboard-custom-properties/VB/Wpf-Dashboard-Custom-Properties/Modules/GridFixedColumnModule/GridFixedColumnModule.vb#L40

vb
If column IsNot Nothing Then
    Dim customProperty As String = column.CustomProperties.GetValue(GridFixedColumnModule.FixedColumnsPropertyName)
    If (Not String.IsNullOrEmpty(customProperty)) Then

winforms-dashboard-save-restore-dashboard-state/VB/WinFormsDashboard_DashboardState/Form1.vb#L35

vb
Private Function GetStateFromCustomProperty() As DashboardState
    Dim customPropertyValue = dashboardViewer1.Dashboard.CustomProperties.GetValue(PropertyName)
    Dim state = New DashboardState()

winforms-designer-save-and-apply-dashboard-state/VB/WinDesignerDashboardState/DesignerForm1.vb#L27

vb
Private Sub dashboardDesigner_SetInitialDashboardState(ByVal sender As Object, ByVal e As DevExpress.DashboardWin.SetInitialDashboardStateEventArgs)
    Dim state = GetDataFromString(dashboardDesigner.Dashboard.CustomProperties.GetValue(PropertyName))
    e.InitialState = state

wpf-dashboard-how-to-set-initial-dashboard-state/VB/WpfDashboard_DashboardState/MainWindow.xaml.vb#L30

vb
Private Sub dashboardControl_SetInitialDashboardState(ByVal sender As Object, ByVal e As DevExpress.DashboardWpf.SetInitialDashboardStateWpfEventArgs)
    Dim state = GetDataFromString(dashboardControl.Dashboard.CustomProperties.GetValue(PropertyName))
    e.InitialState = state

See Also

CustomProperties Class

CustomProperties Members

DevExpress.DashboardCommon Namespace