silverlight-4.0

Open Silverlight OOB on url, if installed

有些话、适合烂在心里 提交于 2019-12-24 02:27:06
问题 Is there anyway to make the OOB version of my Silverlight app open(if installed) when i go to http://mydomain.com/silverlightapp <--- where the Xap is loaded. Just like a irc client opens when i go to irc://servername but instead of prefix can my app open the OOB version if App.Current.InstallState == InstallState.Installed when it's loaded in the browser?. 回答1: As of Silverlight 4 there is no way of launching oob application from the url. Irc and other applications can register custom url

How to use NHibernate and DTOs with RIA Services

陌路散爱 提交于 2019-12-24 02:22:36
问题 I’m using NHibernate with RIA Services and Silverlight 4. I create DTOs for transferring the data via RIA Services rather than distributing my domain layer objects (as per Martin Fowler’s First Law of Distributed Object Design: “Don’t distribute your objects!”). The DTO objects are flattened down to two layers from five corresponding layers in the domain layer. Here’s my problem. After making changes in Silverlight 4, RIA Services knows which DTO objects have been modified, but in the server

Silverlight: VisualStateManager.GetVisualStateGroups doesn't, How can I get them?

假如想象 提交于 2019-12-24 01:51:34
问题 I've tried using VisualStateManager.GetVisualStateGroups in the OnAttached override of my custom behavior, as well as in an event handler added to AssociatedObject.Loaded event in that behavior. Both times I get an empty list. Is there another way to get the visual state groups defined for a control, or another event handler I should attach to? Be for it's asked, yes, the control has VisualStateGroups and VisualStates . 回答1: Usually the VisualStateGroups attached property is attached to the

Changing association property (EntityCollection) don't rise PropertyChanged

我只是一个虾纸丫 提交于 2019-12-24 00:07:41
问题 I want to bind some column data of readonly DataGrid to Association property of Entity through Converter (convert collection from this association property to string). When I try to add/remove elements from collection, binding don't fire. PropertyChanged also, don't rising. contractPosition.PropertyChanged += (s, e2) => { a = 0;//don't fire }; contractPosition.ContractToOrderLinks.Remove(link); Here is the fragment of contractPosition Entity (generated by EF4): [Association("ContractPosition

Problem with Windows Phone ComboBox Style

别来无恙 提交于 2019-12-23 21:30:06
问题 I'm using a ComboBox control in my app. I understand that there is no supported Metro theme for it - but a ComboBox fits my needs perfectly, so here we are... So my predicament is that I need to create a metro theme from scratch or I need to spend like 2 days to recreate the ComboBox control. I tried the first option (creating a metro theme) but am having some problems: The text is always white - cant figure out how to set this. I can not change the color of the selection box (not the drop

Intercept Ninject instance activation?

这一生的挚爱 提交于 2019-12-23 17:37:17
问题 I'm trying to put an example together of using Caliburn Micro on WP7 with Ninject. Everything was pretty straight forward. However, I'm stuck on how to go about firing an event once an instance is Activated by Ninject. Here is the ActivateInstance method in Caliburn Micro's SimpleContainer, the IoC container that comes with CM for the phone. protected virtual object ActivateInstance(Type type, object[] args) { var instance = args.Length > 0 ? Activator.CreateInstance(type, args) : Activator

How to bind to a local property in Silverlight without using a DataContext?

二次信任 提交于 2019-12-23 15:53:28
问题 I have a small question but have been finding quite a few different, and mostly ambiguous, answers: I have the following user control and I am trying to bind to a public property within that control (Events). Everyone says that I have to use the data context, however, I don't really want to do that... I just want to bind to the property from within the control's XAML... The requirement is that the binding has to be 2 way so any changes in the ui will be reflected in the property (or rather

Silverlight 4 Support for x:TypeArguments

一曲冷凌霜 提交于 2019-12-23 15:53:13
问题 I've got a generic base page class that I'd like to use with my Silverlight pages. The only problem is that the x:TypeArguments attribute doesn't seem to be working. The attribute is only applied to the root element of the XAML page, and nowhere else. The error message I keep getting from the compiler is: "Using the generic type 'Base.BasePage<T>' requires 1 type arguments" . This error is always pointing to the generated Page.g.i.cs file. Here is an example of what my root element looks like

MEF & Silverlight: How do I navigate to a page in another XAP?

ぐ巨炮叔叔 提交于 2019-12-23 15:53:08
问题 I'm very lost on how to do this. I understand MEF and can load services and classes from another XAP using the ubiquitous DeploymentCatalogService found in many blog posts. What I don't understand is how to actually load and navigate to a PAGE from another XAP. What I'd like to do is have my main application be able to call the NavigationService and provide it with the name of a Page that should exist. Like: NavigationService.Navigate(new Uri("/Test", UriKind.Relative)); It's up to one of the

Silverlight: Modal ChildWindow keeps parent grayed after closing

旧街凉风 提交于 2019-12-23 10:53:22
问题 When my modal ChildWindow closes, the parent control does not get "un-grayed" and all user input is blocked, forcing me to restart the application. Exact scenario which causes this behavior consistently: ChildWindow A pops up and user clicks a custom button on the bottom of the window (instead of OK or Cancel). My code does some work and then calls the Close() method for the ChildWindow. ChildWindow A closes and functionality is restored to parent control (controls are un-grayed). User causes