RepeatButton
RepeatButton重点在Repeat,是一个重复的按钮,怎么个重复法呢?它是一个重复执行事件的按钮,如下面是一个单击按钮,如果一直按着按钮,它会一直执行事件(注:注意Int32的范围)
XAML代码:
<Grid x:Name="LayoutRoot">
<RepeatButton Width="100" DockPanel.Dock="Top" Delay="500" Interval="100" Click="Increase" Margin="262,39,262,0" VerticalAlignment="Top" Height="129" Content="Increase"/>
<Button Name="btn" Width="100" DockPanel.Dock="Top" FontSize="16" d:LayoutOverrides="Width" HorizontalAlignment="Left" Margin="98,-1.657,0,1.657" Content="0"/>
</Grid>
CS代码:
Void Increase(object sender, RoutedEventArgs e)
{
Int32 Num = Convert.ToInt32(btn.Content);
btn.Content = ((Num + 1).ToString());
}
****欢迎关注我的asp.net core系统课程****
《asp.net core精要讲解》 https://ke.qq.com/course/265696
《asp.net core 3.0》 https://ke.qq.com/course/437517
《asp.net core项目实战》 https://ke.qq.com/course/291868
《基于.net core微服务》 https://ke.qq.com/course/299524
《asp.net core精要讲解》 https://ke.qq.com/course/265696
《asp.net core 3.0》 https://ke.qq.com/course/437517
《asp.net core项目实战》 https://ke.qq.com/course/291868
《基于.net core微服务》 https://ke.qq.com/course/299524