silverlight-4.0

Expected range error when removing last item from listbox's observablecollection

自古美人都是妖i 提交于 2019-12-12 19:12:08
问题 I have a SL4 ListBox full of items. Here is the ItemContainerStyle: <Style x:Key="DataItemStyle" TargetType="ListBoxItem"> <Setter Property="Background" Value="Transparent" /> <Setter Property="TabNavigation" Value="Local" /> <Setter Property="HorizontalContentAlignment" Value="Center" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="ListBoxItem"> <Grid Background="{TemplateBinding Background}" LLamasoft:DragDropBehaviors.DragDropManager="{Binding ScratchPad

Silverlight 4 HttpWebRequest throwing ProtocolViolationException

旧巷老猫 提交于 2019-12-12 17:16:16
问题 I'm invoking a REST service via http which returns a stream as the response. My client code looks like so: Uri uri = new Uri(remoteAddress); var webRequest = (HttpWebRequest)WebRequest.Create(uri); webRequest.Method = "GET"; webRequest.ContentType = "multipart/mixed"; webRequest.BeginGetResponse(responseResult => { HttpWebResponse response = (HttpWebResponse)webRequest.EndGetResponse(responseResult); this.messages = ParseResponse(response); Complete(false); }, null); I'm getting the following

Cannot find a Resource with the Name/Key

天大地大妈咪最大 提交于 2019-12-12 14:16:18
问题 I'm trying to unit test a user interface using the Silverlight 4 Toolkit. When I attempt to instantiate the UserControl, it's throwing an exception because in the XAML of the UserControl it's using a Style defined App.xaml. Is there a way to load the resource somehow before I instantiate the UserControl? Am I going about this the wrong way? Here's the unit test code: [TestMethod] public void ExerciseTimePeriodUserInterface() { CustomUserControls.TimePeriodFilter timePeriodFilter = new

Can i use Activex with silverlight4?

穿精又带淫゛_ 提交于 2019-12-12 14:12:30
问题 I need to use a ActiveX control in my silverlight application. After some research i found out a few ways in which a silverlight app can use ActiveX control Use ActiveX control in a webpage along with silverlight plugin and use javascript for interaction between silverlight and activex. Use a webbrowser control in silverlight 4 and load the webpage containing activex in webbrowser control. Is there any other way that can utilized to embed activex control in silverlight app. I read somewhere

Silverlight with RIA services on IIS 10.0 results in 404 error

谁都会走 提交于 2019-12-12 13:36:24
问题 Trying to migrate an existing working Silverlight application with WCF RIA services from IIS 6.0 to IIS 10.0 on W indows Server 2016 but the application fails returning 404 error s. When I install Visual Studio on the server and try running the application then it works fine within the context of IIS Express. The server has the following components installed. Microsoft Silverlight 5.0 Microsoft Silverlight 4 SDK Microsoft Silverlight 5 SDK WCF RIA Services V1.0 SP2 I’ve even tried to directly

Using Native dlls in C# Com wrapper and Use dll in silverlight

吃可爱长大的小学妹 提交于 2019-12-12 13:28:05
问题 As part of my project I need to use some Unamanged code dlls in Silverlight. If I wrap these unmanaged dlls in a C# dll will I be able to access the native dlls from silverlight. I use Visual Studio 2010 and Silverlight 4.0 回答1: With Silverlight 4, you can call out to COM objects installed on the local machine. However to do this the user has to choose to allow the Silverlight App full access to their machine. In addition the COM object needs to already be installed on the machine. Therefore

Silverlight Assembly.Load() only works with the full/strong name

倖福魔咒の 提交于 2019-12-12 13:20:02
问题 Apparently the implementation of Assembly.Load() in Silverlight needs a full/strong name. E.g. this works: Assembly.Load("MyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=..."); while this will fail even if MyAssembly is already loaded: Assembly.Load("MyAssembly"); Is there a workaround so that it's possible to use the simple name? 回答1: As far as I know, there isn't a way to work around this in Silverlight without using the full name. However, you may be able to accomplish your

Silverlight 4 Overriding the DataForm Autogenerate to insert Combo Boxes bound to Converters

非 Y 不嫁゛ 提交于 2019-12-12 12:14:12
问题 I've been working towards a solution for some time and could use a little help. I know I've seen an example of this before, but tonight I cannot find anything close to what I need. I have a service that provides me all my DropDownLists, either from Cache or from the DomainService. They are presented as IEnumerable, and are requested from the a repository with GetLookup(LookupId). I have created a custom attribute that I have decorated my MetaDataClass that looks something like this: [Lookup

Silverlight 4: “Invalid XAML” using Converter in DataTemplate

て烟熏妆下的殇ゞ 提交于 2019-12-12 11:08:34
问题 maybe you could help me understand why I get an unhandled exception "Invalid XAML" in Visual Studio 2010 designer when trying to do the following on a Page . I have a Converter named DateTimeConverter that converts a date into a German date string. The converter works fine. I've included the namespace and added the following to the page's resources: <navigation:Page.Resources> <myClasses:DateTimeConverter x:Key="dateTime" /> </navigation:Page.Resources> Now I have a list box that I want to

Silverlight App inside WPF WebBrowser?

落爺英雄遲暮 提交于 2019-12-12 10:59:38
问题 I have a hopefully trivial question. Currently, my company works with a rather obscure language (SyngergyDE) and we need to call a SilverLight application inside our product. Unfortunately, this obscure 3rd party language only (currently) supports the opening of WPF screens. So with that said, I thought I'd develop a small WPF user control that contains a "WebBrowser" control and navigate to the silverlight application's URI. This works fine, and I'm able to see the SL application. Here is my