silverlight

Silverlight text trimming and wrapping issue

℡╲_俬逩灬. 提交于 2019-12-24 00:49:30
问题 I have the following layout in XAML: <StackPanel Height="40"> <TextBlock TextWrapping="Wrap" TextTrimming="WordEllipsis" Margin="0,10,0,10" LineHeight="18" FontSize="12"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce dapibus commodo dui vulputate laoreet. Donec metus purus, consectetur ut sagittis ut, vestibulum id diam. Suspendisse in urna sem. Ut purus arcu, placerat quis tempus cursus, elementum sed sem. Duis condimentum semper tortor, a pulvinar dolor semper sit amet. <

How can I set the StreamingContext in Silverlight DataContractSerizer?

和自甴很熟 提交于 2019-12-24 00:38:02
问题 I need to do a deep copy in Silverlight, which I can do with the tried and tested serialize/deserialize approach. The copied objects aren't exact clones - they need to have some of their properties modified on the copy. I should be able to do something like this: [OnDeserialized()] public void OnDeserializedMethod(StreamingContext context) { if (context.State == StreamingContextStates.Clone) { //stuff } } where the StreamingContext is set up using a NetDataContractSerializer :

Using a TreeMap with images

廉价感情. 提交于 2019-12-24 00:35:09
问题 For representing most popular artists from EchoNest API, I've been trying to set-up Silverlight Toolkit's TreeMap using images, their TreeItemDefinition.ValueBinding being defined as the area of the image. While it mostly fills up the space when the image stretch is set to 'Fill' : When setting image stretch to 'Uniform' a lot of blank spaces remain : On this post, image carving is suggested : Treemapping with a given aspect ratio How can I know which images should be carved and at what

Silverlight Shared classes in RIA service causing build errors -The type 'X' already contains a definition for 'Y'

放肆的年华 提交于 2019-12-24 00:34:20
问题 I have a Silverlight 4 application where I am making use of shared classes. In the .Web project, I have a class called "X.Shared.cs". This class has three string properties. When I build the application, it gives an error saying "The type 'X' already contains a definition for 'Y'". It seems that the properties in the generated code in the Silverlight Application are being seen as duplicates. I have tried cleaning my solution and rebuilding, this helps every now and then but is totally

How to create a WPF-like data trigger in Silverlight?

本小妞迷上赌 提交于 2019-12-24 00:29:32
问题 How might i create a trigger for a Silverlight datagrid in which the cell background color changes based on the cell value? I worked on a WPF project sometime ago and I recall this was quite simple via DataTriggers in the xaml. However this functionality doesn't appear to be available in Silverlight and i'm stuck as to where to start. Thanks all. 回答1: Firstly, the replacement for triggers in Silverlight is the VisualStateManager. The VSM is actually much more powerful than triggers as it

Silverlight with C++.Net

霸气de小男生 提交于 2019-12-24 00:27:00
问题 Can you use C++.Net for writting a Silverlight application? Not use C# or VB.Net as the backend language but C++.Net 回答1: Check this. A google search would have answered your query. Update: I was wrong. Apologies for that. Mark has answered it correctly. Mark : You can use any language so long as it compiles to pure managed code. For example there are Silverlight applications using IronPython, IronRuby. The only restriction is you can't have any native code, or use parts of the FCL that are

Splitting app's parts in their own assemblies when using Prism

自古美人都是妖i 提交于 2019-12-24 00:24:03
问题 The MVVM approach encourages (or just gives the possibility to) splitting a WPF or Silverlight application into Model , ViewModel and View projects so all three could exist in their own assemblies. Using Prism (and, in my case, MEF as a Dependency Injection Container), on the other hand, one can build a modular application that is divided into a set of functional units (named modules) and each unit, in this case, is a seperate assembly. Am I right that in this case we can separate only a

How do you change Visual Studio's default web browser?

狂风中的少年 提交于 2019-12-24 00:16:38
问题 This is a for a Silverlight project that isn't anchored to an .aspx file, so right clicking, etc. is a bit out of the question. Any ideas? Edit: Add an .html file, then click it. Really dumb. Last time I ask a question at three in the morning. 回答1: Why is right-clicking out of the question? With any HTML document at least (even in Miscellaneous Files ) you can right-click on it, select Browse With... , select the browser, and click on Set as Default . If the browser doesn't appear in the list

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

Are there any fluent WPF projects? [closed]

依然范特西╮ 提交于 2019-12-24 00:05:33
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . As part of my on-going attempt to come to terms with WPF/XAML, I've become interested in the application of fluent interfaces to UI coding. I am aware of Fluent Silverlight (http://code.google.com/p/fluent-silverlight/), but I can't seem to find anything equivalent for WPF. Just as a personal note, I'm finding