Create a hatch pattern in WPF
问题 I was able to create stripe patterns in WPF, but how can I create a pattern like this in XAML? Is there a default similar brush for this in WPF? 回答1: You can do it in XAML using VisualBrush. You only need to specify Data values for the Path, for example: XAML <Window.Resources> <VisualBrush x:Key="MyVisualBrush" TileMode="Tile" Viewport="0,0,15,15" ViewportUnits="Absolute" Viewbox="0,0,15,15" ViewboxUnits="Absolute"> <VisualBrush.Visual> <Grid Background="Black"> <Path Data="M 0 15 L 15 0"