//File:Window.xaml.vb Imports System Imports System.Collections.Generic Imports System.Text Imports System.Windows Imports System.Windows.Controls Imports System.Windows.Data Imports System.Windows.Documents Imports System.Windows.Input Imports System.Windows.Media Imports System.Windows.Media.Imaging Imports System.Windows.Shapes Imports System.Threading Namespace GlyphExamples Public Partial Class GlyphClipping Inherits System.Windows.Window Public Sub New() InitializeComponent() Dim text As New FormattedText("CLIP!", Thread.CurrentThread.CurrentUICulture, FlowDirection.LeftToRight, New Typeface("Gill Sans Ultra Bold"), 20, Brushes.Black) Dim textGeometry As Geometry = text.BuildGeometry(New Point(0, 0)) button1.Clip = textGeometry End Sub End Class End Namespace