mirror of https://github.com/dahall/Vanara.git
Added documentation
parent
b1503bf24e
commit
dbba1f3220
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue