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

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

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

問(wèn)題描述

我正在自學(xué) WPF,但我似乎無(wú)法找到一種方法來(lái)完成這項(xiàng)工作.

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>

如何使平鋪背景圖像出現(xiàn)?

How can I make a tiled background image appear?

推薦答案

或者,也許,您可以使用 視覺(jué)畫筆:

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 屬性設(shè)置基本圖塊的位置和尺寸.查看此處的示例.

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

基本上,0,0,0.5,0.5" 意味著基礎(chǔ)圖塊將占用從點(diǎn) (0,0) 到 (0.5,0.5) 的空間 - 即從左上角輸出區(qū)域的角落到中心.(1,1) 是右下角.您應(yīng)該使用 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.

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

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

相關(guān)文檔推薦

Is there a C# library that will perform the Excel NORMINV function?(是否有執(zhí)行 Excel NORMINV 函數(shù)的 C# 庫(kù)?)
Select x random elements from a weighted list in C# (without replacement)(從 C# 中的加權(quán)列表中選擇 x 個(gè)隨機(jī)元素(無(wú)需替換))
Create a summary description of a schedule given a list of shifts(給定輪班列表,創(chuàng)建時(shí)間表的摘要描述)
C# Normal Random Number(C# 普通隨機(jī)數(shù))
Standard deviation of generic list?(通用列表的標(biāo)準(zhǔn)偏差?)
AsyncCTP: Creating a class that is IAwaitable(AsyncCTP:創(chuàng)建一個(gè) IAwaitable 的類)
主站蜘蛛池模板: 欧美顶级黄色大片免费 | 99精品热 | 亚洲123区| 黄色a毛片 | 狠狠操天天操 | av一区二区三区 | 福利视频二区 | 亚洲一区二区久久 | 中文字幕免费观看 | 成人a视频 | 国产精品视频专区 | 成人免费视频国产免费麻豆 | 中国av在线播放 | 日韩精品三级 | 国产黄网| 国产欧美日韩综合精品 | 国产网友自拍 | 蜜桃视频一区二区三区 | 久久久香蕉 | 日韩福利视频 | 在线观看小视频 | 黄色片网站视频 | 黄色一级网站 | 国产精品天堂 | 亚洲成肉网 | 亚洲涩涩涩 | 日韩不卡在线 | 一区二区精品在线 | 欧美狠狠干 | 黄视频免费在线观看 | 激情av网 | 精久久| 久久亚洲天堂 | 日韩av在线网站 | 精品影院| 狠狠干在线 | 天天综合天天做天天综合 | 中文字幕丰满人伦在线 | 国产伦精品一区二区三区四区 | 亚洲一区在线视频 | 成人h片在线观看 |