이 설명서는 보관되지만 유지 되지 않습니다.

DashStyle.Dashes 속성

Gets or sets the collection of dashes and gaps in this DashStyle.

네임스페이스: System.Windows.Media
어셈블리: PresentationCore(presentationcore.dll)
XML 네임스페이스:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

public DoubleCollection Dashes { get; set; }
/** @property */
public DoubleCollection get_Dashes ()

/** @property */
public void set_Dashes (DoubleCollection value)

public function get Dashes () : DoubleCollection

public function set Dashes (value : DoubleCollection)

<object>
  <object.Dashes>
    <DoubleCollection .../>
  </object.Dashes>
</object>
<object Dashes="DoubleCollection" .../>

속성 값

The collection of dashes and gaps. The default value is an empty DoubleCollection.

This collection describe the length of alternating dashes and gaps. The values in the collection are in terms of multiples of the Thickness of the Pen. For example, an array of 1,2 would be a dash of length (1 * Thickness) followed by a gap of length (2 * Thickness).

If there are an odd number of values in the collection, the values are interpreted as if they had been repeated once to produce an even number of values. For example, a collection containing 2,3,5 would be interpreted the same as a collection containing 2,3,5,2,3,5.

Negative values in the array will be interpreted as their absolute value.

The following example shows how to use the DashStyle property of a Pen to create a dashed line under text.

<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >
  <StackPanel Margin="20">

    <TextBlock FontSize="36">
      the lazy brown dog.
      <TextBlock.TextDecorations>
        <TextDecoration Location="Underline"  
          PenThicknessUnit="FontRecommended">
          <TextDecoration.Pen>
            <Pen Thickness="1.5" Brush="Red" >

              <!-- For the underline, create a dashed line with each
                   dash twice the thickness of the Pen and each gap 8 times
                   the thickness of the Pen. -->
              <Pen.DashStyle>
                <DashStyle Dashes="2,8"/>
              </Pen.DashStyle>
            </Pen>
          </TextDecoration.Pen>
        </TextDecoration>
      </TextBlock.TextDecorations>
    </TextBlock>
  </StackPanel>
</Page>

Microsoft .NET Framework 3.0은 Windows Vista, Microsoft Windows XP SP2 및 Windows Server 2003 SP1에서 지원됩니다.

.NET Framework

3.0에서 지원
표시: