silverlight-4.0

Memory usage increase when the Controls render in Silverlight?

Hello Everyone, I just want to get more understanding about Silverlight. I notice that if I created a Control object in C#, the memory usage is not increased much in the application (by reading the Memory (Private Working Set) in Task Manager). But when I add the Control into the Silverlight layout to display the control, the memory u...

Silverlight 4 suppressing drag-and-drop image

Background: I have two usercontrols, each with a DataGrid wrapped in a StackPanel. They're stacked in the Default.xaml vertically. Added the PanelDragDropTargets to both user controls. We can drag and drop the datagrids so one that was at the bottom can be at the top. (for user's preferences) Works great. Only issue... when you do a ...

Is there a way to call Navigate from within the ViewModel?

I have a Silverlight 4 project which displays a chart and some buttons to allow the user to change the chart's date range. The date range can also be passed in via a query string parameter - something like http://myserver/MySilverlightPage/#?DateRange=OneMonth - and when the user clicks a button I'd like to update the Url as well. I u...

RIA Service initialization problem

Hello, I have a problem with RIA services. Some times (not always) I get an InvalidOperationException with the message: "EntityTypes has already been initialized" The error comes from the generated file but I don't know how to resolve this issue. Google brings out only 2 results which are not very helpfull. Does anybody know what I co...

How to use Dictionary to provide data (which are defined in runtime) to DataGrid (xaml) in SL4

Hi, I am looking for information on how to provide data to DataGrid using Dictionary. My use case is: I have WebService that provides me a table with the content (and column names) I get know in runtime. My current implementation of a data tuple is: public class GridTuple : Dictionary<string, string> { public GridTuple(IDic...

Silverlight 4 and LisBox's SelectedItem when using DataTemplate as ItemTemplate

Hi All, I'm using tow listboxes for drag n drop where user can drag items from source listbox and drop on the target. I'm using a DataTemplate for the ListBoxItems of my ListBox Controls. I need to give the user ability to move up/down items in the target listbox after they been moved from source. I have two button "Move Up" & "Move ...

Silverlight 4.0: Setting an Image Source to a URL

Is there a workaround on this or is this possible in silverlight? my image is not displaying. <Image Source="http://localhost/TempWS/Images/mtdb.ico" Height="60" Width="60"/> ...

How can I center a the text on of a Label?

I'm creating a Silverlight 4 application and I want to have an image and some text below it centered. My idea is to have a stackpanel for this purpose but it seems that it centers the control but not the text. Any suggestions? <StackPanel Height="182" HorizontalAlignment="Left" Margin="306,76,0,0" Name="stackPanel1" VerticalAlignment=...

How can I use a custom font in a Silverlight application's TextBlock?

I'm trying to give my TextBlock a custom font that I downloaded from the internet, but in the FontFamily category I only see about 9 fonts, and no option to load a new one. Any suggestions? ...

RIA Services: Server process returns multiple entities but Client shows 1 entity duplicated

I am running into an issue where RIA Services returns 3 entities from the server (I have verified while debugging on the server process, and have verified via Fiddler that the service is in face returning 3 entities. I am using MVVM so I am calling Load on the client side using a helper function that I borrowed from a Shawn Wildermuth ...

VS2010 debugging SL 4, can't load source code from source server

I am attaching to an IE instance which is running my deployed SL 4 app. All symbols load ok but when the debugger hits a breakpoint instead of loading the source code from TFS it says: SRCSRV: Unable to determine source server information for module 'MyDll' because it is not fully trusted. The website is a local LAN website like https:...

Setting Popup.Child resulting in HRESULT E_FAIL

I'm attempting to implement an adorner for a PasswordBox to add watermark functionality. I'm basing it on the project at http://sladorner.codeplex.com/. I've gotten the watermark implementation working in a sandbox application, but I'm running into issues when I attempt to add this to a class library. When the line that sets _Popup.Chi...

Why is this animation not working?

Hello, What is wrong in this code ? <UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:i="http://schemas...

Not understanding Storyboard.TargetProperty property

Hello, What exactly is meant by Storyboard.TargetProperty. I know that it's the property of the object which we want to animate. But why are they so complex like :- Storyboard.TargetProperty='(Shape.Fill).(SolidColorBrush.Color)' and why not :- Storyboard.TargetProperty='Fill' 2nd example :- <DoubleAnimationUsingKeyFrames Storyboa...

Endpoint not found

I have created a new RIA service with OData exposed. I wanted to test it out. My project name was ChinookSample and the namespace was ChinookSample.Web.Services. When I try to browse... http://localhost:52878/Services/ChinookSample-Web-services-dsAlbumAndArtist.svc I get the service page, but the moment I go for... http://localhos...

Silverlight4 ObservableCollection and updates to database

Hi All, I have implemented the Drap n Drop functionality using the two listboxes (lstSource, lstDest) where user can drap & drop item between two lists. I have two ObservalableCollections (sourceCollection & destCollection) which are binded to the relevant lists. In the initial load method, DomainContext gets all the tasks from db and ...

How to do validation on both client and server side for a service which is a store procedure(return a complex type)

Hi I am doing Silverlight 4 In my database, I have a store procedure(having two parameters) which returns rows (with extra fields). So i have to make a complex type for those rows on my Models. And Making a service to call that function import store procedure. The RIA will automatically create a matching Entity(to the complex type) an...

QueryParameters cannot be changed when CanLoad is False

I'm trying to update using a simple DTO that is bound to a DataGrid with associated DomainDataSource. The DTo on is something like this with BackupInfo property having annotated with BackupInfoValidationAttribute: public partial class SupportDbDTO: IEditableObject { private string _version = "0.0.0"; private SupportDbDTO _original...

Validation on a combobox inside a RIA form

Hi there, I tried to get an answer for my problem on silverlight.net however no luck so I thought I would try here out. I have created a ria entry form inside a child window. I am trying to add a combobox to the form which I am having problems with. <ComboBox x:Name="comboType" DisplayMembe...

horse animation using keyframe technique

Hello, In one the video tutorials i saw one nice program that the speaker created using Keyframe based technicque in which the animation starts out slow and then moves so fast that it literally looks like the horse (image of horse) is running. Can anybody guide how can i create this type of animation? If you came across any links which ...