This article was translated by machine. To view in the article in English, select the English check box. You can also display the English text in a popup window by moving the mouse pointer over the text.
الترجمة
الأصلي
This documentation is archived and is not being maintained.

TextBoxBase.SelectionOpacity الخاصية

Visual Studio 2010

الحصول أو تعيين معدل الشفافية SelectionBrush.

مساحة الاسم:  System.Windows.Controls.Primitives
التجميع:  PresentationFramework (في PresentationFramework.dll)
XMLNS لـ XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation

public double SelectionOpacity { get; set; }
<object SelectionOpacity="double" .../>

قيمة الخاصية

النوع: System.Double
The opacity of the SelectionBrush. يكون الطول الافتراضي هو 0.4.

If SelectionOpacity is set to 0, the SelectionBrush is transparent and is not visible. If SelectionOpacity is set to 1.0 or greater, the SelectionBrush is opaque and the selected text is not visible.

The following example creates a TextBox and adds the text, "This is some text." The example sets the SelectionBrush property to red and the SelectionOpacity property to 0.5 to customize the appearance of selected text.


<TextBox SelectionBrush="Red" SelectionOpacity="0.5"
         Foreground="Blue" CaretBrush="Blue">  
  This is some text.
</TextBox>


The following illustration shows the TextBox from the preceding example with its text selected.

Selected text in a TextBox with SelectionOpacity set to 0.5

TextBox مع SelectionBrush بلون أحمر

نظام التشغيل Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008, نظام التشغيل Windows Server 2003

لا يدعم .NET Framework و .NET Compact Framework كافة الإصدارات الخاصة بكل نظام أساسي. للحصول على قائمة بالإصدارات المدعمة، راجع متطلبات النظام إطار عمل .NET.

.NET Framework

مدعوم في: 4

NET Framework. Client Profile

مدعوم في: 4
إظهار: