silverlight

Stop containing button from handling input - Silverlight

蹲街弑〆低调 提交于 2020-01-15 12:44:08
问题 I'm working on a custom button where the content is sometimes a textbox. I'm doing this so I have a sort of edit-in-place where you can type text, hit enter, and then the textbox disappears and the button's text is what was typed. So as a simple case, you could mock this up like so: <Button> <TextBox /> </Button> The problem is if you hit the <space> or <enter> while typing it'll "click" the button instead of input those keystrokes into the textbox. Now, like I said, this is a custom button

Stop containing button from handling input - Silverlight

南笙酒味 提交于 2020-01-15 12:42:26
问题 I'm working on a custom button where the content is sometimes a textbox. I'm doing this so I have a sort of edit-in-place where you can type text, hit enter, and then the textbox disappears and the button's text is what was typed. So as a simple case, you could mock this up like so: <Button> <TextBox /> </Button> The problem is if you hit the <space> or <enter> while typing it'll "click" the button instead of input those keystrokes into the textbox. Now, like I said, this is a custom button

How to Convert ImageSource to byte[]?

人走茶凉 提交于 2020-01-15 12:13:10
问题 I try to find in google how to convert imageSource to byte[] - and i can't find the why to do it. Someone can help here ? Thanks. 回答1: If you have a BitmapSource you can use BitmapSource.CopyPixels Method (Array, Int32, Int32) Or alternativeley, for example if you need a ARGB byte sequence: var bmp = new WriteableBitmap((BitmapSource)source); byte[] pixels = bmp.Pixels.SelectMany(p => new byte[] { (byte)p, (byte)(p >> 8), (byte)(p >> 16), (byte)(p >> 24) }).ToArray(); 来源: https:/

Silverlight 2 and large canvases?

被刻印的时光 ゝ 提交于 2020-01-15 10:25:30
问题 I am working on an application that uses several large canvas controls (several thousand pixels across), layered on top of each other. The canvas controls themselves are completely invisible, but each contains a number of controls, mainly images. My question is, is there a recommended maximum size for a canvas, or is it purely a memory issue? And also, are we better off setting the Canvas size to (0, 0) and making use of the fact that we can happily render controls outside of the bounds of

What purpose does the Silverlight.js file serve?

坚强是说给别人听的谎言 提交于 2020-01-15 10:23:28
问题 I asked this question this morning. Essentially there's an IE hack in the Silverlight.js file that breaks in...IE9. The response I got was to get rid of the file altogether which, to my surprise, seemed to work after preliminary testing. So does this file actually serve a purpose? 回答1: I believe this was included as a way to launch Silverlight on browsers with an advanced "install" experience, or to show alternative HTML when Silverlight was not installed. http://archive.msdn.microsoft.com

What purpose does the Silverlight.js file serve?

余生颓废 提交于 2020-01-15 10:22:50
问题 I asked this question this morning. Essentially there's an IE hack in the Silverlight.js file that breaks in...IE9. The response I got was to get rid of the file altogether which, to my surprise, seemed to work after preliminary testing. So does this file actually serve a purpose? 回答1: I believe this was included as a way to launch Silverlight on browsers with an advanced "install" experience, or to show alternative HTML when Silverlight was not installed. http://archive.msdn.microsoft.com

What purpose does the Silverlight.js file serve?

二次信任 提交于 2020-01-15 10:22:46
问题 I asked this question this morning. Essentially there's an IE hack in the Silverlight.js file that breaks in...IE9. The response I got was to get rid of the file altogether which, to my surprise, seemed to work after preliminary testing. So does this file actually serve a purpose? 回答1: I believe this was included as a way to launch Silverlight on browsers with an advanced "install" experience, or to show alternative HTML when Silverlight was not installed. http://archive.msdn.microsoft.com

Silverlight 3 and Silverlight 4 conditional xaml

江枫思渺然 提交于 2020-01-15 06:26:10
问题 I am working on a project right now that has to separate project files. One complies in Silverlight 3 and the other in Silverlight 4. The project creates a user control that is used in a couple other projects. Unfortunately one is in SL3 and cant be upgraded right now which is why a SL3 version of the control is needed. So far it has worked out fine but recently I tried to add a ViewBox to the control. This causes a problem because in SL3 it is located in the toolbox and in SL4 it is in the

TFS 2010 msbuild overwrites different versions of referenced library in output directory

南笙酒味 提交于 2020-01-15 06:19:07
问题 I'm building Web project using TFS 2010. The project contains Silverlight client and .NET/C# server side. Both of these (client and server) are referencing one 3rd party library for which we have Silverlight and .NET version, but both versions use the same name. The problem is that msbuild with outdir property specified puts all the libraries to one flat hierarchy in output directory so one library overwrites the other. I know that one solution would be to modify build template and not

TFS 2010 msbuild overwrites different versions of referenced library in output directory

旧街凉风 提交于 2020-01-15 06:18:47
问题 I'm building Web project using TFS 2010. The project contains Silverlight client and .NET/C# server side. Both of these (client and server) are referencing one 3rd party library for which we have Silverlight and .NET version, but both versions use the same name. The problem is that msbuild with outdir property specified puts all the libraries to one flat hierarchy in output directory so one library overwrites the other. I know that one solution would be to modify build template and not