Mega Code Archive

 
Categories / VB.Net / WPF
 

Texts Foreground = ImageBrush The resulting text is filled with an image

<Page  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"     x:Class="Microsoft.Samples.Graphics.UsingImageBrush.TilingExample" >   <Grid Margin="20">     <TextBlock Grid.Row="6" Grid.Column="2" FontWeight="Bold" FontSize="48pt" TextWrapping="Wrap"      HorizontalAlignment="Left" Text="Some Text">       <TextBlock.Foreground>         <ImageBrush ImageSource="c:\image.jpg" />       </TextBlock.Foreground>     </TextBlock>   </Grid> </Page>