silverlight

Bing Maps Silverlight Control: How do I Display the Sun's Footprint?

Hello, I have the Sun's latitude, longitude, and altitude but I don't know how to display the Sun's footprint in a particular time as in http://www.karhukoti.com and http://www.timeanddate.com/worldclock/sunearth.html. Can someone please help? Thanks. Edit: I downloaded the source code for JSatTrak and tried to implement the drawF...

How to get mouse captured element.

I need to get mouse captured element to ReleaseMouseCapture for it. I have a problem with cancelling MouseLeftButtonUp event when element is already pressed. I need to cancel it before execution MouseLeftButtonUp. ...

Silverlight control stays on top of div? Can't use Windowless mode and z-index is not working.

On the following website, when I click the dropdown for the Login at the upper right, it is displayed behind the silverlight map. I can't use windowless mode because this would disable scrolling and menus on the map. I have tried putting the z-index everywhere, but I can't seem get it to work. ...

What is the real advantage of keeping code out of the XAML code behind?

There is a lot of effort in the Silverlight community to keep a XAML's code behind file as free of code as possible. What is the real motivation behind this? For example, what is the advantage of using a command instead of an event handler? If I have <Button x:Name="SaveButton" Content="Save" Click="SaveButton_Click" /> ... private...

Silverlight Design Question

I am going to be developing an application for work, and I am trying to decide whether to use Silverlight Business App or Asp.Net Web App. My manager is concerned about the performance and download time it would take if I created the entire application as a Silverlight app, with authentication. I have been playing around with some tutor...

Custom Silverlight cursor

Hi, How can i create a custom cursor in silverlight? Is there method other than showing\hiding canvas containing the image of the custom cursor? Is there a professional way to do it? ...

Does Silverlight 4's WriteableBitmap *really* cripple legit cross-domain access in the name of DRM?

In this thread from a year ago it's explained that WriteableBitmap will block read access when any part of it comes from an outside domain - say a free image server. It's further elaborated upon that this is for "DRM". I guess there's some big threat of someone writing a movie-ripper in Silverlight that includes a movie from another do...

ApplicationBar Working Different in Windows Phone 7 Beta Than CTP

There are a few issues I notice with the beta version of the WP7 tools: The ApplicationBar no longer causes a page to resize it contents with the CTP workaround Using the ApplicationBar from App.xaml and imported as a static resource does not work as expected In the CTP version of the WP7 tools when using an appbar and navigation fro...

How System.Windows.Threading.Dispatcher in the main UI thread is accessible from other threads ?

I have read that we can not access anything in the main UI thread in Silverlight application from other worker threads. So why it is possible to access an object of class System.Windows.Threading.Dispatcher which is associated with the main UI thread from other worker threads when we want to delegate some work to be done on the User Int...

Easy way to make Silverlight combo boxes perform like HTML select boxes?

I'm fairly new to Silverlight but experienced in web development, and I'm finding myself highly annoyed with Silverlight's default combobox. It seems to be lacking any concept of use for regular data entry. Primarily I'm wishing it would function like an HTML select box, where you can hit the drop down, then type a letter and it takes yo...

How closely is Entity Framework tied to WCF RIA Services?

I'm trying to build a simple proof-of-concept "business application" in Silverlight and I keep running into a wall in trying to get data in and out of the database. I'm currently trying to learn WCF RIA Services, but I'm stuck because I can't get Entity Framework to work with existing tables in my database (they don't show up in the mod...

Bing Maps Silverlight Extended Modes API

Hello friends, I need to have this API badly quickly. I went on Microsoft Connect but there is nothing even wasted the whole day making research on forums but found no suitable answer. Can you please just upload it somewhere and put link here? Umair ...

Busy indicator for WCF async calls in Silverlight 4?

Hi Guys, I have a SL4 app consuming WCF services. The client make async call to the services, during this time I would like to show some sort information or busy indicator on the screen which tells the users that the app is doing something. Now I am pretty sure SL4 has something like this, but I am drawing a blank.... Can someone plea...

Silverlight WP7 messaging, should I use a WeakReference and if so how?

I'm creating a simple messaging system for a windows phone silverlight app. The idea is various xaml pages & other objects will subscribe to a messaging object, passing in the type of message they want to recieve/handle and an Action<> Delegate as the handler. When an action happens a message (with payload) will be sent to the correct ...

WP7 ListBoxItem child does not stretch to parent width

The following code works for stretching the child Grid within the ListBoxItem in Silverlight 3, but not in Windows Phone 7. Is this a bug or am I doing something wrong? No matter what element I put in the ListBoxItem, it never grows to the size of the ListBoxItem, only to the size of its own content. My end goal is to get the text to ali...

Displaying related, but non-foreign key data in a Silverlight datagrid column.

I have a Silverlight application which uses 2 separate databases. I have a situation where I have an Id column in one database, and the lookup table in another database. Obviously I cannot enforce this as a foreign key, and the Entity Framework will not let me build a single Entity Data Model for 2 databases, so I cannot define this rela...

How to follow the location of an element in Silverlight

I'm new to Silverlight programming, and the DependencyProperty is still relatively new to me, which causes the following issue: I'd like to attach to an event, when Canvas.LeftProperty of Canvas.TopProperty changes for an UIElement (a UserControl in my case). For example, I'm able to do the following: source.SizeChanged += del...

Name a class that puts action in dispatcher queue if its not already there

I have written a simple class that works with a UIElement and an action to invoke. Whenever the action is invoked, it puts the action in dispatcher queue, if its not already there. I use it to reduce number of calls. class NoNameClass { // has element and action in its ctor. void NoNameMethod() { if (!inQueue) { inQueue = tru...

Silverlight 4.0 Accordion Template

Hi, Is their a free template of accordion which behaves like Outlook? When the user adjusted its grid, the accordion item will form an images, stack horizontally? Thank you in advance ...

StaticResource not found

I have the situation where a SolidColorBrush (defined in App.xaml) cannot be resolved during runtime, when i use the Brush in a Style as StaticResource. During designtime (using Visual Studio 2010) the brush is found, cause when i change the color of the brush the UIElement with the styles are updated with the new color. During runtime...