silverlight-4.0

Silverlight 4: Where is the HtmlBrush?

六月ゝ 毕业季﹏ 提交于 2019-12-10 17:36:52
问题 This is strange. I load the System.Windows.dll (C:\Program Files (x86)\Microsoft Silverlight\4.0.50401.0\System.Windows.dll) in the Reflector and do a search for HtmlBrush but nothing comes up. Anyone got a clue why? 回答1: HtmlBrush has been renamed to WebBrowserBrush . 来源: https://stackoverflow.com/questions/2738828/silverlight-4-where-is-the-htmlbrush

WCF can't serialize cyclic references

跟風遠走 提交于 2019-12-10 17:33:05
问题 I have a database with a lots of relationships between Tables and a Silverlight client that connects to my server with WCF service on ASP.Net side. First i used LINQ to SQL as a robust mapper tables to object and in a WebMethod that returns a List<Foo> of my Database's object(suppose GetFoo() ). The Foo has lots of relationships with other objects that each of that have lots of realaships too,(this means , there is a PK and FK between tables).also i use Microsoft Service Trace Viewr for track

UpdateSourceTrigger PropertyChanged in Silverlight?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-10 16:39:55
问题 I am sure most of you have come across this when you type in a textbox you like instantly to filter a ViewCollection according to has been typed. Its very straight forward in WPF, just change the UpdateSourceTrigger for Text binding to PropertyChanged. As you would expect Silverlight doesnt have it. There is just a default and explicit instead. I had the idea to bind an Interaction behavior to TextChanged event of the textbox instead. Would you recommend this approach or is there a better way

Change notification in EF EntityCollection

蓝咒 提交于 2019-12-10 15:35:40
问题 In a Silverlight 4 proj i'm using WCF RIA services, MVVM principles and EF 4. I 'm running into this situation: created an entity called Category and another one called CategoryLocale (automated using VS, no POCO). The relation between them is 1 to N respectively (one Category can have many CategoryLocales), so trough this relationship one can implement master-detail scenarios. Everytime i change a property in the master record (Category) i get a notifypropertychanged notification raised. But

MVVM and NavigationService

自作多情 提交于 2019-12-10 15:27:45
问题 One of the many benefits of implementing any pattern is to have a separation of concerns between the different layers in an application. In the case of Silverlight and MVVM it is my opinion that the NavigationService belongs to the UI. If the NavigationService belongs to the UI then it should be used in the XAML code behind, but the commands happens on the ViewModel. Should I raise an event on the Command in the ViewModel and let the View handle the event and call the Navigation? That sounds

How do I make a Deep Copy of a UIElement?

拜拜、爱过 提交于 2019-12-10 15:15:34
问题 So I have a printing component that serves a Silverlight application. Other modules in this program have the ability to signal the printing component and pass it a UIElement , which the printing component will then draw to the screen. All well and good. The problem arises when I try to manipulate the UI Element in order to better format it to fit the user's selected paper size or anything to that effect; it seems that the UI element that is passed in is frequently the exact same instance of

Hosting Microsoft Office application inside Silverlight 4?

非 Y 不嫁゛ 提交于 2019-12-10 14:10:42
问题 I know that Silverlight 4 has support for COM interop via the AutomationFactory class. dynamic excel = AutomationFactory.CreateObject( "Excel.Application" ); excel.Visible = true; But this creates a separate window for the COM object. What I am missing here is if I am actually able to actually host an Office document inside my Silverlight application - in a ContentPresenter for example? 回答1: You're not missing anything - it can't be done. You could look for converters to Silverlight of Office

Change applicationbar buttonicon at runtime

故事扮演 提交于 2019-12-10 14:04:31
问题 I'm developing a WP7 app and the application needs to change the icon of a button on the application bar given the state of a request. I have tried: if (App.Servers[index].ServerState == "Enabled") { DetailsAppBar.btnStart.IconUri = new Uri("/AppBar/appbar.stop.rest.png"); } else { DetailsAppBar.btnStart.IconUri = new Uri("/AppBar/appbar.transport.play.rest.png"); } This doesn't give me an error in the code, but it can't compile.... any hints to do this is appreciated :) thanks 回答1:

Adding children to stackpanel programmatically not working

懵懂的女人 提交于 2019-12-10 13:16:34
问题 Can anybody spot the mistake that I am doing? Here is the code: StackPanel stackPanel = new StackPanel(); stackPanel.Orientation = Orientation.Vertical; for (int index = _elements.Count - 1; index >= 0; index--) { FrameworkElement element = _elements[index]; WriteableBitmap tempBitmap = new WriteableBitmap(element, null); Image image = new Image(); image.Source = tempBitmap; stackPanel.Children.Add(image); } stackPanel.UpdateLayout(); _bitmap = new WriteableBitmap(stackPanel, null); _bitmap

Silverlight 4 : Uploading file to server

随声附和 提交于 2019-12-10 13:01:02
问题 Here is an easy one: I need a stable simple file uploader with a progress bar, I have found lots of fancy ones from the search. However, I need the community opinion on which ones to go with? Tutorial links would be appreciated. BOUNTY: I have a FileStream which I would like to upload to a server, below is a sample server server URL: string uploadUri; string SavedFileName = "testXRay.jpg" uploadUri = @"http://localhost/MyApplication/Upload/Images/" + SavedFileName; I am adding a bounty in