* MoonlightTypeConverter.cs: Convert CacheMode's from strings.
[moon.git] / test / xaml / test-textblock-examples.xaml
blobc903e053a73a95cc556646e7dc6650482fa2d414
1 <Canvas xmlns="http://schemas.microsoft.com/client/2007">
3   <Canvas>
4     <Rectangle Stroke="Black" Width="500" Height="80"/>
5     <TextBlock FontFamily="Arial" Width="400" Text="Sample text formatting runs">
6       <LineBreak/>
7       <Run Foreground="Maroon" FontFamily="Courier New" FontSize="24">Courier New 24</Run>
8       <LineBreak/>
9       <Run Foreground="Teal" FontFamily="Times New Roman" FontSize="18" FontStyle="Italic">Times New Roman Italic 18</Run>
10       <LineBreak/>
11       <Run Foreground="SteelBlue" FontFamily="Verdana" FontSize="14" FontWeight="Bold">Verdana Bold 14</Run>
12     </TextBlock>
13   </Canvas>
15   <Canvas Top="80">
16     <Rectangle Stroke="Black" Width="500" Height="190"/>
18     <!-- TextBlock with a single brush applied to the text. -->
19     <TextBlock FontSize="32" FontWeight="Bold" Foreground="Maroon">
20       Maroon
21     </TextBlock>
23     <!-- TextBlock with three brushes applied to the text. -->
24     <TextBlock Canvas.Top="60" FontFamily="Arial" FontSize="32" FontWeight="Bold" Foreground="Navy">
25       Navy
26       <Run Text="DodgerBlue " Foreground="DodgerBlue"/>
27       <Run Text="LightSteelBlue " Foreground="LightSteelBlue"/>
28     </TextBlock>
30     <!-- TextBlock with a linear gradient brush applied to the text. -->
31     <TextBlock Canvas.Top="100" FontFamily="Verdana" FontSize="32" FontWeight="Bold">
32       LINEAR GRADIENT BRUSH
33       <TextBlock.Foreground>
34         <LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
35           <GradientStop Color="Red" Offset="0.0" />
36           <GradientStop Color="Orange" Offset="0.2" />
37           <GradientStop Color="Yellow" Offset="0.4" />
38           <GradientStop Color="Green" Offset="0.6" />
39           <GradientStop Color="Blue" Offset="0.8" />
40           <GradientStop Color="Violet" Offset="1.0" />
41         </LinearGradientBrush>
42       </TextBlock.Foreground>
43       <TextBlock.RenderTransform>
44         <ScaleTransform ScaleY="3.0" />
45       </TextBlock.RenderTransform>
46     </TextBlock>
47   </Canvas>
49   <Canvas Top="270">
50     <Rectangle Stroke="Black" Width="500" Height="125"/>
51     <TextBlock FontFamily="Verdana" FontSize="32" FontWeight="Bold" Foreground="SteelBlue" Text="Scaled Text"/>
53     <!-- Scale the text width using a ScaleTransform. -->
54     <TextBlock Canvas.Top="40" FontFamily="Verdana" FontSize="32" FontWeight="Bold" Foreground="SteelBlue" Text="Scaled Text">
55       <TextBlock.RenderTransform>
56         <ScaleTransform ScaleX="1.5" ScaleY="1.0" />
57       </TextBlock.RenderTransform>
58     </TextBlock>
60     <!-- Scale the text height using a ScaleTransform. -->
61     <TextBlock Canvas.Top="80" FontFamily="Verdana" FontSize="32" FontWeight="Bold" Foreground="SteelBlue" Text="Scaled Text">
62       <TextBlock.RenderTransform>
63         <ScaleTransform ScaleX="1.0" ScaleY="1.5" />
64       </TextBlock.RenderTransform>
65     </TextBlock>
66   </Canvas>
68 </Canvas>