silverlight

Silverlight and COM Interop

无人久伴 提交于 2020-01-01 03:40:28
问题 What are my options for interacting with a COM control from silverlight? In my particular project, I have a legacy ActiveX authentication control which I would like to leverage in my silverlight application. Without too many boring details, the control takes a couple of parameters, prompts the user for credentials or tokens, and raises events. I need to set the parameters from my control, and somehow get the events' data to my control. Furthermore, I would like to get the UI to seem as

How unique is XAML?

我们两清 提交于 2020-01-01 03:33:22
问题 Was talking to a colleague about XAML and how it is both a presentation and object description language and therefore quite unique and novel among IT technology. Is this true that XAML is unique and novel? Does XAML have any counterparts or predecessors in the Java world or elsewhere? I believe someone told me that Java Server Faces was similar to WPF, so what is the equivalent of XAML there? I know MXML in Flex is similar but as far as I can remember there are some major structural

Prism 4 - locally scoped RegionManager

萝らか妹 提交于 2020-01-01 03:22:26
问题 I have silverlight 4 application with PRISM 4, I'm using MEF. My Shell defines one main region in which modules are loaded, I want modules to have their own RegionManager, so regions that they define are places in local RegionManager instead of global. And I want this local RegionManager to be resolved by container (for type IRegionManager) when inside the module. However the method from documentation: IRegion detailsRegion = this.regionManager.Regions["DetailsRegion"]; View view = new View()

Uninstall out-of-browser silverlight application programmatically

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-01 03:14:23
问题 How to uninstall out-of-browser silverlight 4 application programmatically instead of using the contextmenu (e.g. if I want to replace the context menu)? Edit I have found in "Installing Silverlight applications without the browser involved" how to uninstall by calling the command-line: "%ProgramFiles%\Microsoft Silverlight\sllauncher.exe" /uninstall /origin:silverlight.net/content/samples/apps/… This can be used in:- dynamic cmd = AutomationFactory.CreateObject("WScript.Shell"); cmd.Run(run,

Silverlight Bind to inverse of boolean property value

半世苍凉 提交于 2020-01-01 02:28:34
问题 I want to bind a controls visibility to inverse of boolean property value. I have a property CanDownload, if it is true then I want to hide textbox and vice versa. How can I achieve this? Thanks 回答1: This sort of question is asked so often and the answers so similar I thought its time to have a single answer to all (ok may "most") of the bool to value conversion questions. I've blogged it here. The code is quite simple so I'll paste it here too:- public class BoolToValueConverter<T> :

Get path geometry from image

自古美人都是妖i 提交于 2020-01-01 02:04:09
问题 If i have a logo, let's say done as a jpg or even a png. Any suggestion for how I can use that to define a path geometry? It would be really good if any suggestions could be provided for how i can do it in blend. Thanks 回答1: Yes - I just tackled this problem for an LOB application two days ago. I can't offer advice for Blend (though I've read that it can be done in Expression Designer). However, the best free tool I've found for this is called InkScape (http://www.inkscape.org). It's

List of WPF functionalities that aren't in Silverlight 3

时光毁灭记忆、已成空白 提交于 2020-01-01 00:40:33
问题 A common technical decision nowadays is whether to build a ClickOnce rich client application or a web application. Here I'm focussing primarily on choosing between a WPF application or a Silverlight application. The chief benefit of Silverlight is obvious - it can be hosted in a browser. But, if a programmer used to WPF was to start programing in Silverlight, what would he/she suddenly find is not possible or much harder? Items can be of the following: You just cannot do it, period You can do

Combining .NET RIA Services and MVVM in Silverlight 3.0

十年热恋 提交于 2019-12-31 23:42:23
问题 When using .NET RIA Services and MVVM in Silverlight 3.0 is there a difference between the Metadata type from RIA Services and the ViewModel from the MVVM pattern? Are these the same thing or should they be keep separate? The metadata type is a sealed internal class to the partial Entity class. There doesn't seem to be a proper separation there but the metadata type can also be decorated with attributes for Validation which makes it look like a ViewModel. I've searched around but I didn't see

silverlight - communicate between 2 view models in MVVM using commands

不打扰是莪最后的温柔 提交于 2019-12-31 22:36:08
问题 i am working on MVVM and using commanding in silverlight(DelegateEvent and ICommand) I want something like this ,(say) i have 2 usercontrols , parent and child . Parent is hosting the child , both have thier own viewmodels . On parent i have a button and it executes a simple command , on execute of that command i want to update text in the child control's textbox . also we should be able to change something in child which can propagate to the parent . Is events the best answer for this or i

WP7 — NavigationService.Navigate is complaining that it is not receiving an object reference . . . but why?

家住魔仙堡 提交于 2019-12-31 21:27:18
问题 WP7 newb question here. I have the following code: public class KeyboardHandler : INotifyPropertyChanged { // lots of methods here public void FunctionKeyHandler() { Uri targetUri = new Uri("/View/SelectTable.xaml",System.UriKind.Relative); NavigationService.Navigate(targetUri); } // more methods } I am getting an error: "Error 1 An object reference is required for the non-static field, method, or property 'System.Windows.Navigation.NavigationService.Navigate(System.Uri)' Why? 回答1: The