spring mvc 为什么使用接口,然后写个实现类的方式
1个回答
2016-10-30 · 做真实的自己 用良心做教育
千锋教育
千锋教育专注HTML5大前端、JavaEE、Python、人工智能、UI&UE、云计算、全栈软件测试、大数据、物联网+嵌入式、Unity游戏开发、网络安全、互联网营销、Go语言等培训教育。
向TA提问
关注
展开全部
spring mvc 为什么使用接口,然后写个实现类的方式
<Canvas x:Name="canvas1" SizeChanged="canvas1_SizeChanged" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="Red">
<Canvas Width="200" Height="200" x:Name="canvas2" Background="Black" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Canvas>
private void canvas1_SizeChanged(object sender, SizeChangedEventArgs e)
{
canvas2.SetValue(Canvas.LeftProperty, (canvas1.ActualWidth - canvas2.ActualWidth) / 2);
canvas2.SetValue(Canvas.TopProperty, (canvas1.ActualHeight - canvas2.ActualHeight) / 2);
}
<Canvas x:Name="canvas1" SizeChanged="canvas1_SizeChanged" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="Red">
<Canvas Width="200" Height="200" x:Name="canvas2" Background="Black" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Canvas>
private void canvas1_SizeChanged(object sender, SizeChangedEventArgs e)
{
canvas2.SetValue(Canvas.LeftProperty, (canvas1.ActualWidth - canvas2.ActualWidth) / 2);
canvas2.SetValue(Canvas.TopProperty, (canvas1.ActualHeight - canvas2.ActualHeight) / 2);
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询