silverlight

Definitive source(s) for the difference between Silverlight and WPF

流过昼夜 提交于 2019-12-18 04:09:14
问题 Does anyone know of a definitive guide or guides that tells us the differences between WPF and Silverlight. I know that Silverlight, for example, doesn’t have all the controls and all the namespaces that WPF has. Is there a source which tells me exactly what controls and namespaces are absent in Silverlight? There are other things that I know off the top of my head, like only allowing asynchronous communications using basic http binding. Also, Silverlgiht doesn’t have all of the type

Recording Audio From Web Page

≯℡__Kan透↙ 提交于 2019-12-18 03:35:08
问题 I'm looking for a solution for capturing audio from a user's microphone and posting it (preferably as MP3) to a server. I need something that I can embed in a web page. I've seen where Flash can do this, but I understand that this approach requires expensive server-side software from Adobe. I'm not aware of whether Silverlight may provide any capabilities to assist with this. I'm curious what others have done. Any advice would be greatly appreciated. 回答1: You can do it with Flash and either

Get element position after transform

醉酒当歌 提交于 2019-12-18 02:54:12
问题 I have a UIElement that has various transformations performed on it (scale and translate). Is there a way to get the UIElement's position after transformation? I tried GetValue(Canvas.TopProperty) but it doesn't change from what it was loaded as. I must be missing something obvious but not sure what. (I'm using silverlight) 回答1: It is a little bit unintuitive to do this, but it can be done. It is a two step process. First, what you want to use the TransformToVisual function (from MSDN):

Best way to upload multiple files from a browser

流过昼夜 提交于 2019-12-17 23:19:43
问题 I'm working on a web application. There is one place where the user can upload files with the HTTP protocol. There is a choice between the classic HTML file upload control and a Java applet to upload the files. The classic HTML file upload isn't great because you can only select one file at a time, and it's quite hard to get any progress indication during the actual upload (I finally got it using a timer refreshing a progress indicator with data fetched from the server via an AJAX call). The

WPF/Silverlight VS WinRT

℡╲_俬逩灬. 提交于 2019-12-17 22:16:10
问题 I never actually built an application (nor a HelloWorld) in WinRT, and I'm very suspicious. My question is if there are features in WPF/Silverlight that don't exist in WinRT (excluding features that are implemented differently by design)? And these aspects are most important to me and are the core of my question , and in result, decision to whether start using WinRT or wait for these to be implemented for it: Entity Framework? WCF RIA? MVVM support (Prism)??? Various toolkits (Silverlight/WPF

VT100 Terminal Emulation in Windows WPF or Silverlight

北战南征 提交于 2019-12-17 21:57:10
问题 I'm pondering creating a WPF or Silverlight app that acts just like a terminal window. Except, since it is in WPF/Silverlight, it will be able to 'enhance' the terminal experience with effects, images, etc. I'm trying to figure out the best way to emulate a terminal. I know how to handle the VT100 emulation as far as parsing, etc. But how to display it? I considered using a RichTextBox and essentially converting the VT100 escape codes into RTF. The problem I see with that is performance. The

MVVM: Modified model, how to correctly update ViewModel and View?

你离开我真会死。 提交于 2019-12-17 21:53:23
问题 Case Say I have a Person class, a PersonViewModel and a PersonView . Updating properties from PersonView to the Person model is simple enough. PersonViewModel contains a Person object and has public properties the PersonView binds to in order to update the Person model. However. Imagine the Person model can get updated by Service . Now the property change needs to be communicated to the PersonViewModel and then to the PersonView . This is how I would fix it: For each property on the Person

WPF dependency property precedence & reference type Default Values

爷,独闯天下 提交于 2019-12-17 21:15:13
问题 If I create a custom control like this: public class MyControl : ContentControl { public static readonly DependencyProperty ItemsProperty = DependencyProperty.Register( "Items", typeof(ObservableCollection<object>), typeof(MyControl), new PropertyMetadata(null)); public MyControl() { // Setup a default value to empty collection // so users of MyControl can call MyControl.Items.Add() Items = new ObservableCollection<object>(); } public ObservableCollection<object> Items { get { return

Why Does ItemsControl Not Use My ItemTemplate?

不问归期 提交于 2019-12-17 20:44:05
问题 I am able to use an ItemTemplate within an ItemsControl to render items in a specific format. However, if one of the items within the ItemsControl happens to be, say, a TextBox, that TextBox is rendered rather than an instance of the ItemsTemplate. From what I can tell, this is true for any FrameworkElement. Is this intended behavior for an ItemsControl, or am I doing something incorrectly? An example: <ItemsControl> <ItemsControl.ItemTemplate> <DataTemplate> <Grid Margin="5"> <Rectangle Fill

Binding the Path Property of a Binding

社会主义新天地 提交于 2019-12-17 20:26:34
问题 is it possible to bind the Path property of a binding to another property? I want to realize this code: Text="{Binding Path={Binding Path=CurrentPath}}" So I can adjust dynamically to which Property my actual binding is refering. Thanks for your Help Jonny 回答1: As other posters have mentioned, you can only set a binding on a dependency property - which path is not. The underlying reason is that xaml is source code that gets compiled. At compile time the compiler has no idea what the value of