silverlight-5.0

Pass value to Child Window form Parent Page

可紊 提交于 2019-12-11 07:59:57
问题 I Need pass the Value to child Window.In child window there is two Text boxes.I need to show the value in child window Text box while while its getting opened. I tried the following way,My Child window class as follows, public partial class ChildWindow:ChildWindow { public int abc {get;set;} public string value{get;set;} public ChildWindow() { InitializeComponent(); this.txtbox1.Text = abc ; this.txtbox2.Text = value; } private void OKButton_Click(object sender, RoutedEventArgs e) { this

How to notify the TabItem switching in c#? (if there are many TabItems)

最后都变了- 提交于 2019-12-11 07:53:13
问题 I have created TabItems in silverlight where each tab display some text. When i change the text then it show asterisk at the Header of TabItem with header name. Now what i want to achieve is : suppose i made a change on the current TabItem text display then when i switch from the one tab to another tab item then it must show a pop up saying "do you wanna save the changes done ?" Does silverlight provide any facility in TabItem to notify when there is change in the TabItem (I mean when

pInvoke Win32 function for Marshal.PtrToStructure in Silverlight 5

让人想犯罪 __ 提交于 2019-12-11 07:41:23
问题 I used public static Object PtrToStructure( IntPtr ptr, Type structureType ) in the form of private static object ReadStruct(byte[] buffer, Type t) { GCHandle handle = GCHandle.Alloc(buffer, GCHandleType.Pinned); Object temp = Marshal.PtrToStructure( handle.AddrOfPinnedObject(), t); handle.Free(); return temp; } for marshaling data in .net 4.0. Silverlight does not support this method. According to the following article, the .net method is simply a wrapper for a native win32 function. An

How to Signing xap file using pfx in Silverlight Application

泄露秘密 提交于 2019-12-11 04:56:10
问题 I have created a silver-light Application using Visual Studio 2012.I'm not getting Signing page in the project properties. How to configure pfx file in silverlight 5. 回答1: Visual Studio is looking for in for a register key named {B07DA5DD-055B-4018-88F3-3A433FDB9B25}.VS 2012 Pro's installer doesn't create this key.So we need to create this registry-key manually , HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\11.0\CLSID\{B07DA5DD-055B-4018-88F3-3A433FDB9B25} (OR) HKEY_CURRENT

'Object.ReferenceEquals' is always false because it is called with a value type

瘦欲@ 提交于 2019-12-11 04:39:04
问题 When I use SlSvcUtil.exe to create my service client files, I see code like this: private string CategoryField; [System.Runtime.Serialization.DataMemberAttribute()] public string Category { get { return this.CategoryField; } set { if ((object.ReferenceEquals(this.CategoryField, value) != true)) { this.CategoryField = value; this.RaisePropertyChanged("Category"); } } } When I inspect it with ReSharper , I receive the following warning: 'Object.ReferenceEquals' is always false because it is

Add Service Reference is ALWAYS generating xmlserializer and not DataContractSerializer

懵懂的女人 提交于 2019-12-11 02:39:00
问题 i have a service : http://chronicpainhostservice2.cloudapp.net/Service1.svc i consume it in silverlight 5.0 application. and it all worked fine. However, when i adding this service to the project using "add service reference" it ALWAYS generating xmlserializer One more thing - when i try to add it to simple windows application it is generating DataContractSerializer , so the problem is not in the server. How can i force silverlight to generate DataContractSerializer ? Thanks! 回答1: It looks

DependencyProperty not notifying UI on NotifyCollectionChanged event

拥有回忆 提交于 2019-12-11 02:14:37
问题 I am working with a custom control which has a selected items dependency property which I have wired up the collection changed event but the UI is not notified and the PropertyChanged event is always null. Normally I would say this is a datacontext issue. but I cannot change the data context on the control as no data will display. public ObservableCollection<object> SelectedItems { get { return (ObservableCollection<object>)GetValue(SelectedItemsProperty); } set { SetValue

How to deploy the silverlight web site on localhost (IIS 7)

狂风中的少年 提交于 2019-12-11 01:33:06
问题 I am new to Silverlight, I have created an application having DLL Project, Silverlight project, and Silverlight.web project. Now I wanted to publish or deploy it in the IIS so that I can test the Silverlight web application. Can someone help me to deploy and publish silverlight web application? 回答1: Right Click the Silverlight.Web project in Visual Studio. Select the publish option. Enter your web site configuration in "Publish Web" window. If you are really new to IIS you can find a very

How to apply styles in a resource dictionary that is programmatically added to the App.Current.Resources.MergedDictionaries collection?

夙愿已清 提交于 2019-12-11 01:31:03
问题 I am working with a very large Silverlight 5 application that needs to implement theming. Unfortunately I can't use the C1 (Component One) or Silverlight Toolkit theme mechanisms due to the enormity of xaml and code changes I would have to implement. I am forced to do something a bit out of the box. As a starting point I created a demo project by referencing a post on Stack Overflow Using Mef to Import a WPF DataTemplate written by @Scott Whitlock. The post described how to dynamically load a

How to reuse Storyboard with VisualStateManager In Silverlight 5

隐身守侯 提交于 2019-12-10 17:26:21
问题 This question has been asked before but in most cases no more recent than 2 years ago and often specific to WPF. The answer might still be there same, but here it goes. I'm trying to build a triangular (arrow) button that changes color and grows in size when the mouse is over it. I've got that working for a single button. But now I need buttons with the arrow pointing different directions. I want to reuse as much of the code as possible. Without using a custom button control, I couldn't think