随笔分类 -  SliverLight

摘要:APP.CS public App() { this.Startup += this.Application_Startup; this.Exit += this.Application_Exit; this.UnhandledException += this.Application_UnhandledException; this.CheckAndDownloadUpdateCompleted += new CheckAndDownloadUpdateCompletedEve... 阅读全文
posted @ 2011-09-12 22:58 陈跳跳 阅读(254) 评论(0) 推荐(0)
摘要:XAML: <Grid x:Name="MainGrid"> <ScrollViewer x:Name="canvasScroller" VerticalScrollBarVisibility="Hidden" HorizontalScrollBarVisibility="Hidden" > <Canvas x:Name="LayoutRoot" Width="1024" Height=... 阅读全文
posted @ 2011-09-09 15:58 陈跳跳 阅读(400) 评论(0) 推荐(0)
摘要:XAML: <Canvas> <Image Name="image" ></Image> <ProgressBar Name="progressbar" Width="270" Height="40" Canvas.Left="37" Canvas.Top="212"></ProgressBar> <Button Canvas.Left="94" Canvas.Top="316&q 阅读全文
posted @ 2011-08-26 19:06 陈跳跳 阅读(377) 评论(0) 推荐(0)
摘要:<Canvas Background="Yellow" Height="195" Name="canvas1" Width="457"> <Border BorderThickness="30" BorderBrush="Green" Canvas.Left="20" Canvas.Top="40" CornerRadius="30"> </Border> </Canvas& 阅读全文
posted @ 2011-08-25 17:28 陈跳跳 阅读(445) 评论(0) 推荐(0)
摘要:利用鼠标响应事件,定位对象的坐标,以实现拖放功能XAML: <Canvas Background="Yellow" Height="195" Name="canvas1" Width="457"> <Ellipse MouseMove="ellipse1_MouseMove" MouseLeftButtonDown="ellipse1_MouseLeftButtonDown" MouseLeftButtonUp="ellipse1_MouseLef 阅读全文
posted @ 2011-08-25 14:24 陈跳跳 阅读(190) 评论(0) 推荐(0)
摘要:SliverLight4的路由事件,是一种冒泡向上的事件XAML: <StackPanel Background="Green" Height="176" Name="stackPanel1" Width="422" MouseLeftButtonDown="button1_MouseLeftButtonDown"> <Canvas Background="Yellow" Height="136" Name="canvas1&q 阅读全文
posted @ 2011-08-25 11:37 陈跳跳 阅读(157) 评论(0) 推荐(0)
摘要:Xaml: <StackPanel x:Name="sproot" Background="White"> <StackPanel.Resources> <my:Converter x:Key="myConverter"></my:Converter> </StackPanel.Resources> <TextBlock x:Name="tbkDate" Width="180" Margin="5" FontS 阅读全文
posted @ 2011-08-24 22:10 陈跳跳 阅读(191) 评论(0) 推荐(0)
摘要:没什么好说的,挺简单的,直接上Code。XAML: <Grid x:Name="LayoutRoot" Background="White" BindingValidationError="LayoutRoot_BindingValidationError"> <StackPanel> <Button Name="MyButton" Content="Update" Click="MyButton_Click" Width="65&qu 阅读全文
posted @ 2011-08-24 17:50 陈跳跳 阅读(227) 评论(0) 推荐(0)
摘要:XAML: <StackPanel> <Button Name="MyButton" Content="Update" Click="MyButton_Click" Width="65" Height="41"></Button> <TextBlock Height="23" Name="tbtitle" Text="{Binding Title,Mode=OneTime}" /> < 阅读全文
posted @ 2011-08-24 17:05 陈跳跳 阅读(162) 评论(0) 推荐(0)
摘要:XAML: <Button Name="MyButton" Content="Update" Click="MyButton_Click" Width="65" Height="41"></Button> <TextBlock Height="23" Name="tbtitle" Text="{Binding Title,Mode=OneTime}" /> <TextBlock Height=& 阅读全文
posted @ 2011-08-24 15:21 陈跳跳 阅读(540) 评论(0) 推荐(0)
摘要:DispatcherTimer timer = new DispatcherTimer(); timer.Interval = new TimeSpan(0, 0, 1); timer.Tick += new EventHandler(timer_Tick); timer.Start(); 阅读全文
posted @ 2011-08-24 12:04 陈跳跳 阅读(149) 评论(0) 推荐(0)
摘要:<TextBlock Text="文字正在渐变" FontFamily="Arial" FontSize="56"> <TextBlock.Foreground> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="Green"></GradientStop> <GradientStop Color=&qu 阅读全文
posted @ 2011-08-23 16:20 陈跳跳 阅读(137) 评论(0) 推荐(0)
摘要:Application.Current.Host.Content.IsFullScreen = !Application.Current.Host.Content.IsFullScreen; 阅读全文
posted @ 2010-08-26 20:42 陈跳跳 阅读(130) 评论(0) 推荐(0)
摘要:监视性能(FPS)Silverlight的呈现性能会因指定的宿主参数和内容的复杂程度而异。为了监视FPS的值我们在开发的过程中将EnableFrameRateCounter 属性设置为 true。这样浏览器的状态栏中显示所呈现的 Silverlight 内容的每秒帧数 (fps),以便您可以微调应用程序。以下有两种设置EnableFrameRateCounter的方法:1.在Object标签的属性... 阅读全文
posted @ 2010-07-22 14:22 陈跳跳 阅读(250) 评论(0) 推荐(0)
摘要:xaml写法:[代码]c#写法:[代码]其中"/{0};component/{1}"0为xap程序集的名字1为tup在xap中的路径. "img.jpg"在根目录下. 要是有目录"_temp"下的话就应该为 "component/_temp/img.jpg" 阅读全文
posted @ 2010-07-22 14:10 陈跳跳 阅读(361) 评论(1) 推荐(0)
摘要:改变silverlight鼠标样式改变样式是对“Cursor”属性进行设置例子:UIElementID.Cursor = Cursors.Hand;目前可用的光标有:ArrowEraserHandIBeamSizeNSSizeWEStylusWait 阅读全文
posted @ 2010-07-15 13:58 陈跳跳 阅读(1338) 评论(1) 推荐(0)
摘要:注意:Silverlight目前只支持png和jpg格式的图片。 设置背景图片很简单,使用ImageBrush即可。如下:<Grid.Background><ImageBrushImageSource="bg.png"Stretch="Fill"></ImageBrush></Grid.Background> 阅读全文
posted @ 2010-07-15 13:52 陈跳跳 阅读(1619) 评论(0) 推荐(0)
摘要:<ListBox x:Name="MenuList" FontSize="12" SelectionChanged="MenuList_SelectionChanged" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto"></ListB... 阅读全文
posted @ 2010-07-14 16:21 陈跳跳 阅读(9922) 评论(0) 推荐(0)
摘要:silverlight中不存在Flash中的场景,有的只是一个个Xaml文件,你要是愿意,也可以把它看做"场景"或"窗口",刚开始接触sl时,对于多个xaml之间如何切换,调用,传递参数感到很棘手,下面是我总结的几种方法:1、A.xaml跳转到B.xaml(a)首先需要定义一个公用的接口(interface),如下:using System.Windows;namespace ChildWin.C... 阅读全文
posted @ 2010-07-13 17:07 陈跳跳 阅读(281) 评论(0) 推荐(0)