久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

如何將 .PNG 圖像設置為我的 WPF 表單的 TILED 背景

How to set a .PNG image as a TILED background image for my WPF Form?(如何將 .PNG 圖像設置為我的 WPF 表單的 TILED 背景圖像?)
本文介紹了如何將 .PNG 圖像設置為我的 WPF 表單的 TILED 背景圖像?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我正在自學 WPF,但我似乎無法找到一種方法來完成這項工作.

I'm learning WPF on my own and I can't seem to find a way to make this work.

這是我的代碼:

<Window x:Class="Test.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Test" Height="600" Width="800" >
<DockPanel>
    <Menu DockPanel.Dock="Right"
          Height="30"              
          VerticalAlignment="Top"
          Background="#2E404B"
          BorderThickness="2.6">
        <Menu.BitmapEffect>
            <DropShadowBitmapEffect Direction="270" ShadowDepth="3" Color="#2B3841"/>
        </Menu.BitmapEffect>                          
    </Menu>
</DockPanel>

如何使平鋪背景圖像出現?

How can I make a tiled background image appear?

推薦答案

或者,也許,您可以使用 視覺畫筆:

Or, perhaps, you could use Visual Brush:

<Window
    x:Class="Test.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Test" Height="600" Width="800">
  <Window.Background>
    <VisualBrush TileMode="Tile" Viewport="0,0,0.5,0.5">
      <VisualBrush.Visual>
        <Image Source="image.png"></Image>
      </VisualBrush.Visual>
    </VisualBrush>
  </Window.Background>
</Window>

Viewport 屬性設置基本圖塊的位置和尺寸.查看此處的示例.

The Viewport property sets the position and dimensions of the base tile. Have a look at examples here.

基本上,0,0,0.5,0.5" 意味著基礎圖塊將占用從點 (0,0) 到 (0.5,0.5) 的空間 - 即從左上角輸出區域的角落到中心.(1,1) 是右下角.您應該使用 MSDN Library.這真的很有用.所有的答案都在那里.

Basically, "0,0,0.5,0.5" means that the base tile will take space from point (0,0) to (0.5,0.5) - i.e. from the upper left corner of the output area to centre. (1,1) is the lower right corner. You should make use of MSDN Library. It's really useful. All the answers are there.

這篇關于如何將 .PNG 圖像設置為我的 WPF 表單的 TILED 背景圖像?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Is there a C# library that will perform the Excel NORMINV function?(是否有執行 Excel NORMINV 函數的 C# 庫?)
Select x random elements from a weighted list in C# (without replacement)(從 C# 中的加權列表中選擇 x 個隨機元素(無需替換))
Create a summary description of a schedule given a list of shifts(給定輪班列表,創建時間表的摘要描述)
C# Normal Random Number(C# 普通隨機數)
Standard deviation of generic list?(通用列表的標準偏差?)
AsyncCTP: Creating a class that is IAwaitable(AsyncCTP:創建一個 IAwaitable 的類)
主站蜘蛛池模板: 国产精品区二区三区日本 | 精品亚洲一区二区三区 | 亚洲一区二区在线播放 | 一区二区三区在线免费观看视频 | 蜜臀91视频 | 日韩欧美一区在线 | 国产一级片在线播放 | 久久久久一区二区三区 | 国产免费一区二区三区免费视频 | 午夜电影福利 | 中文在线a在线 | 亚洲av毛片 | 成人乱人乱一区二区三区软件 | 欧美男人的天堂 | 国产精品毛片一区二区三区 | 2019精品手机国产品在线 | 国产高清精品一区二区三区 | 国产精品福利网站 | 亚洲日韩中文字幕一区 | 99re在线视频 | 看黄在线| 国产ts一区 | 国产午夜精品一区二区三区嫩草 | 伊人超碰 | 中文字幕二区 | 国产男女精品 | 嫩草视频网站 | 特黄视频 | 免费黄篇 | 欧美久久天堂 | jizz18国产 | av免费网站在线观看 | 成人动漫一区二区 | 又黄又色| 伊人免费网 | 国产精品久久久久久久久久免费看 | 国产蜜臀97一区二区三区 | 欧美片网站免费 | 国产精品久久久久aaaa | 免费一区二区 | 成人精品区 |