silverlight

Creating a Converter to take an ID and create an Image in Silverlight

蓝咒 提交于 2019-12-20 06:48:28
问题 I am using a WCF weather service and receiving weather information like ID, Description, and Images. It returns like this: <WeatherDescription> <WeatherID>1</WeatherID> <Description>Thunder Storms</Description> <PictureURL> http://ws.cdyne.com/WeatherWS/Images/thunderstorms.gif </PictureURL> </WeatherDescription> Now in the XAML I am showing my data in a dataGrid as so: <sdk:DataGridTextColumn Header="ID" Binding="{Binding WeatherID}" /> The above binding is to another function of the service

Cross Domain Policy

我是研究僧i 提交于 2019-12-20 06:48:19
问题 I am working with a Silvelright App that consumes a WCF service, I have placed a crossdomain and clientaccesspolicy xml's in the wwwroot of the IIS as well as in the application folder! yet when the client communicates with the service, it throws an error saying; An error occurred while trying to make a request to URI ‘http://localhost:1528/MyService.svc’. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that

Handling image load exception gracefully

混江龙づ霸主 提交于 2019-12-20 06:45:23
问题 I'm loading user images using Silverlight 3. Everything works fine and I can set the file stream to a BitmapImage and it gets rendered OK. The problem is that if I try to load something that's not an image (like a .exe that's been renamed to .png) Silverlight crashes with a System.Exception that says "Catastrophic failure". The MSDN documentation unhelpfully says that it should be so there msdn link and I should listen to the ImageFailed event (which never gets fired). Am I missing something

How to wait until an event is finished without blocking execution in the UI

一曲冷凌霜 提交于 2019-12-20 06:27:50
问题 I’m trying to figure out how can I make sure that the event has fired before letting the rest of the code run. I hook up an event like this: public static class ServiceUrlQueryParameters { public static void ServiceUrlQueryParameters() { ... dynamicMapServiceLayer.Initialized += new EventHandler<EventArgs>(DynamicMapServiceLayerQuery_Initialized); ... } } So now, the code has attached a listener to the event and will wait until the event fires. But I don't want anything else in that class to

MyGroups not implemented in Communicator.UIAutomation

为君一笑 提交于 2019-12-20 06:09:58
问题 I'm working on a out of browser Silverlight app that provides some MS Office Communicator 2007 controls. I'm using the Automation SDK. The docs that were installed with the SDK state that there's a MyGroups property in the IMessenger2 interface, which will return the groups that a user has defined, but when I try to use it, I get a NotImplementedException . Here's the code that I'm using: dynamic communicator = AutomationFactory.CreateObject("Communicator.UIAutomation"); communicator

Trouble binding LongListSelector.SelectedItem to MVVM property

可紊 提交于 2019-12-20 06:07:42
问题 Using Visual Studio 2013 and the Window Phone 8 SDK I cannot get the SelectedItem property of the LongListSelector to properly bind to an MVVM property. It appears to be an identical issue to a bug that existed in the control prior to its inclusion in the SDK but which is marked as fixed. http://silverlight.codeplex.com/workitem/9360 Is anyone else experiencing this and know of a fix/updated version? I am currently using a code behind workaround private void LongListSelector_SelectionChanged

Binding a grid with two datasources in silverlight

不想你离开。 提交于 2019-12-20 05:48:11
问题 I'm having a problem with how I should bind my datagrid in the best way. The problem is that i would like to use two itemSources. I have a list with alot of incidents, each incident holds a list of buggs. What I would like to do is bind half a gridview row with some of the fields from the incident, and half of the grid with the corresponding bugs that the incident holds. How would I be able to do this in the best way? I have access to the componentOne datagrid, but if the normal grid works it

How can I change listbox item's visibility property in wp7?

徘徊边缘 提交于 2019-12-20 05:44:29
问题 For example: there is a listbox: <ListBox Margin="24,107,12,28" Name="lb"> <TextBlock Text="Text" TextWrapping="Wrap" FontSize="22" Visibility="Collapsed" /> <TextBlock Text="Text2" TextWrapping="Wrap" FontSize="22" Visibility="Collapsed" /> <TextBlock Text="Text3" TextWrapping="Wrap" FontSize="22" Visibility="Collapsed" /> </ListBox> How can I change TextBlocks's visibility properties programmatically? 回答1: The ListBox generates a container of type ListBoxItem for each item. You can access

Best practice for panning/zooming a user control?

主宰稳场 提交于 2019-12-20 05:41:42
问题 We currently have a user control which displays a dynamic matrix of other user controls. Since it's dynamic, the view can become large, requiring the user to scroll up/down & left/right in the browser to view everything. I would like to give the users one view of the user control with the ability to pan & zoom on it, much like the feel of this Telerik control. We own the Telerik controls and I've tried to use the Map control for our purpose, but it doesn't seem like that is going to be a good

How to use gif animated image in WP 7

若如初见. 提交于 2019-12-20 05:30:53
问题 I have seen this post: Display GIF in a WP7 application with Silverlight But in my case? for animating I am using a popup. So when application starts it shows a popup for 5 seconds. In this popup I want to show some .gif image, but it doesn't work. Here is the code which I implement: public partial class AnimatedSplashScreen : UserControl { protected Uri ImageSource { get; set; } public AnimatedSplashScreen() { InitializeComponent(); ImageSource = new Uri( "http://upload.wikimedia.org