I have a collection in the main window and I want to show it on a grid in a user Control,
What is the right MVVM way to do that ?
I've done an observableCollection in the MainWindow And bounded it to an observableCollection in the usercontrol. and in the user control the grid is bounded to
the collection.
it doesn't work :(
/// <su...
I have a Silverlight 4 application that connects to an OData service. My model is submitting multiple queries to the service in parallel and in the query callback I am processing the results using a backgroundworker.
This works great if I am making one call, but as soon as I make more than one call in parallel - sometimes it works - bu...
We are contemplating building an upcoming project in Silverlight. We would be developing this in SL 4, not 3, but another developer in our organization had the experience of upgrading from v2 to v3 in the middle of a project, and losing features and functionality that MS didn't include in v3. This was some headache for him, working aro...
I'm using exceptions to validate a control's input in Silverlight 4. When I throw an invalid input exception, VS 2010 displays the popup and stops the program. I ignore this and resume the program, and everything continues fine (since the exception is used to signal a validation error.) Is there a way to mark that one exception as ignore...
I have an app where users will enter lists of names. (There is some collection of valid names.) I'm not sure what the most user-friendly way to do this is.
One idea: Make a text box. If the text box loses focus, and the contents are a valid name, add it to a list box. If the user selects an entry in the list box and hits delete, remove ...
I have a page that is just an ASP-hosted Silverlight 4 object. I would like it to take up the full width and height of the browser, but it is not - it is too small, in a corner. Where can I adjust this?
I'm new to Silverlight. Thanks for the help.
Edit: Here is the .xaml:
<UserControl x:Class="ExpenseCalc_SilverLight.MainPage"
xml...
I'm writing an app where users enter records. I have a class that represents a record. Binding it to text fields works.
MainPage.xaml.cs:
public MainPage()
{
InitializeComponent();
// newExpense is of type ExpenseInfo
LayoutRoot.DataContext = newExpense;
}
ExpenseInfo.cs:
public class ExpenseInfo...
I'm trying to add this Silverlight 4 control to my project. I went to the downloads page, and it's full of VS solutions/projects/.cs files. I'm new to Silverlight, and I don't really know how to get the control from that. Help?
Update: I tried following roufamatic's instructions. At this point, I was still unsure how to use the control,...
I have a Windows Phone 7 application (Silverlight-based) that sends a web request and receives a web response. It works fine - I am using BeginGetReponse and an AsyncCallback to call EndGetResponse.
However, I need to wait for the response to be fully received, so that I can fill a collection with the data from the response.
What woul...
Hello
I'm very new to silverlight and I'm thikning which way to go. I'm in planning phase of my new project which should be built on silverlight. The problem is that I want to have my own DAL -> BLL on server side, and WCF service, which will talk to Silverlight should be consumable by other applications too, including other technologie...
Somehow in my WPF studies, this detail has escaped me.
I've seen syntax of this sort:
<UserControl.Resources>
<Storyboard x:Name="myStoryboard">
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" ... >
...
Why is the StoryBoard.TargetProperty value surrounded by parentheses? What does that mea...
I'm making a game in Silverlight, and I'd like to give it some background music. And in particular I'd like to avoid including the MP3 in the initial download (the XAP) - so that the user can start playing before the music has finished downloading.
How do I:
Dynamically start playing an MP3 file from a given URL
Have the MP3 file star...
Case:
public class customer
{
public string Adress { get; set; }
}
Xaml:
<Grid x:Name="LayoutRoot" Background="White" >
<StackPanel>
<TextBox Text="{Binding Adress}"/>
</StackPanel>
</Grid>
.cs
public MainPage()
{
InitializeComponent();
LayoutRoot.DataContext = new customer() { Adress = "So...
I'm trying to use a value converter. However, VS is complaining about this XAML:
<Grid x:Name="LayoutRoot" Background="White" Height="Auto" Width="Auto">
<Grid.Resources>
<local:DateFormatter x:Key="FormatConverter" />
</Grid.Resources>
The error:
The type 'local:DateFormatter' was not found. Verify that you are not ...
My question is simply: is it even possible?
Suppose I want to style a ListBoxItem such that it has a black foreground by default, blue when selected, and red when the mouse is over it. I ended up with something like this:
<!-- assume the default foreground color is black -->
<ControlTemplate TargetType="ListBoxItem">
<Grid Backgrou...
Am using Silverlight 4 hosted in an ASP.NET MVC page, e.g. ht tp://test.mysite.com/main. I make a call to the server from Silverlight using WCF and get some values back. One of these values I write as a cookie using:
HtmlPage.Document.SetProperty("cookie", newCookie);
I can then view the cookie text using:
MessageBox.Show(HtmlPage.Do...
In normal Silverlight apps if the root element is stretched (horizontally ad vertically) it will take up the entire Silverlight browser object.
With a Sketchflow application the root visual is a Microsoft.Expression.Prototyping.Workspace.PlayerWindow and your screens are dynamically displayed within a frame on the right side.
As sho...
I have a .NET 2.0 .asmx web service that looks something like this:
[WebMethod]
[return: XmlArray("FileInformations"), XmlArrayItem("FileInformation")]
public FileInformation[] GetFileInformation(
[XmlElement("Path")] string path)
When I try to call this web service from a silverlight windows phone 7 app (beta). I get an Inva...
Testing on local Web Development Server and running the application in shared hosting environment differs a lot.
What are the best steps to deploy a Silverlight RIA Services Application on a shared hosting environment?
...
How is the best way to handle any occuring errors in a Sivlerlight application?
I am not talking about error handling in a development environment.
But what would be the best way to log errors and look them up for fute reference?
...