silverlight

How do I move GPS watcher to App.xaml superclass and Dispatch events to other pages/classes?

痞子三分冷 提交于 2020-02-01 06:35:25
问题 I am new to developing for silverlight/WPF and WP7, however I am familiar with developing C# using console or windows form, so bear with me! I am trying to create a location aware app using the Silverlight SDK and the Microsoft.Maps.MapControl and the System.Device.Location classes. The problem I am having is accessing the "watcher" from other pages. What is the best way to do this. I want to put it outside of my GUI page classes so that when switching between pages, you are not checking for

How does Silverlight determine an assembly is “Silverlight”?

那年仲夏 提交于 2020-01-31 07:22:31
问题 I'm trying to compile code from F# to use in Silverlight. I compile with: --noframework --cliroot "C:\program Files\Microsoft Silverlight\2.0.31005.0" --standalone This generates a standalone assembly that references the SL framework. But when I try to add a reference to the generated assembly, I get this error: You can only add project references to other Silverlight projects in the solution. What is the VS plugin doing to determine that this isn't a Silverlight assembly? Here's the manifest

Convert an image to XAML?

帅比萌擦擦* 提交于 2020-01-31 05:00:30
问题 Does anyone know of any way to convert a simple gif to xaml? E.G. A tool that would look at an image and create elipses, rectangles and paths based upon a gif / jpg / bitmap? 回答1: Illustrator has a trace tool which will do this a cheaper option might be http://vectormagic.com it will export a svg that you should be able to convert to xaml 回答2: Inkscape can trace bitmaps, and can save directly to XAML. And, it happens to be free. I've used it to trace a lot of bitmaps and it's worked really

Using TemplateBinding in ObjectAnimationUsingKeyFrames

戏子无情 提交于 2020-01-30 09:05:20
问题 I try to set the background color of a control when mouse is over it. I try to do it via the visual state manager. I was able to get the following code running: <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Control.Background" Storyboard.TargetName="BorderBackground"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <SolidColorBrush Color="#FF123456" /> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> But i do not want

Using TemplateBinding in ObjectAnimationUsingKeyFrames

浪尽此生 提交于 2020-01-30 09:05:20
问题 I try to set the background color of a control when mouse is over it. I try to do it via the visual state manager. I was able to get the following code running: <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Control.Background" Storyboard.TargetName="BorderBackground"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <SolidColorBrush Color="#FF123456" /> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> But i do not want

为WPF和Silverlight的Grid添加边框线

元气小坏坏 提交于 2020-01-28 11:00:28
Grid是WPF和Silverlight中的一个重要的布局元素,其他的布局元素还有StackPanel, Canvas, Border等等。从字面上说,Grid是一个表格的意思,它的使用也确实很方便,从视觉上很像一个表格的样式,有行,有列的概念,这种效果很适合于需要多多个子控件进行布局,并希望保持左边或者上对齐的效果。 我们来看一个最简单的例子(本文采用Silverlight做演示,在WPF中也是一样的) 使用Grid的时候,一般先定义Grid的行和列的设置,然后在其放置其他控件并且设置他们的行号和列号即可,语法和语义都很简单和清晰 <UserControl x:Class="SilverlightApplicationGridBorderSample.MainPage" 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

Silverlight PrintDocument Timeout Issues

大城市里の小女人 提交于 2020-01-25 23:23:49
问题 I'm having a problem trying to print from Silverlight. The issue is that I'm printing out several pages of images but the source I have to pull them back from is not incredibly fast and it sometimes takes longer to create the page than the 8 tries that PrintPage makes before failing. Is there a way to make it try more than 8 times extend the amount of time between tries? 回答1: No. You can prepare all the necessary data and caching them on the client side before printing. Also, you can block

一个Java团队开发Silverlight遇到的困惑(开发历程一年的辛酸)

霸气de小男生 提交于 2020-01-25 17:37:21
团队背景: 去年的4月份我加入一个大部分是Java出身的团队, 1)我们的团队结构: 我们的团队写代码的当时大概11人,需求人员3人(3个子系统一个系统一个,当然他们也在维护老系统,我们是二次开发),以为专职测试,也是应届。当时我们的团队情况大致如下:五年以上Java程序员有4人,应届3人(其中一人是销售专业的不是应届,但也是白纸),NET出身的有三人,2人经验丰富(其中一人维护老系统),一人大概两年水平不错,剩下的就是我啦。 2)我们的技术结构: 我们采用Java+Silverlight技术,后台使用java,前台使用Silverlight技术。 历程 当时我加入这个团队的时候开发工作差不多刚刚开始,下面我将经历记录每个月遇到的问题,记录我们这一年的历程。 4月份:我刚刚加入这个团队,当初我们Silverlight前台封装了一些控件,和通信层,是当时这边两位经验丰富的哥们做的,做了些时间,但是没有在项目中使用过,当然这就意味着这套控件会有许多许多的问题,4月份我们没做出几个页面,做出的也有许多的bug。我们几个Silverlight开发人员在修正控件的Bug。 5月份:项目团队基本可以正常开发普通的页面了,大部分java和NET程序员都能前后台开工工作了,当然这个时候我们的工作量是很大的,上面要求我们在9月份完成3个子系统的二次开发,并且要以SaaS模式运营

Silverlight - WCF get clientaccesspolicy on localhost

Deadly 提交于 2020-01-25 13:13:46
问题 I have a Silverlight application which uses WCF for its communications with the server. Both Silverlight and WCF are running on the local machine (localhost). When the Silverlight makes a call to the service it fails with aa communication exception. I understand that this is because I don't have a clientaccesspolicy file, but since the WCF endpoint is running on http://localhost:port I defined an interface, IPolicyRetriver, and added an implementation to the service which is returning the

How to override Silvelright 4 RIA Service AuthenticationService User.IsInRole

半腔热情 提交于 2020-01-25 13:11:28
问题 I've started out with the Silverlight 4 Navigation Application template (RIA Services enabled). (As I really don't like the bloated Business Application Template) I've added an Authentication Service and I'm able to authenticate users, but want to override the User.IsInRole method. WebContext.Current.User.IsInRole("Guest"); But I cannot find any place to override the behaviour. 回答1: What are you trying to do? User.IsInRole is an implementation of IPrincipal.IsInRole and really shouldn't be