silverlight

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 Blend Behaviors do not get attached at design time

谁说胖子不能爱 提交于 2019-12-23 15:28:24
问题 I have developed a behavior that changes the Clip property of the AssociatedObject. When I run the application, all is well. But when I view the page in Blend it appears like the behavior does not affect its associated object. I tried to "debug" blend by attaching visual studio 2010 debugger to it's process and set a break point on the behavior's OnAttached method, but the breakpoint is never reached. As if blend prevents that behavior from being attached at design time. Is there a way around

Scanning Text (OCR) in Windows Phone 7.5 [closed]

喜你入骨 提交于 2019-12-23 15:25:59
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . Is there a way to force Zxing library to scan text only? I am looking for the offline (non-cloud) solution to scan text in windows

Using Silverlight MVVM with Prism/Unity, and need to detect when view is closed

独自空忆成欢 提交于 2019-12-23 15:15:52
问题 I am writing an app using the MVVM (Model-View-ViewModel) pattern and am leveraging the Prism and Unity bits from the Microsoft P&P team. I have a View with a list of items. These items are contained with an ObservableCollection in the ViewModel to which a listbox in the View is databound (the ViewModel is set as the DataContext of the View). In the ViewModel, I have a timer running that fires a poll of the server for new data every 30 seconds. When the data returns I marshal it over to the

Silverlight Windows Phone 7: Gesture events?

霸气de小男生 提交于 2019-12-23 15:01:50
问题 I'm mocking up a wp7 app in Expression Blend and looking for set up an event handler in response to certain gestures. Some Bing-ing shows some people recommending to use "on click" or something and check the time between taps oneself, but it seems like there should be an easier way. Is there an event for Silverlight controls that fires for gestures (or specific types of gestures?) 回答1: Silverlight for Windows Phone 7 doesn't natively contain any support for gestures. However, there are a

Silverlight & Visual Tree Manipulation

不羁的心 提交于 2019-12-23 13:34:08
问题 Now this may be more trouble than it's worth but nevertheless, it'd be really useful to me right now. What I'd like to know is how I might go about manipulating the Silverlight visual tree at runtime. Doing simple things like adding and removing controls is easy enough but when you start having to traverse the tree with any reasonable amount of complexity I find myself yearning for a JQuery style syntax (LINQ would be pretty cool too I suppose) to handle DOM node replacements, movements and

DataTemplateSelector in wp7 mango

廉价感情. 提交于 2019-12-23 13:11:49
问题 I need a data template selector in my app. I found this blog that worked great on 7.0. After upgrading my project to 7.1 I get "unspecified error" when setting the template. I tried to take the sample project they publish on the blog and upgrade it to mango, and it still works. I don't get what I do wrong, because it seems like this code is Ok for mango. Any suggestions? <Grid x:Name="LayoutRoot" Background="Transparent" VerticalAlignment="Stretch" > <StackPanel VerticalAlignment="Stretch">

Windows Phone 7 clear cookies

浪尽此生 提交于 2019-12-23 13:09:38
问题 Is there any possibility to clear cookies generated by WebBrowser control in Silverlight on Windows Phone 7? 回答1: http://cloudstore.blogspot.com/2010/09/clearing-cookies-on-windows-phone-7-or.html 回答2: According to this post, cookies cannot be accessed via the API. They can however, be accessed via javascript in an embedded browser (remember to set .IsScriptEnabled = true ). To loop through all cookies and deleted thme you could try something like: var cookies = document.cookie.split(";");