コード例 #1
0
        /// <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);
        }
コード例 #2
0
 /// <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);
     }
 }
コード例 #3
0
		/// <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;
		}
コード例 #4
0
		/// <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);
		}