silverlight-3.0

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

假如想象 提交于 2019-11-29 06:55:25
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(BasicHttpSecurityMode.None) { MaxReceivedMessageSize = int.MaxValue, MaxBufferSize = int.MaxValue };

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

Deadly 提交于 2019-11-29 06:54:28
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. Although Silverlight is sand-boxed and it isn't possible to open and save files to the local file system direcly, it is possible to get a stream to a local file. There are the

How to go to particular Item in IEnumerable

陌路散爱 提交于 2019-11-29 02:48:20
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 var item = eLevelData.ElementAt(index); If your collection is typed as IEnumerable instead of IEnumerable<T> you'll

RIA Services: How can I create custom authentication?

旧巷老猫 提交于 2019-11-28 17:09:51
问题 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

How to access web application class into silverlight application

邮差的信 提交于 2019-11-28 09:44:18
问题 I am beginner in silverlight..I have created a silverlight project. When a new silverlight project is created it is automatically creating a silverlight application and one web application. I have added a class in both applications. Now I want to access a method of web application class into silverlight application class. Is it possible? I have tried to add web application reference to silverlight but VS is not allowing. Is there any another way to do?? 回答1: What you need is called WCF. A

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

一曲冷凌霜 提交于 2019-11-28 08:45:05
问题 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

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

老子叫甜甜 提交于 2019-11-28 07:10:12
问题 How can I get a screen resolution of Device from settings (Windows Phone) ? 回答1: public void GetScreenResolution() { string ScreenWidth = Application.Current.Host.Content.ActualWidth.ToString(); string ScreenHeight = Application.Current.Host.Content.ActualHeight.ToString(); MessageBox.Show(ScreenWidth + "*" + ScreenHeight); } 回答2: 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

Silverlight 3 - Data Binding Position of a rectangle on a canvas

天涯浪子 提交于 2019-11-28 04:44:56
问题 I am currently trying to bind a collection of objects to a Canvas in Silverlight 3 using an ItemsControl as below: <ItemsControl x:Name="ctrl" ItemsSource="{Binding myObjectsCollection}"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <Canvas></Canvas> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> <ItemsControl.ItemTemplate> <DataTemplate> <Rectangle Stroke="LightGray" Fill="Black" StrokeThickness="2" RadiusX="15" RadiusY="15" Canvas.Left="{Binding XAxis}" Height="25" Width="25"> <

Clear Binding in Silverlight (Remove Data Binding from SetBinding)

橙三吉。 提交于 2019-11-27 22:57:06
How do you Clear/Remove DataBinding in Silverlight? similar to: Remove binding in WPF using code But the BindingOperations.ClearBinding() method does not exist in Silverlight 3. The BindingOperations.ClearBinding() method calls ClearValue() internally. public static void ClearBinding(DependencyObject target, DependencyProperty dp) { if (target == null) { throw new ArgumentNullException("target"); } if (dp == null) { throw new ArgumentNullException("dp"); } if (IsDataBound(target, dp)) { target.ClearValue(dp); } } via Reflector. 来源: https://stackoverflow.com/questions/1639219/clear-binding-in

Silverlight XAML Attribute Definition Order Matters

∥☆過路亽.° 提交于 2019-11-27 22:54:52
I was working with the ComboBox control and couldn't get the SelectedItem to be set from the property on my viewmodel. Here is the control definition: <ComboBox x:Name="jobEmployee" Grid.Column="1" Grid.Row="2" Margin="4" HorizontalAlignment="Left" Width="150" SelectedItem="{Binding Path=EditingJob.Employee, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" ItemsSource="{Binding Path=Employees, Mode=OneWay}" DisplayMemberPath="FullName"/> I had another Combobox control that worked jut fine. The difference between one that would set the SelectedItem and the one that wouldn