silverlight-5.0

Using Unity to inject objects into IValueConverter instance

删除回忆录丶 提交于 2019-12-19 07:11:23
问题 I have an instance of IValueConverter in a Silverlight 5 project, which converts custom data into different colors. I need to read the actual color values from a database (as these can be edited by the user). Since Silverlight uses asynchronous calls to load the data through Entity Framework from the database, I created a simple repository, which holds the values from the db. The interface: public interface IConfigurationsRepository { string this[string key] { get; } } The implementation:

Silverlight 5 - OOB install/update broken when using anti-cache trick

泪湿孤枕 提交于 2019-12-18 08:57:43
问题 I was using the timestamp trick on the Silverlight <object> (see GetLastWriteTime() using answers in How do you force Firefox to not cache or re-download a Silverlight XAP file?) successfully with Silverlight 4. Using a Silverlight 5 runtime * , the OOB install/auto-update feature now seems broken. I have two issues: when launching in browser, the current install state is always 'not installed' (in code: Application.Current.InstallState == System.Windows.InstallState.NotInstalled is always

Silverlight 5 + AutoCompleteBox = Bug

此生再无相见时 提交于 2019-12-17 20:51:51
问题 Just installed SL5 and the toolkit, that were released few days ago. The bug happens when you set the Text property of the AutoCompleteBox to string.Empty. It causes the AutoCompleteBox to be in a buggy state. To reproduce the bug: add an AutoCompleteBox and a Button to the main page. Register to the TextChanged and Click events. This is the code-behind: public partial class MainPage : UserControl { public MainPage() { InitializeComponent(); } private void button1_Click(object sender,

How to set up data binding for group radio button in Silverlight?

会有一股神秘感。 提交于 2019-12-13 12:27:11
问题 Sliverlight provides radio button with GroupName to group radiobutton together with only one option from mutiple choice. It's like: <RadioButton GroupName="Option" Content="Option 1"></RadioButton> <RadioButton GroupName="Option" Content="Option 2"></RadioButton> <RadioButton GroupName="Option" Content="Option 3"></RadioButton> then in VM, I have only one property for this option,say it's MyChoice public int MyChoice {get; set;} then how to setup data binding for this case between UI and VM?

How to perform operation on a background thread

点点圈 提交于 2019-12-13 08:06:47
问题 I am working on Silverlight project based on MVVM architechture. on click of a button a c# linq query gets executed which takes some time to execute (about one and half minute) due to which my UI hangs for this much time untill the response is received. I'm having a custom progress bar which needs to be shown in between. I tried to execute this linq statement on a background thread but no success. Current Code: private void _selectRecords() { //linq-query } I tried below steps, private void

How to update combobox value on changing selection c# dynamically using Binding() in c# (not xaml)

橙三吉。 提交于 2019-12-13 05:04:49
问题 I am c# silverlight5 beginner and i have a situation that i have to created a combo box dynamically using c# and kept items in it. But the problem now when i run it run properly showing the last value by default but when i select the another value it don't update the that value in the text box near by because it is not working dynamically. I guess i need to add some selection changed or some other event using c#. But i dont know how to do that. Please note that i have created this combo box

It's possible to make the Panorama control on WP7 non-circularly?

馋奶兔 提交于 2019-12-13 04:45:48
问题 I'm using a Panorama control on a WP7 design, and I want to know if there's some way to deactivate the circular (or round) navigation on it? Basically what I would is to end the horizontal scrolling to right on the last item and vice-versa. 回答1: Even if it was possible, such app would most likely get rejected at Marketplace review. The strength of a system lies in uniformity. Don't try to reinvent the wheel. Users expect panoramas to loop. 来源: https://stackoverflow.com/questions/11224507/its

What is the TickFrequency equivalent of slider in silverlight

时光怂恿深爱的人放手 提交于 2019-12-13 03:49:07
问题 I am trying to create a slider using silverlight and i am under a situation that i have to drag the slider with certain frequency and it is achieved in wpf using TickFrequency but i couldnt find the alternative to do so using silverlight. Suppose my slider is: Slider slider = new Slider(); In explain what i want to do is: If i a slider whose max= 10 and min=1 and my slider frequncy=2 so what i want is when i drag the slider then it must drag by 0->2>4>6>8>10 . Not like : 0->1>2>3>4>5>6>7>8>9

Embedding a Silverlight App into a MVC

情到浓时终转凉″ 提交于 2019-12-13 00:55:46
问题 I decided to convert the WPFs into a Silverlight applications. My only problem is trying to get it to display the silverlight application in my MVC web browser. I added all of my silverlight projects into my MVC project. I am just not getting it to show my silverlight application. Can someone tell me what I am doing wrong in my asp part in my CSHTML <h2>System</h2> <asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server"> <div id="silverlightControlHost"> <object data=

How can I connect to my SQL Azure-database using Microsoft Silverlight?

时间秒杀一切 提交于 2019-12-13 00:36:45
问题 I have a database online at Windows Azure. I want to connect to the database and show some tables in Microsoft Silverlight. I have created a Silverlight Application and published the website on Azure here! How do I connect to my SQL Azure database in Silverlight? 回答1: The same way as connecting to any other database! Personally, I use EntityFramework and create my own service. You can use EF and use RIA Services to create a lot of code for you though if you prefer. Add an Entity Model to your