/// <summary> /// Gets a custom control for the specified control type. /// </summary> internal static Type GetCustomControlType(CustomWpfControlType customWpfControlType) { if (customControlTypes.ContainsKey(customWpfControlType)) { return(customControlTypes[customWpfControlType]); } return(null); }
/// <summary> /// Sets a custom control for the specified control type. Please see the /// enumeration help for what the types must extend from in order to work. /// </summary> /// <param name="customWpfControlType">The control type that we want to use a custom control for.</param> /// <param name="type">The type of the control to use for the specified customWpfControlType.</param> /// <example> /// <code language="C#"> /// RestApiAuthMgrWpf.SetCustomControlType(CustomWpfControlType.Buttons, typeof(CustomButton)); /// </code> /// </example> public static void SetCustomControlType(CustomWpfControlType customWpfControlType, Type type) { if (customControlTypes.ContainsKey(customWpfControlType)) { customControlTypes[customWpfControlType] = type; } else { customControlTypes.Add(customWpfControlType, type); } }
/// <summary> /// Gets a custom control for the specified control type. /// </summary> internal static Type GetCustomControlType(CustomWpfControlType customWpfControlType) { if (customControlTypes.ContainsKey(customWpfControlType)) return customControlTypes[customWpfControlType]; return null; }
/// <summary> /// Sets a custom control for the specified control type. Please see the /// enumeration help for what the types must extend from in order to work. /// </summary> /// <param name="customWpfControlType">The control type that we want to use a custom control for.</param> /// <param name="type">The type of the control to use for the specified customWpfControlType.</param> /// <example> /// <code language="C#"> /// RestApiAuthMgrWpf.SetCustomControlType(CustomWpfControlType.Buttons, typeof(CustomButton)); /// </code> /// </example> public static void SetCustomControlType(CustomWpfControlType customWpfControlType, Type type) { if (customControlTypes.ContainsKey(customWpfControlType)) customControlTypes[customWpfControlType] = type; else customControlTypes.Add(customWpfControlType, type); }