silverlight

How MVVM with DataTemplateSelector is portable from Silverlight to Flex?

风格不统一 提交于 2020-01-06 15:49:12
问题 I asked a question here about MVVM In MVVM there can be only one View for each one View Model? Answer would be to use DataTemplateSelector to get multiple views. Now let's say I need to port to flex. Does Flex have the same paradigm as DataTemplateSelector ? Since Silverlight claims that it is close to Flex then I'd like to see proofs :) 回答1: Specifically, there is no "DataTemplateSelector". That is not surprising, though, because they are different stacks... (They ARE extremely similar to

Parsing xml files in windows phone 7

北战南征 提交于 2020-01-06 15:06:47
问题 i have the following xml file <entry> <math marks>45</math marks> <eng marks>67</eng marks> <phy marks>56</phy marks> </entry> i wish to parse this xml file in windows phone 7 such that i can extract the values for each tag, for example math marks has value 45, and save them in a variable of type double and perform some mathematical operations on the created variable. How can i do this? 回答1: Firstly, that isn't xml (element names can't have whitespace). It would have to be, for example:

WebBroswer query in Windows Phone

妖精的绣舞 提交于 2020-01-06 14:32:26
问题 I've got the following code, but when I Build it I get an error on WebBrowserDocumentCompletedEventArgs telling me the type or namespace could not be found. I've been searching the web and attempting to add DLLs for over an hour. Can anyone help? private void b_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) { WebBrowser b = sender as WebBrowser; string response = b.DocumentText; // looks in the page source to find the authenticity token. // could also use regular exp

Unknown error using Digg API and URI handler (silverlight)

百般思念 提交于 2020-01-06 14:11:06
问题 For class we have to follow a tutorial to create a silverlight website that searches DIGG for a given topic. (Using this tutorial as a base: http://weblogs.asp.net/scottgu/archive/2010/02/22/first-look-at-silverlight-2.aspx) We have to use the following code to fetch the information from DIGG. private void buttonSearch_Click(object sender, RoutedEventArgs e) { string topic = textboxSearchTopic.Text; WebClient digg = new WebClient(); digg.DownloadStringCompleted += new

Validating input which is databound to a DependencyProperty - Silverlight

谁说我不能喝 提交于 2020-01-06 14:00:43
问题 My problem: I would like to validate the user input of a TextBox using the control's ValidatesOnExceptions property. XAML code: DataContext="{Binding RelativeSource={RelativeSource Self}}" ... <TextBox x:Name="TestTextBox" Text="{Binding TestText, Mode=TwoWay, ValidatesOnExceptions=True}" TextChanged="TestTextBox_TextChanged"/> 1 : The validation using a normal property works fine: ViewModel code: private string _testText, public string TestText { get {return _testText;} set { if (value=="!")

Am I correct in understanding that vector printing in SilverLight 5 will only work with a Postscript printer?

◇◆丶佛笑我妖孽 提交于 2020-01-06 13:56:49
问题 I had read some blogs about SilverLight 5 and find it hard to believe what I read! That even on Windows, SilverLight 5 will only do vector (high quality) printing to a postscript printer. (Also happened to XML Paper becoming the format that all print drivers understood on windows…) 回答1: I found Silverlight 5: Vector and Bitmap Printing for Reports and more to be quite helpful regarding PostScript printing in Silverlight 5. In particular: If your content or your printer doesn't support

Dynamic query data from WCF Data Service to Silverlight Application?

為{幸葍}努か 提交于 2020-01-06 08:42:03
问题 I have a Silverlight application that contains a window that lists several values in multiple columns. The first column contains fields to be retrieved from a database, the second column contains table names. Multiple fields can be selected from the first column and only one field can be selected from the second column. So, the idea is to build a query that can select multiple columns from one of several tables (assume the column names are the same for each table). My question is how do I

Dynamic query data from WCF Data Service to Silverlight Application?

霸气de小男生 提交于 2020-01-06 08:41:36
问题 I have a Silverlight application that contains a window that lists several values in multiple columns. The first column contains fields to be retrieved from a database, the second column contains table names. Multiple fields can be selected from the first column and only one field can be selected from the second column. So, the idea is to build a query that can select multiple columns from one of several tables (assume the column names are the same for each table). My question is how do I

load silverlight controls in asp.net page

☆樱花仙子☆ 提交于 2020-01-06 08:31:20
问题 I have a silverlight project which contains 2 silverlight controls Control_1 and Control_2. Please note that its in same app.Now I have asp.net project which will use any of these silverlight control (either Control_1 or Control_2). Challenge is how do I tell silverlight which control to load. I used param property in html object to pass the parameters and tell the app which control to load at runtime? But what if there are more than 2 controls in same project? We cannot have a long switch

Using CheckBoxes in Silverlight

烈酒焚心 提交于 2020-01-06 07:57:06
问题 I am using a checkbox in a child window in Silverlight. When a user clicks the checkbox this sends sends a toggle function to a database, where if the checkobox is checked, the value = 1, and unchecked value = -1, so the toggle is changing these values. By using the following code- private int checkCounter1 = 0; private void checkBox1_Checked(object sender, RoutedEventArgs e) { if (checkCounter1 == 0) { } else { //Web Service toggle function } checkCounter1 = 1; } private void checkBox1