silverlight

Stopwatch for silverlight?

ⅰ亾dé卋堺 提交于 2019-12-18 14:03:22
问题 There is no StopWatch for Silverlight. What would you use instead of it? I saw some posts about people saying to create an empty animation and call GetCurrentTime() from the Storyboard class, I couldn't get it to work... What would you do? 回答1: This is what I did. Its simple and worked very well for me: long before = DateTime.Now.Ticks; DoTheTaskThatNeedsMeasurement(); long after = DateTime.Now.Ticks; TimeSpan elapsedTime = new TimeSpan(after - before); MessageBox.Show(string.Format("Task

Threading multiple async calls

大兔子大兔子 提交于 2019-12-18 13:37:22
问题 Part of my Silverlight application requires data from three service requests. Up until now I've been chaining the requests so as one completes the other starts... until the end of the chain where I do what I need to do with the data. Now, I know thats not the best method(!). I've been looking at AutoResetEvent (link to MSDN example) to thread and then synchronize the results but cannot seem to get this to work with async service calls. Does anyone have any reason to doubt this method or

Visual Studio 2008 Xaml Editor not working / disappeared

天大地大妈咪最大 提交于 2019-12-18 13:33:55
问题 When I start up VS 2008 to work on a WPF / Silverlight App and open a XAML or XML file the XAML / XML editor is no longer working. The designer does not show up and intellisense is unavailable. It basically looks like a text file has been opened. 回答1: Try running the following command. "%ProgramFiles%\Microsoft Visual Studio 9.0\Common7\ide\devenv" /resetSkipPkgs If that doesn't work try repairing the Visual Studio Install Start -> Control Panel Add Remove Programs Select VS Choose repair 回答2

Showing custom tooltip?/Popup when hovering over an object in Silverlight

核能气质少年 提交于 2019-12-18 13:31:31
问题 How can I go about getting similar popup/hover/tooltip ( see image below ) when I hover or click on an object in my Silverlight app? Update: ( added bounty ) I am looking for a control which can drop a shadow and show the arrow. I want like 3-4 lines of data which I can pass in as the control's properties. popup exampe http://www.freeimagehosting.net/uploads/4a78a786fc.gif 回答1: Expression Blend 4 has this kind of callout shape and you can apply a <DropShadowEffect/> to it. To put text inside,

how to rename a project without killing solution

血红的双手。 提交于 2019-12-18 13:12:53
问题 When I rename a project within a solution, and then try and build that project, I get the error: "The project file "xyz.csproj" was not found. Where xyz is the old project file name! The annoying thing is that I can search my project & solution for the old project file name, and the search will come up with nothing, and when I click on the error VS does nothing. So there seems to be no way of finding where the old reference is. This is a .web project hosting a silverlight page, if that makes

Silverlight vs Flash vs HTML5, should I care?

北城余情 提交于 2019-12-18 13:10:12
问题 I have read a range of articles on advantages/disadvantages of Microsoft Silverlight framework in comparisson to Flash. Fact that there were two version of Silverlight in the past 18 months worries me, as well as the fact that over 97% of web browsers already have Flash pre-installed. I'm a .NET developer and I'm very happy with what I can do in the framework. At the moment I feel like I have to put my own preference to a side and decide whether I need to integrage flash with .NET instead of

Can not find System.Windows Assembly

做~自己de王妃 提交于 2019-12-18 12:45:37
问题 This is the error we get: Error 1 The type 'System.Windows.Point' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'. C:\PacMan\PacMan\PacMan\PacManTests\UnitTest1.cs 65 13 PacManTests We get this error in our unit test project which cant find the System.Windows Assembly but our main project can find the assembly and run it fine. Does anyone have any input or advice on where

How to get the position of an element in a StackPanel?

冷暖自知 提交于 2019-12-18 12:32:46
问题 Say I have a StackPanel that gets dynamically filled with copy, changing the Y position of elements inside it. I have a specific element within that StackPanel that I want to find the Y position of (relative to the StackPanel or otherwise) after the StackPanel is done repositioning all of it's children. StackPanel sp = new StackPanel(); sp.Children.Add(someTextBlock); sp.Children.Add(element1); sp.Children.Add(element2); ... someTextBlock.Text = "Lorem ipsum dolor..." // some text that pushes

Run Silverlight with Apache Server (Under linux)

被刻印的时光 ゝ 提交于 2019-12-18 12:27:07
问题 I need to deploy a Silverlight 2.0 application to an Apache Server, but it's under Linux. Is this possible? I mean, Do I need .Net 3.5 installed in the server and a Web Site that can execute Asp.Net? Thanks for you help... 回答1: If the apache server is just serving up the silverlight application without any ASPX pages then you should be fine. Silverlight is a client side technology so it shouldn't require .NET on the server (unless of course you are hosting the silverlight application on an

VS2010: Warning on add project reference to Silverlight project from .NET project

北城余情 提交于 2019-12-18 12:26:05
问题 In VS2010, Silverlight 4, .NET 4, I've got a WCF service and a Silverlight app, and Silverlight is accessing the class not with Add Service Reference but by sharing the contract. Naturally, this means I have the contract in a Silverlight class library, and the service has a project reference to that library. Strangely, this results in a /!\ icon on the reference, and a warning: The project 'SilverlightClassLibrary1' cannot be referenced. The referenced project is targeted to a different