新聞中心
WPF開發(fā)工具為我們帶來(lái)了不一樣的編程環(huán)境。對(duì)于這樣一款新型的圖形界面處理工具,有許多地方值得我們?nèi)W(xué)習(xí)。現(xiàn)在我們先來(lái)了解下WPF邊框相關(guān)設(shè)置方法。#t#

創(chuàng)新互聯(lián)公司專注于澠池網(wǎng)站建設(shè)服務(wù)及定制,我們擁有豐富的企業(yè)做網(wǎng)站經(jīng)驗(yàn)。 熱誠(chéng)為您提供澠池營(yíng)銷型網(wǎng)站建設(shè),澠池網(wǎng)站制作、澠池網(wǎng)頁(yè)設(shè)計(jì)、澠池網(wǎng)站官網(wǎng)定制、小程序定制開發(fā)服務(wù),打造澠池網(wǎng)絡(luò)公司原創(chuàng)品牌,更為您提供澠池網(wǎng)站排名全網(wǎng)營(yíng)銷落地服務(wù)。
WPF邊框設(shè)置樣式代碼示例:
- < ResourceDictionary
- xmlns="http://schemas.microsoft.
com/winfx/2006/xaml/presentation" - xmlns:x="http://schemas.microsoft.
com/winfx/2006/xaml" - >
- < Style x:Key="RacePitBorderStyle"
TargetType="Border"> - < Style.Resources>
- < LinearGradientBrush x:Key=
"RacePitBackgroundBrush" StartPoint=
"0.5,0" EndPoint="0.5,1"> - < GradientStop Color="#88000000"
Offset="0.1" /> - < GradientStop Color="#CC000000"
Offset="0.9" /> - < /LinearGradientBrush>
- < LinearGradientBrush x:Key=
"RacePitBorderBrush" StartPoint=
"0.5,0" EndPoint="0.5,1"> - < GradientStop Color="#18000000"
Offset="0.1" /> - < GradientStop Color="#08000000"
Offset="0.9" /> - < /LinearGradientBrush>
- < /Style.Resources>
- < Setter Property="Background"
Value="{StaticResource RacePit
BackgroundBrush}" /> - < Setter Property="BorderBrush"
Value="{StaticResource RacePit
BorderBrush}" /> - < Setter Property="BorderThic
kness" Value="1" /> - < Setter Property="CornerRadius"
Value="8" /> - < Setter Property="Margin"
Value="2,4" /> - < /Style>
- < /ResourceDictionary>
定義相應(yīng)的WPF邊框樣式資源:
RacePitBackgroundBrush
RacePitBorderBrush
類型是WPF邊框,設(shè)置相應(yīng)的屬性如下:
Background
BorderBrush
BorderThickness
CornerRadius
Margin
新聞名稱:WPF邊框不同形式的設(shè)置技巧
文章來(lái)源:http://www.dlmjj.cn/article/dpphjed.html


咨詢
建站咨詢
