wpf VisualBrush 的使用,可建立重複圖像

 

VisualBrush 類(msdn)

 

 <Grid.Background>
                    <VisualBrush TileMode="Tile" Viewport="0,0,1,1">
                        <VisualBrush.Visual>
                            <Button Width="20" Height="20" Background="Red" BorderBrush="Orange" BorderThickness="2"></Button>
                        </VisualBrush.Visual>
                    </VisualBrush>
  </Grid.Background>

 

可設置ViewPort值控制圖像重複方式windows

相關文章
相關標籤/搜索