silverlight

Slow storyboard animation inside LongListSelector

你。 提交于 2019-12-24 03:07:35
问题 I have a LongListSelector which is populated with some items. Each item has a submenu which can be visible or collapsed using a sliding animation. The problem is that the animation is extremely slow depending on which item you tap in the list. At the start and the end it's slow, in the middle it's smooth. I suspect that each animation frame invalidates the longlistselector which means the entire visual tree must update it's layout. I use a datatrigger to start the animation. Because of that I

Synchronous WebClient Download In Silverlight

▼魔方 西西 提交于 2019-12-24 03:02:03
问题 I need do download a string (specifically the JSON array result from a PHP webservice), as a function that returns a string, not DownloadStringAsync. I need this because I am writing a function that downloads the string, and then converts it to a JsonArray. I am using Visual Studio Ultimate 2010, I am developing a Silverlight application, and any help will be appreciated. 回答1: What you're looking for is not synchronous workflows (this would be very difficult, if not impossible, in Silverlight

Updating UI components from an async callback

心已入冬 提交于 2019-12-24 02:54:06
问题 Now I know about the Dispatcher and the DispatcherTimer and their benefits. But I've always been under the impression that an async web-service/WCF callback (completed event handler) are automatically handled by the UI thread. But looking at some references online such as the one linked below, it seems this is NOT the case. So the strange thing is that i haven't been using the Dispatcher to update the UI (updating data-bound ObservableCollections) within service completed events, yet I've

Drag & Drop needs a math fix

女生的网名这么多〃 提交于 2019-12-24 02:48:10
问题 I have a drag/drop behavior for my RichTextBox in Silverlight 4, but i'm having a small snapping problem. I would like the user to be able to "grab" any border of the RichTextBox and drag/drop it. The RichTextBox should drag relative to where the user "grabbed" the RichTextBox. But instead, as soon as the user begins the drag, the RichTextBox "snaps" to the middle of the mouse position instead of its position staying relative to the mouse position. So if I grab the bottom right corner, as in

Is there any way to get ServiceStack to deserialize complex types on a Silverlight client?

只愿长相守 提交于 2019-12-24 02:45:30
问题 I want to deserialise a JSON response from a Silverlight client. I have my DTOs in a Portable Class Library, referenced from both server and client. public class MyDTOResponse { public IEnumerable<MyType> ResponseData {get; set; } } When I use the ServiceStack C# client (ie NOT from Silverlight), everything works fine: MyType gets hydrated on the client. From Silverlight, however ResponseData is null. Simple types work fine from Silverlight also. For example, this works: public class

placing a text box inside the silverlight data grid column header

陌路散爱 提交于 2019-12-24 02:33:18
问题 how to add a text box inside the silverlight data grid column header? so that i can use the text boxes for the filteration purpose? 回答1: <sdk:DataGridTextColumn.Header> <TextBox Text="{Binding YourTargetProperty}"/> </sdk:DataGridTextColumn.Header> The following article deals with the Filtering and Sorting. http://www.codeproject.com/Articles/83906/Silverlight-4-Datagrid-Sorting-Grouping-Filtering-.aspx 来源: https://stackoverflow.com/questions/4022753/placing-a-text-box-inside-the-silverlight

Freeze Columns from right to left

ぐ巨炮叔叔 提交于 2019-12-24 02:32:33
问题 I have a data grid in which I need to freeze the rightmost column. It is no problem to freeze the columns from left to right with the FrozenColumnCount property. Does anyone of you know how to do this? Thx in advance, TJ 回答1: There is no way to Freeze a column to the right if you want the others to scroll. If this functionality is critical to your app I would suggest investigating the third party Silverlight grid controls on the market e.g. Telerik, Infragistics etc 来源: https://stackoverflow

Open Silverlight OOB on url, if installed

有些话、适合烂在心里 提交于 2019-12-24 02:27:06
问题 Is there anyway to make the OOB version of my Silverlight app open(if installed) when i go to http://mydomain.com/silverlightapp <--- where the Xap is loaded. Just like a irc client opens when i go to irc://servername but instead of prefix can my app open the OOB version if App.Current.InstallState == InstallState.Installed when it's loaded in the browser?. 回答1: As of Silverlight 4 there is no way of launching oob application from the url. Irc and other applications can register custom url

Bing map - highlight country with a polygon on hover

时光怂恿深爱的人放手 提交于 2019-12-24 02:25:21
问题 I'm using silverlight Bing map control and I want to highlight country / continent after hovering it with mouse cursor. Is there a better way of doing this than just providing coordinates for a polygon ? It's a looot of work if I would like to highlight all countries in the world. I think there should be some sort of ready solution, but I wasn't able to find one. 回答1: No, there is no way to highlight a country other than providing your own data - either in the form of coordinates to create a

Attach an event to a property when changed

ぐ巨炮叔叔 提交于 2019-12-24 02:24:19
问题 Is there any feature of c# (silverlight) in which I can watch a property of a usercontrol for when there is any changes made without using dependency properties? I want one that is not static. 回答1: There are two standard mechanisms where the "observation" pattern (which is what are describing) is implement. One is the use of dependency properties. The other is the implementation of the INotifyPropertyChanged interface. public partial class MyUserControl : UserControl, INotifyPropertyChanged {