Added documentation

pull/83/head
David Hall 2019-11-22 18:43:08 -07:00
parent b1503bf24e
commit dbba1f3220
2 changed files with 13 additions and 4 deletions

View File

@ -1,13 +1,19 @@
using System;
using System.Runtime.InteropServices;
using System.Windows.Forms;
using static Vanara.PInvoke.ComCtl32;
using static Vanara.PInvoke.User32;
namespace Vanara.Extensions
{
/// <summary>Extension methods for <see cref="ButtonBase"/>.</summary>
public static partial class ButtonExtension
{
/// <summary>Sets a value that determines if the shield icon is shown on the button to indicate that elevation is required.</summary>
/// <param name="btn">The <see cref="ButtonBase"/> instance.</param>
/// <param name="required">
/// If set to <see langword="true"/>, the shield icon will be shown on the button. If <see langword="false"/>, the button will
/// display normally.
/// </param>
/// <exception cref="PlatformNotSupportedException">This method is only support on Windows Vista and later.</exception>
public static void SetElevationRequiredState(this ButtonBase btn, bool required = true)
{
if (Environment.OSVersion.Version.Major >= 6)

View File

@ -1,13 +1,16 @@
using System;
using System.Runtime.InteropServices;
using System.Windows.Forms;
using static Vanara.PInvoke.ComCtl32;
using static Vanara.PInvoke.User32;
namespace Vanara.Extensions
{
/// <summary>Extension methods for <see cref="ComboBox"/>.</summary>
public static partial class ComboBoxExtension
{
/// <summary>Sets the text displayed on a <see cref="ComboBox"/> when no item has been selected.</summary>
/// <param name="cb">The <see cref="ComboBox"/> instance.</param>
/// <param name="cueBannerText">The cue banner text.</param>
/// <exception cref="PlatformNotSupportedException">This method is only support on Windows Vista and later.</exception>
public static void SetCueBanner(this ComboBox cb, string cueBannerText)
{
if (System.Environment.OSVersion.Version.Major >= 6)