原創(chuàng)|使用教程|編輯:我只采一朵|2016-07-28 11:39:40.000|閱讀 1716 次
概述:本教程教你如何應(yīng)用DevExpress WPF的加載動(dòng)畫控件。
# 界面/圖表報(bào)表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關(guān)鏈接:
LoadingDecorator是一個(gè)容器控件用于顯示 long-loading 的內(nèi)容。內(nèi)容還沒加載完成的時(shí)候會(huì)顯示一個(gè)加載指示器,加載完成后指示器消失,如下圖所示:
用dx:LoadingDecorator標(biāo)簽:
<Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto"/> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <Views:NavigationView/> <dx:LoadingDecorator Grid.Column="1"> <Views:MainView/> </dx:LoadingDecorator> </Grid>
LoadingDecorator提供了一系列屬性,用于自定義Loading Indicator外觀。
定義indicator 布局:LoadingDecorator.SplashScreenTemplate 屬性;
傳遞自定義數(shù)據(jù):LoadingDecorator.SplashScreenDataContext 屬性;
更改加載條位置:LoadingDecorator.SplashScreenLocation 屬性;
將加載條在窗口居中或者容器居中:(SplashScreenLocation.CenterWindow) or (SplashScreenLocation.CenterContainer).
<Grid> ... <dx:LoadingDecorator Grid.Column="1" SplashScreenDataContext="{Binding ... }" SplashScreenLocation="CenterContainer"> <dx:LoadingDecorator.SplashScreenTemplate> <DataTemplate> <Grid> ... </Grid> </DataTemplate> </dx:LoadingDecorator.SplashScreenTemplate> <Views:MainView/> </dx:LoadingDecorator> </Grid>
LoadingDecorator.BorderEffect 和 LoadingDecorator.BorderEffectColor 屬性可以設(shè)置高亮效果。BorderEffect 設(shè)置邊框高亮,BorderEffectColor 設(shè)置邊框高亮顏色。
<dx:LoadingDecorator ... BorderEffect="Default" BorderEffectColor="Blue"> ... </dx:LoadingDecorator>
如果不想要加載條,將 LoadingDecorator.UseFadeEffect 設(shè)置 False 即可。
DevExpress專為企業(yè)客戶提供團(tuán)隊(duì)、企業(yè)授權(quán)優(yōu)惠方案,歡迎來(lái)電咨詢:023-66090381
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請(qǐng)務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請(qǐng)郵件反饋至chenjj@fc6vip.cn