silverlight

ContentTemplate selection based upon the DataContext in Silverlight 4

In my Master/detail scenario, I have a datagrid as master and a UserControl as child. When a particular Row being selected in master grid I assign it to the UserControl's DataContext. In my User Control I have couple of DataTemplates as Resources and ContentControl as the Child Container. What I'm struggling with is how to dynamically se...

childWindow Full Screen Event tweak the Parent to also FullSCreen Mode

Hi, I have a ChildWindow which contains a ExpressionMediaPlayer inside it. When I click on the ChildWindow Media Player Full screen button it swiches the whole application to FullScreen Mode. Is there a way to avoid it. I am not quite sure if this scenario is going to fall under SL security restrictions. When I drag the ChildWindow(t...

How to get the Distance bettwen ChildWindow and Parent Window?

Can we calculate the gap bettwen ChildWindow and ParentWidnow? While I can Drag arround the ChildWindow there is a Distance from the Top and Left. WHile I try to get the Distance using: ChildWindow.Margin it is returning 0,0,0,0 Is there any other method to get the Distance bettwen ChildWindow and ParantWindow? Thanks, Subhe ...

ElementName not working when assigning DataTemplate from code behind?

I am trying to access Control using ElementName from DataTemplate that is used in different UserControl (Resources) than defined (in xaml). Imagine this situation: MyUserControl.xaml with following DataTemplate in resources: <UserControl.Resources> <DataTemplate x:Key="SomeTemplate"> <TextBlock Text="{Binding Text, ElementNam...

Symbols not loading for Silverlight app on VS 2010

Hi I have a silverlight application pointing to Silverlight 3. I use VS 2010 Ultimate. When i run it in debug mode or attach to process, break points will be highlighted with yellow exclamations saying symbols are not loaded. I tried the solution given here: http://tiny.cc/li8av It points to a pdb file on Framework's temp folder and say...

Silverlight 4 & SQLite

I've been doing some research on finding an embedded database to be used with Silverlight/isolated storage. Everyone says SQLite will not work with Silverlight due to unmanaged code. From my experience there is just a dll named System.Data.SQLite.DLL which I believe I either got from installed SQLite.NET or from the NHibernate build. ...

How to build a real-time streaming data silverlight application

Hi all, I'm curious to get some feedback and ideas on how one could go about building a realtime data streaming application. We can keep the source data generic for this exercise ... throughput info, stock trade pricing, etc. Just something that is constantly changing, and the information is stored in a database. I am interested in buil...

Debugging silverlight in a WPF app...

I am developing a WPF app that contains a webbrowser control that loads a silverlight application. I would like to be able to launch the app from visual studio (F5) and have the debugger attach to the silverlight code. However, I've not had any luck with this. The best I can currently do is to launch the app without attaching, then once...

How to data-bind TreeViewItem.IsExpanded to a node data objects

I have a hierarchical data classes like public class MyNode { public string Name { get; set;} public bool IsExpanded { get; set;} public List<MyNode> Nodes { get; set;} } I could define a HierarchicalDataTemplate to bind MyNode classes to the TreeView. <sdk:TreeView ItemsSource="{Binding RootNodes}"> <sdk:TreeView.ItemTem...

How do you set Textbox.Width to 100% in silverlight?

How do you set the width of a textbox to fill the container programmatically? For example in xaml if I have the following declaration for the textbox: <TextBox Height="23" Name="TextBox1" VerticalAlignment="Top" Width="50" /> how can I set the width so that it fills the container in a button click handler? ...

Unable to databind a Silverlight4 DataPager control with MVVM

Hi all, I have a data driven Silverlight 4 business application with a fairly standard user interface. There's a side section that allows you to enter your search criteria, a standard Silverlight 4 datagrid control in another section that contains your search results (if any), and then a "details" section of the screen which shows the i...

How Can I Embed a Word Document in Silverlight?

I need to Embed the Word Document in silverlight,and i need to have all the same functionality of Word Document. Like Cut,Copy,Paste,Save,Save us,Formating Etc. How can i Achieve this?. Also Suggest me some links too. ...

Creating a search against an Entity framework object in RIA services (Silverlight)

Hi, All i want to do is enter a term in a search box, click a button and then call a custom method in my domain service that will just return the records I want. As it currently stands I've got a grid on the screen bringing back all the rows. Any Ideas? ...

How to bind StackPanel Children from a ViewModel?

New to Silverlight. I'm working on a chat application where new chat messages are added to the bottom of a list. I had a working version that used as StackPanel inside a ScrollViewer and then in some code behind used StackPanel.Children.Add(). I'm trying to convert this to a View-ViewModel approach, and I can't figure out how to bind ...

Silverlight ASP.MVC routes

Hi, how can I emulate stuff like <%=Url.Action("Action","Controller" ... where I am using Silverlight 4 as the client to ASP.MVC in say OpenReadAsync? Aside from passing it a Uri with the full path as a string - not preferred. Cheers ...

where put clientaccesspolicy.xml and crossdomain.xml ? - 404 not found error

I have Silverlight app and when I want to do some action Firebug show me that on this two files I have 404 not found error. So should I insert this files somewhere in my solution or to IIS rootwww directory? Or it's other solution of this error? ...

[Silverlight] WCF RIA Services Issue With Updating

I am running into an issue with refreshing data on a page after doing an update through WCF RIA Services. I have a ComboBox and a Button on a page. The user chooses an item from the ComboBox, and then clicks the Button. This does a soft delete of the item in the database(setting "Active" = false). However, I would like for it to be remo...

Silverlight - open to specific XAML page and the object tag

I have a Silverlight app with two XAML Pages - MainPage and OtherPage How can I add a reference to a page to open the Silverlight control to the specific page? I have this <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%"> <param name="source" value="ClientBin/Test....

Multiple page printing in Silverlight 4 using Custom Printing Template (a User Control)

Hello everyone, I need some help on printing multiple pages with custom printing template. The printing template (a Silverlight User Control) consists of two Text-block's (Title and Content which displays and later prints the respective text). The problem I am having is its only able to print 1 page, how can I extend it to print multipl...

How to bind a Dependency Property to anything in the XAML

(Using Silverlight 4.0 and VS 2010) So I have created a property called Rank in my C# file. How do I now tie that to a control in the UserControl xaml file? My code: (TopicListItem.xaml.cs) #region Rank (DependencyProperty) /// <summary> /// Rank /// </summary> public int Rank { get { return (int)Get...