ComponentFactory.Krypton.Toolkit.PaletteHeaderButtonRedirect.GetMetricInt C# (CSharp) Method

GetMetricInt() public method

Gets an integer metric value.
public GetMetricInt ( PaletteState state, PaletteMetricInt metric ) : int
state PaletteState Palette value should be applicable to this state.
metric PaletteMetricInt Requested metric.
return int
        public override int GetMetricInt(PaletteState state, PaletteMetricInt metric)
        {
            // Is this the metric we provide?
            if ((metric == PaletteMetricInt.HeaderButtonEdgeInsetPrimary) ||
                (metric == PaletteMetricInt.HeaderButtonEdgeInsetSecondary) ||
                (metric == PaletteMetricInt.HeaderButtonEdgeInsetDockInactive) ||
                (metric == PaletteMetricInt.HeaderButtonEdgeInsetDockActive) ||
                (metric == PaletteMetricInt.HeaderButtonEdgeInsetForm) ||
                (metric == PaletteMetricInt.HeaderButtonEdgeInsetInputControl) ||
                (metric == PaletteMetricInt.HeaderButtonEdgeInsetCustom1) ||
                (metric == PaletteMetricInt.HeaderButtonEdgeInsetCustom2))
            {
                // If the user has defined an actual value to use
                if (ButtonEdgeInset != -1)
                    return ButtonEdgeInset;
            }

            // Pass onto the inheritance
            return _redirect.GetMetricInt(state, metric);
        }