WPF Window無邊框窗體陰影效果

2022-01-12 05:33:18 字數 1084 閱讀 7739

wpf通過windowchrome實現window無邊框窗體陰影效果

**:

"

suncreate.pacp.client.ui.gis.cameradetailswin

"xmlns="

"xmlns:x="

"xmlns:d="

"xmlns:mc="

"xmlns:local="

clr-namespace:suncreate.pacp.client.ui

"mc:ignorable="d"

title="

cameradetailswin

" height="

780" width="

1200

" loaded="

window_loaded

"windowstyle="

none

" resizemode="

canresize

" showintaskbar="

false

" windowstartuplocation="

centerscreen

" background="

transparent

">

"60"

glassframethickness="1"

useaerocaptionbuttons="

false

"nonclientframeedges="

none

"cornerradius="0"

resizeborderthickness="

0">

view code

windows設定:

關鍵點:

glassframethickness="1"

resizemode="canresize"

resizeborderthickness="0"

效果:窗體有陰影,窗體不能調整大小,但是雙擊標題欄可以最大化

參考部落格:

拖動無邊框窗體

frm main.cs 1 using system 2using system.collections.generic 3using system.componentmodel 4using system.data 5using system.drawing 6using system.linq ...

C 移動無邊框窗體

private point mouseoffset private bool ismousedown false private void form1 mousedown object sender,system.windows.forms.mouseeventargs e private void...

WPF 無邊框窗體設定

網路上流傳的無邊框wpf窗體可以說是有點簡陋了.如最大化後無法繼續拖拽移動,最大化後遮住工作列等.我從外網上查詢寫了乙個較為完整的無邊框窗體設定.視窗屬性xaml 視窗陰影xaml 視窗系統邊框屬性xaml 後台 private bool mrestorefordragmove public mai...