概述Xaml: <Canvas VerticalAlignment="Bottom" HorizontalAlignment="Right"> <Canvas.Resources> <Storyboard x:Name="storyPopUp"> Xaml: <Canvas VerticalAlignment="Bottom" HorizontalAlignment="Right"> <Canvas.Resources> <Storyboard x:name="storyPopUp"> <DoubleAnimation Duration="0:0:2" From="0" To="-200" Storyboard.Targetname="canvasPopup" Storyboard.TargetProperty="(Canvas.top)" /> </Storyboard> <Storyboard x:name="storyPopDown"> <DoubleAnimation Duration="0:0:2" From="-200" To="0" Storyboard.Targetname="canvasPopup" Storyboard.TargetProperty="(Canvas.top)" /> </Storyboard> </Canvas.Resources> <Canvas VerticalAlignment="Bottom" HorizontalAlignment="Right" x:name="canvasPopup" margin="-300 0 0 0" WIDth="200" Height="200"> <border CornerRadius="8 8 0 0" borderThickness="1" borderBrush="Red" Background="Azure" HorizontalAlignment="Right" VerticalAlignment="top" WIDth="300" Height="200"> <border.Effect> <DropShadowEffect /> </border.Effect> <GrID> <GrID.RowDeFinitions> <RowDeFinition Height="25" /> <RowDeFinition Height="*" /> </GrID.RowDeFinitions> <TextBlock Text=" 警 告" FontSize="12" VerticalAlignment="Center" FontWeight="Black" Foreground="Black" GrID.Row="0" /> <Image WIDth="15" Height="15" Source="/XXXX;component/XXXX/Image/关闭.png" Cursor="Hand" MouseleftbuttonDown="Image_MouseleftbuttonDown" HorizontalAlignment="Right" margin="0 2 8 0"/> <border GrID.Row="1" > <TextBlock margin="0 0 0 30" name="AlertText" textwrapPing="Wrap" FontSize="12" WIDth="190" VerticalAlignment="Center" /> </border> </GrID> </border> </Canvas> </Canvas> cs: private voID UserControl_Loaded(object sender,RoutedEventArgs e) { storyPopUp.Begin(); } private voID Image_MouseleftbuttonDown(object sender,MousebuttonEventArgs e) { this.storyPopDown.Begin(); } 总结
以上是内存溢出为你收集整理的Silverlight制作右下角伸缩提示全部内容,希望文章能够帮你解决Silverlight制作右下角伸缩提示所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
评论列表(0条)