EN
Данное содержимое не доступно на вашем языке, используйте версию на английском языке.

Control.BorderBrush Property

Gets or sets a brush that describes the border background of a control. This is a  dependency property.

Namespace: System.Windows.Controls
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

[BindableAttribute(true)] 
public Brush BorderBrush { get; set; }
/** @property */
public Brush get_BorderBrush ()

/** @property */
public void set_BorderBrush (Brush value)

public function get BorderBrush () : Brush

public function set BorderBrush (value : Brush)

For XAML information, see the Brush type.

Property Value

The brush that is used to fill the control's border; the default value is Transparent.

The following example shows how to set the border brush property of a control.

<Button Name="btn6" BorderBrush="Red" 
        Click="ChangeBorderBrush">
  BorderBrush
</Button>

void ChangeBorderBrush(object sender, RoutedEventArgs e)
{
    if (btn6.BorderBrush == Brushes.Red)
    {
        btn6.BorderBrush = Brushes.Black;
        btn6.Content = "Control border brush changes from red to black.";

    }
    else
    {
        btn6.BorderBrush = Brushes.Red;
        btn6.Content = "BorderBrush";
        }
}

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Добавления сообщества

Показ:
© 2014 Microsoft