Fill the underline decoration with a solid color brush : TextDecoration « Windows Presentation Foundation « C# / CSharp Tutorial

Home
C# / CSharp Tutorial
1.Language Basics
2.Data Type
3.Operator
4.Statement
5.String
6.struct
7.Class
8.Operator Overload
9.delegate
10.Attribute
11.Data Structure
12.Assembly
13.Date Time
14.Development
15.File Directory Stream
16.Preprocessing Directives
17.Regular Expression
18.Generic
19.Reflection
20.Thread
21.I18N Internationalization
22.LINQ
23.GUI Windows Forms
24.Windows Presentation Foundation
25.Windows Communication Foundation
26.Workflow
27.2D
28.Design Patterns
29.Windows
30.XML
31.XML LINQ
32.ADO.Net
33.Network
34.Directory Services
35.Security
36.unsafe
C# / C Sharp
C# / C Sharp by API
C# / CSharp Open Source
C# / CSharp Tutorial » Windows Presentation Foundation » TextDecoration 
24.10.6.Fill the underline decoration with a solid color brush
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  x:Class="TextDecorationExample.Window1"
  Title="TextDecoration Example"
  Width="720"
  Height="400">
  <StackPanel>
      <TextBlock FontSize="24" Width="180" VerticalAlignment="Center">The lazy dog
        <TextBlock.TextDecorations>
          <TextDecoration Location="Underline" 
            PenThicknessUnit="FontRecommended">
            <TextDecoration.Pen>
              <Pen Brush="Red" Thickness="1" />
            </TextDecoration.Pen>
          </TextDecoration>
        </TextBlock.TextDecorations>
      </TextBlock>
  </StackPanel>
</Window>
WPF Fill The Underline Decoration With A Solid Color Brush
24.10.TextDecoration
24.10.1.TextBlock Underline decoration with dashesTextBlock Underline decoration with dashes
24.10.2.Strikethrough decoration with dashesStrikethrough decoration with dashes
24.10.3.Overline decoration with dashesOverline decoration with dashes
24.10.4.Baseline decoration with dashesBaseline decoration with dashes
24.10.5.Fill the baseline decoration with a linear gradient brushFill the baseline decoration with a linear gradient brush
24.10.6.Fill the underline decoration with a solid color brushFill the underline decoration with a solid color brush
24.10.7.Fill the overline decoration with a linear gradient brushFill the overline decoration with a linear gradient brush
24.10.8.Default underline decorationDefault underline decoration
24.10.9.Default baseline decorationDefault baseline decoration
24.10.10.Default overline decorationDefault overline decoration
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.