新聞中心
這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
WPF邊框不同形式的設置技巧
WPF開發(fā)工具為我們帶來了不一樣的編程環(huán)境。對于這樣一款新型的圖形界面處理工具,有許多地方值得我們?nèi)W習?,F(xiàn)在我們先來了解下WPF邊框相關設置方法。#t#

創(chuàng)新互聯(lián)公司專注于澠池網(wǎng)站建設服務及定制,我們擁有豐富的企業(yè)做網(wǎng)站經(jīng)驗。 熱誠為您提供澠池營銷型網(wǎng)站建設,澠池網(wǎng)站制作、澠池網(wǎng)頁設計、澠池網(wǎng)站官網(wǎng)定制、小程序定制開發(fā)服務,打造澠池網(wǎng)絡公司原創(chuàng)品牌,更為您提供澠池網(wǎng)站排名全網(wǎng)營銷落地服務。
WPF邊框設置樣式代碼示例:
- < 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>
定義相應的WPF邊框樣式資源:
RacePitBackgroundBrush
RacePitBorderBrush
類型是WPF邊框,設置相應的屬性如下:
Background
BorderBrush
BorderThickness
CornerRadius
Margin
網(wǎng)頁標題:WPF邊框不同形式的設置技巧
網(wǎng)站URL:http://www.5511xx.com/article/dpphjed.html


咨詢
建站咨詢
