预览加载中,请您耐心等待几秒...
1/5
2/5
3/5
4/5
5/5

在线预览结束,喜欢就下载吧,查找使用更方便

如果您无法下载资料,请参考说明:

1、部分资料下载需要金币,请确保您的账户上有足够的金币

2、已购买过的文档,再次下载不重复扣费

3、资料包下载后请先用软件解压,在使用对应软件打开

翻页自定义控件 效果图: 前台Xaml代码 <UserControlx:Class="MT4FollowOrderBackoffice.UC.PagerControl" 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" mc:Ignorable="d"Name="UC" d:DesignHeight="300"d:DesignWidth="300"Height="25"> <StackPanelOrientation="Horizontal"Height="25"HorizontalAlignment="{BindingHorizontalContentAlignment,ElementName=UC}"> <ButtonContent="&lt;"Width="18"Name="btnPrev"IsEnabled="False"Click="btnPrev_Click"/> <TextBoxWidth="50"Margin="2,0,0,0"Text="{BindingPageIndex,Mode=TwoWay,ElementName=UC}"/> <TextBoxWidth="50"Margin="2,0,2,0"Text="{BindingPageCount,ElementName=UC}"IsReadOnly="True"/> <ButtonContent="&gt;"Width="18"Name="btnNext"IsEnabled="False"Click="btnNext_Click"/> <StackPanelOrientation="Horizontal"Margin="2,0,0,0"> <LabelContent="每页显示"></Label> <TextBoxWidth="35"Text="{BindingPageSize,Mode=TwoWay,ElementName=UC}"Margin="2,0,0,0"></TextBox> <LabelMargin="2,0,0,0"Content="条"></Label> <ButtonMargin="2,0,0,0"Content="OK"></Button> </StackPanel> </StackPanel> </UserControl> 后台代码 usingSystem; usingSystem.Collections.Generic; usingSystem.Linq; usingSystem.Net; usingSystem.Windows; usingSystem.Windows.Controls; usingSystem.Windows.Documents; usingSystem.Windows.Input; usingSystem.Windows.Media; usingSystem.Windows.Media.Animation; usingSystem.Windows.Shapes; namespaceMT4FollowOrderBackoffice.UC { publicpartialclassPagerControl:UserControl { publicPagerControl() { InitializeComponent(); } #regionPageSize publicintPageSize { get{return(int)GetValue(PageSizeProperty);} set{SetValue(PageSizeProperty,value);} } publicstaticreadonlyDependencyPropertyPageSizeProperty=DependencyProperty.Register( "PageSize", typeof(int), typeof(PagerControl), newPropertyMetadata(15,newPropertyChangedCallback(PageSizePropertyChanged))); staticvoidPageSizePropertyChanged(Depen