欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費電子書(shū)等14項超值服

開(kāi)通VIP
WPF窗體透明控件不透明實(shí)例

目的:遮擋下面的窗體

WPF 窗口去除頂部邊框(正宗無(wú)邊框)

最近在做一個(gè)大屏展示視頻圖片的項目,功能并不復雜,半天的工作量吧,一開(kāi)始同事采用的Unity3D進(jìn)行開(kāi)發(fā),但是里面要播放4K視頻,Unity 的短板就是視頻的播放了,今晚就要交付了,我一早就來(lái)公司,決定用WPF重新開(kāi)發(fā)一版,各項功能都好了,唯獨頂部總是顯示一條白色的邊,已經(jīng)設置WindowStyle為None了也沒(méi)用,幸得網(wǎng)上大神提供的資料,終于解決了這個(gè)小問(wèn)題。

XAML內容如下:

<Window x:Class="WPF_VideoPlayer.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:WPF_VideoPlayer" mc:Ignorable="d" Title="MainWindow" Height="350" Width="2880" Loaded="Window_Loaded" WindowChrome.WindowChrome="{DynamicResource WindowChromeKey}" AllowsTransparency="True" WindowStyle="None" ResizeMode="NoResize" WindowState="Maximized" Topmost="True" Background="Black">
<Window.Resources> <WindowChrome x:Key="WindowChromeKey"> <WindowChrome.ResizeBorderThickness> <Thickness>0</Thickness> </WindowChrome.ResizeBorderThickness> </WindowChrome> </Window.Resources>
<Grid> </Grid></Window>

具有透明背景且包含不透明控件的WPF窗口

<Window x:Class="WpfApplication3.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525" AllowsTransparency="True" WindowStyle="None"> <Window.Background> <SolidColorBrush Opacity="0.5" Color="White"/> </Window.Background> <Grid> <Button Width="200" Height="50">button</Button> </Grid></Window>

項目XAML:

<Window x:Class="WpfApp5.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:WpfApp5" mc:Ignorable="d" Title="MainWindow" Height="1080" Width="1920" WindowChrome.WindowChrome="{DynamicResource WindowChromeKey}" AllowsTransparency="True" WindowStyle="None" ResizeMode="NoResize" WindowState="Maximized" Topmost="True" > <Window.Resources> <WindowChrome x:Key="WindowChromeKey"> <WindowChrome.ResizeBorderThickness> <Thickness>0</Thickness> </WindowChrome.ResizeBorderThickness> </WindowChrome> </Window.Resources> <Window.Background> <SolidColorBrush Opacity="0" Color="White"/> </Window.Background> <!--<Grid ShowGridLines="True">--> <Grid > <Grid.RowDefinitions> <RowDefinition Height="50"></RowDefinition> <RowDefinition Height="395"></RowDefinition> <RowDefinition Height="402"></RowDefinition> <RowDefinition Height="186"></RowDefinition> <RowDefinition Height="49"></RowDefinition> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="540"/> <ColumnDefinition Width="398"/> <ColumnDefinition Width="508"/> <ColumnDefinition Width="833"/> </Grid.ColumnDefinitions> <Button Grid.Row="1" Grid.Column="0" Name="btn1" Content="實(shí) 時(shí) 圖 像" VerticalContentAlignment="Center" FontSize="40" FontFamily="Microsoft YaHei UI" Foreground="White" Background="#0850a0" Opacity="1"/> <Button Grid.Row="1" Grid.Column="1" Grid.RowSpan="2" Name="btn2" Content="截 取 圖 像" Foreground="White" VerticalContentAlignment="Center" FontSize="40" FontFamily="Microsoft YaHei UI" Background="#0850a0" Opacity="1"/> <Button Grid.Row="1" Grid.Column="3" Grid.RowSpan="2" Name="btn3" Background="#0850a0" Opacity="1"/> <Button Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="3" Name="btn4" Background="#0850a0" Opacity="1"/> <Button Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="4" Name="btn5" Background="#0850a0" Opacity="1"/> </Grid></Window>
本站僅提供存儲服務(wù),所有內容均由用戶(hù)發(fā)布,如發(fā)現有害或侵權內容,請點(diǎn)擊舉報。
打開(kāi)APP,閱讀全文并永久保存 查看更多類(lèi)似文章
猜你喜歡
類(lèi)似文章
WPF 使用WindowChrome自定義窗體 保留原生窗體特性
WPF content model and layout
WPF工控組態(tài)軟件之溫度計【內附源碼】
WPF簡(jiǎn)單導航框架(Window與Page互相調用)
WPF快速入門(mén)系列(7)
VB.net學(xué)習筆記(十七)XAML
更多類(lèi)似文章 >>
生活服務(wù)
分享 收藏 導長(cháng)圖 關(guān)注 下載文章
綁定賬號成功
后續可登錄賬號暢享VIP特權!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服

欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久