silverlight-3.0

How can I set the maxItemsInObjectGraph property programmatically from a Silverlight Application?

感情迁移 提交于 2019-11-30 08:31:38
问题 I have a Silverlight 3.0 application that is using a WCF service to communicate with the database, and when I have large amounts of data being returned from the service methods I get Service Not Found errors. I am fairly confident that the solution to it is to simply update the maxItemsInObjectGraph property, but I am creating the service client progrogrammatically and cannot find where to set this property. Here is what I am doing right now: BasicHttpBinding binding = new BasicHttpBinding

Does Silverlight 3 have access to local file system, Open Excel, and print reports?

走远了吗. 提交于 2019-11-30 08:31:19
问题 I was wondering if Silverlight 3 can be used to create line of business applications where I can use file import/export facilities, read an xls file and open Excel, use a report tool like Crsytal Reports or Reporting Services or.. is WPF needed? I am new to Silverlight and WPF and want to decide if I can skip learning WPF. I know Silverlight is a subset of WPF but I just want to concentrate in one of the two. 回答1: Although Silverlight is sand-boxed and it isn't possible to open and save files

How to go to particular Item in IEnumerable

不想你离开。 提交于 2019-11-30 07:18:46
问题 I have IEnumerable which contains number Data inside it. Edit The IEnumerable is from System.Collection.Ienumerable directive. Attached the snapShot of Viual Studio, Enum that Contains Data: alt text http://www.freeimagehosting.net/uploads/bd72c6c310.jpg Just to brief about the above image, eLevelData is the IEnumerable variable, in which I have my data . Now I want to go to the data at index 4 or 5, but I don't want to use foreach loop. Any suggestions please. Thanks, Subhen 回答1: var item =

How to dismiss a popup in Silverlight when clicking outside of the control?

亡梦爱人 提交于 2019-11-30 04:54:33
In my Silverlight UI, I have a button that when clicked pops up a control with some filtering parameters. I would like this control to hide itself when you click outside of it. In other words, it should function in a manner similar to a combo box, but it's not a combo box (you don't select an item in it). Here's how I'm trying to capture a click outside of the control to dismiss it: public partial class MyPanel : UserControl { public MyPanel() { InitializeComponent(); } private void FilterButton_Click(object sender, RoutedEventArgs e) { // Toggle the open state of the filter popup FilterPopup

Pass value of a field to Silverlight ConverterParameter

拜拜、爱过 提交于 2019-11-30 01:51:26
问题 I'm writing my very first Silverlight app. I have a datagrid with a column that has two labels, for the labels, i am using an IValueConverter to conditionally format the data. The label's "Content" is set as such: Content="{Binding HomeScore, Converter={StaticResource fmtshs}}" and Content="{Binding AwayScore, Converter={StaticResource fmtshs}}" The Convert method of my IValueConverter is such: Public Function Convert( ByVal value As Object, ByVal targetType As System.Type, ByVal parameter As

Start Storyboard When Text Changes

那年仲夏 提交于 2019-11-30 00:09:57
问题 I have a TextBlock bound to a property on my view model. I have a StoryBoard with fades the text in and out using the Opacity property. I am using this text to give the user feedback after they have performed an operation(success, error etc). How can I start the StoryBoard when the property changes from my view model? Is there a better way to do this sort of effect? 回答1: Sorry, I hate to tell it to you - but you're thinking about it wrong. Don't think in storyboards, Opacity and Visiblity

How to remove the black space around the button in WP7?

谁说胖子不能爱 提交于 2019-11-29 20:56:38
问题 As I see, WP7 buttons are surrounded by a black space of some pixels. How I can remove it? I've read this post, but I didn't managed to remove it! Could you please give a working example? I've tried to wrap button with <Border... /> element, but it didn't work. this is my XAML <ItemsControl Name="icCells" Grid.Row="1"> <ItemsControl.ItemTemplate> <DataTemplate> <Button Background="Red" BorderThickness="0" Width="40" Height="40" BorderBrush="Green" Padding="0" Margin="0" /> </DataTemplate> <

RIA Services: How can I create custom authentication?

穿精又带淫゛_ 提交于 2019-11-29 20:52:13
I am working with the Silverlight RIA Services and I want to create custom authentication. This appears to be the only thing that has virtually no documentation (I've read through the entire RIAServicesOverview.docx). Do you know of a way for me to create a customer authentication service? I don't want to use the default ASP.NET membership model. I don't know what interface or abstract class I need to implement - although I did find System.Web.Ria.ApplicationServices.IAuthentication. Do I need to implement IAuthentication? If so, could you give me some advice on how to go about doing so? These

WP7 play many compressed (mp3, wma etc) audio files simultaneously/dynamically

强颜欢笑 提交于 2019-11-29 14:39:29
For size reasons I need to bundle a WP7 app with compressed audio (mp3, wma etc). How do I play these freely/simultaneously? The XNA framework only supports WAV files, so unless there is a pure C# managed code library somewhere to decompress mp3/wma/ogg (?) on the fly, the next option would be... MediaElement. But I don't get good results with MediaElement. It seems that you need to add a MediaElement specifically as a tag in the xaml, and you can't use several instances (several tags). As soon as I play a certain MediaElement I can't play another MediaElement on the same page. I don't find

How can I get a screen resolution of Device (Windows Phone)

北慕城南 提交于 2019-11-29 13:33:34
How can I get a screen resolution of Device from settings (Windows Phone) ? public void GetScreenResolution() { string ScreenWidth = Application.Current.Host.Content.ActualWidth.ToString(); string ScreenHeight = Application.Current.Host.Content.ActualHeight.ToString(); MessageBox.Show(ScreenWidth + "*" + ScreenHeight); } This may be a better way to know what screen resolution is your app running on. if(App.Current.Host.Content.ScaleFactor == 100) { // WVGA } else if (App.Current.Host.Content.ScaleFactor == 160) { // WXGA } else if (App.Current.Host.Content.ScaleFactor == 150) { // 720p }