silverlight-4.0

Pinch and zoom behaviour for windows phone

若如初见. 提交于 2019-12-06 12:13:00
Is it possible to create a behavior for Pinch and zoom to Image control in windows phone 8. I am trying to apply pinch and zoom along with rotation to Image in my application. In a forum I found that Gesture listener is deprecated and they are not promoting implementation with gesture. So can any one please suggest an alternative method for me. If you're targeting only Windows Phone 8 you can use the new ManipulationDeltaEventArgs.PinchManipulation property from the ManipulationDelta event. Instead of using GestureListener/TouchPanel for pinch & zoom you should rely on this new property. Maybe

How can I pass query string variables with NavigationService.Navigate?

时光毁灭记忆、已成空白 提交于 2019-12-06 12:07:49
Greetings, Searched for this, but no luck. I'm attempting to pass query string variables (and then retrieve them) in my Silverlight 4 app. First I tried this this.NavigationService.Navigate(new Uri("/LoanProductionRegion?Elvis=Alive&ImHungry=true", UriKind.Relative)); But HtmlPage.Document.QueryString doesn't pick them up because they come after the anchor (the full url looks like http://localhost:1076/Dashboard.SLTestPage.aspx#/LoanProductionRegion?Elvis=Alive&ImHungry=true ). I tried to put the vars in front, such as this.NavigationService.Navigate(new Uri("?Elvis=Alive&ImHungry=true

Silverlight Timer-Like Functionality

杀马特。学长 韩版系。学妹 提交于 2019-12-06 11:51:25
问题 So what I have is a textbox that submits data back to the server. I want to have it submit once the person has stopped typing. My thought process was to have a timer and have the textbox change set the timer to start (if stopped) and reset the countdown time to lets say 3 seconds if its already running and have the timer.Tick event submit the changes... Is there a better method for doing that? Is there one that works? 回答1: You can use a DispatcherTimer to do this. Just start the timer when

Calling Office Communicator via Silverlight Out of Browser

杀马特。学长 韩版系。学妹 提交于 2019-12-06 11:49:45
I need to invoke office communicator to create a chat window and phone call directly from Silverlight when running out of browser. When running in browser I do this and it works pretty well: System.Windows.Browser.HtmlPage.Window.Eval(String.Format("window.open(\"sip:{0}\", target=\"_self\");", sip)); When running out of browser as far as I have gotten is to invoke the Communicator.UIAutomation via a dynamic but honestly I don't know what to do next. dynamic communicator = AutomationFactory.CreateObject("Communicator.UIAutomation"); Anyone have any suggestions on how to make this work?

How bind TabControl?

若如初见. 提交于 2019-12-06 11:41:48
xaml <controls:TabControl x:Name="tabControlRoom" Grid.Row="1" Grid.Column="1" d:LayoutOverrides="Width, Height" ItemsSource="{Binding}" > <controls:TabControl.ItemTemplate> <DataTemplate> <controls:TabItem Header="{Binding name}"> <StackPanel Margin="10" Orientation="Horizontal"> </StackPanel> </controls:TabItem> </DataTemplate> </controls:TabControl.ItemTemplate> </controls:TabControl> and code m_roomContext.Load(m_roomContext.GetRoomQuery()); tabControlRoom.DataContext = m_roomContext.Rooms; when I open this page, then there is all the elements, but a second later I see only a white screen

Rx: Ignoring updates caused by Subscribers

点点圈 提交于 2019-12-06 11:36:29
I'm having problems figuring out how to do this. I have two instances (source & target) that implement INotifyPropertyChanged and I'm tracking the PropertyChanged event for both. What I want to do is run an action any time source.PropertyChanged is raised until target.PropertyChanged is raised. I can do that just fine like this: INotifyPropertyChanged source; INotifyPropertyChanged target; var sourcePropertyChanged = Observable .FromEvent<PropertyChangedEventArgs>(source, "PropertyChanged") .Where(x => x.EventArgs.PropertyName == sourcePropertyName); var targetPropertyChanged = Observable

Hierarchical templating multiple object types in silverlight

蹲街弑〆低调 提交于 2019-12-06 10:15:02
Is it possible and if so what is the best way to implement the following hierarchical structure in a silverlight (4) TreeView control? (where Item and Group are classes which can exist in the tree). Group | |-Item | |-Group | | | |-Item | | | |-Item | |-Item The structure could of course be arbitrarily more complex than this, if needed. HierarchicalDataTemplates appear to be the way to approach this, but I'm specifically having trouble understanding how I might apply the template to interpret the different classes correctly. A similar question was asked for WPF, the answer for which made use

How do I display a document (rtf/doc/pdf/xps) in Silverlight? I need documentation in my app

安稳与你 提交于 2019-12-06 09:07:48
问题 This is a hard question to search for as "help" and "documentation" generates a lot of false hits. I basically want to show some simple documentation or help in my Silverlight app. And I don't want to write this in XAML, obviously, so I would love to be able to add a WordPad (or similar, free and easy) document to my app that would get display with some basic formatting in Silverlight. Any ideas? 回答1: Try embedding an iframe using an iframe overlay, then you can load any HTML-like content.

Dynamically Creating Controls Following MVVM pattern

久未见 提交于 2019-12-06 08:48:32
问题 I'd like to dynamically generate some controls in my silverlight application. To be more clear, here's a simplified definition of my class: public class TestClass { [Display(Name="First Name")] public string FirstName { get; set; } [Display(Name = "Last Name")] public string LastName { get; set; } public List<CustomProperty> CustomProperties { get; set; } } Each "CustomProperty" will finally be a TextBox, CheckBox or ComboBox: public class CustomProperty { public CustomDataType DataType { get

Target Silverlight Version is stuck

邮差的信 提交于 2019-12-06 08:20:18
I have my shiny new Visual Studio 2010. I want to develop a Silverlight 4 web app with it. I made a project and it told me that I needed to update my Developer version of Silverlight. I followed the link provided and did what it suggested. I then went back and created my project (under a different directory). But when I try to select the target version of Silverlight all I can see is Silverlight 3. What do I need to do to get this to show the Silverlight 4 option? Make sure you've installed the Silverlight 4 Tools to enable this all in VS 2010. 来源: https://stackoverflow.com/questions/3260453