Display Simple Text with TextBlock and set font, alignment : Font « Windows Presentation Foundation « VB.Net Tutorial

Home
VB.Net Tutorial
1.Language Basics
2.Data Type
3.Operator
4.Statements
5.Date Time
6.Class Module
7.Development
8.Collections
9.Generics
10.Attributes
11.Event
12.LINQ
13.Stream File
14.GUI
15.GUI Applications
16.Windows Presentation Foundation
17.2D Graphics
18.I18N Internationlization
19.Reflection
20.Regular Expressions
21.Security
22.Socket Network
23.Thread
24.Windows
25.XML
26.Database ADO.net
27.Design Patterns
VB.Net
VB.Net by API
VB.Net Tutorial » Windows Presentation Foundation » Font 
16.74.3.Display Simple Text with TextBlock and set font, alignment
<Window x:Class="WpfApplication1.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="WPF" Height="100" Width="300">
    <Grid>
        <TextBlock FontFamily="Tahoma, Arial"
                   FontSize="20"
                   FontStyle="Italic"
                   FontWeight="Light"
                   HorizontalAlignment="Center"
                   TextAlignment="Right"
                   TextDecorations="Underline, Strikethrough"
                   TextWrapping="Wrap"
                   VerticalAlignment="Center">
            this is a test
        </TextBlock>
    </Grid>
</Window>
WPF Display Simple Text With Text Block And Set Font Alignment
16.74.Font
16.74.1.FontSize unitsFontSize units
16.74.2.Change a Control's Font Weight on Mouse OverChange a Control's Font Weight on Mouse Over
16.74.3.Display Simple Text with TextBlock and set font, alignmentDisplay Simple Text with TextBlock and set font, alignment
16.74.4.Section Font StyleSection Font Style
16.74.5.Adding TextBlock to StackPanel with different font sizeAdding TextBlock to StackPanel with different font size
16.74.6.Using text format property aliasesUsing text format property aliases
16.74.7.Programmatically change the FontFamily property of a TextBlock element.Programmatically change the FontFamily property of a TextBlock element.
16.74.8.Font Properties SampleFont Properties Sample
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.