.NET프로그래밍/Silverlight 3.0

TextBlock 컨트롤 : 텍스트 출력

holland14 2009. 12. 1. 11:25


[MainPage.xaml]


<UserControl x:Class="RiaTextBlock.MainPage"

    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"

    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

    mc:Ignorable="d"

    d:DesignHeight="300" d:DesignWidth="400">

 

    <Grid x:Name="LayoutRoot" Background="White">

        <StackPanel>

            <TextBlock x:Name="lblTitle">

            안녕

            </TextBlock>

            <TextBlock x:Name="lblContent">

                <Run FontSize="30" FontStyle="Italic">Hi</Run>

                <LineBreak></LineBreak>

                <Run FontSize="20" TextDecorations="Underline">Hello</Run>

                <LineBreak />

                <Run Text="Bye" Foreground="Blue"></Run>

            </TextBlock>

        </StackPanel>

    </Grid>

</UserControl>