silverlight

modal popup effect from silverlight usercontrol

Hi there, I am playing around and trying to learn silverlight4. I have an existing asp.net page with and area of 600 * 400px available for my silverlight form. My silverlight application has 2 usercontrols. The 1st usercontrol contains a listview of some data, when a user clicks on a list item I display the 2nd usercontrol. Is it possi...

Detect Idle Silverlight Application

What's the simplest way in Silverlight to detect the user is not active? i.e. no mouse input and keyboard input for a period of time. I tried monitoring the mouse events, keyboard events and the focus events of the root visual but it doesn't seem enough. For example, a popup window may be open and these events won't reach the root visua...

Does WriteableBitmap has new features in Silverlight 4 ?

and if someone could give me an example on how to use it, with a stream? (not sure how that works) I know how to create a BitmapImage from an URI now I need to convert this image to a WriteableBitmap, but I get a null exception error with something like this: BitmapImage image = new BitmapImage(new Uri("http://www.example.com/example.pn...

How can I specify a default property to bind to in Silverlight / WPF?

Is there a way to specify a default property to be referenced by the Path with data binding within XAML? I am looking to be able to do something like what CollectionViewSource does when using Binding. When you bind to a CollectionViewSource within XAML, it is automatically hooking up Path to the View property. Eg: {Binding Source={Sta...

SL app doesn't connect to Database from IIS, but does from VS2010 - SQL Server Auth, not Wndws Auth

I've made two small/test Silverlight apps with VS2010 (I am new to it), having same problem with both... When I run/debug it from within VS2010, the app runs and it connects to the database fine. But when I publish it to the IIS (on the same machine VS2010 is on), the app will run, but it will not connect to the database. I'm using SQL ...

Getting Started with Windows Phone 7

This is a community wiki list of Windows Phone 7 resources. Feel free to edit/add/etc. General Information App hub - central place for windows phone/xbox development tools/tutorials/info http://www.microsoft.com/windowsmobile/en-us/default.mspx http://developer.windowsphone.com/ http://windowsteamblog.com/Windows_Phone/ Programming Gui...

Silverlight Web Service

Below is the code i used to consume web servcie in SilverLight. private void button1_Click(object sender, RoutedEventArgs e) { BasicHttpBinding bind = new BasicHttpBinding(); EndpointAddress endpoint = new EndpointAddress("http://loalhost/Service.asmx"); ServiceSoapClient client = new ServiceSoapClient(bind, endpoint);...

Validation Summary in TabControl (Silverlight 4)

Hello, everyone. Here is my question. I'm using MVVM pattern in my project and i have a UserControl, which has a TabControl on it. TabItems have validations on them. Main page looks like this: <UserControl> <DataInput:ValidationSummary x:Name="ValidationSummary"/> <Grid x:Name="LayoutRoot"> <DataInput:ValidationSummary ...

Silverlight 4 ManagedRuntimeError 4004 Listbox Scrolling Image XamlParseException

Silverlight 4 is crashing on me. The Just-In-Time Debugger says: An unhandled exception ('Unhandled Error in Silverlight Application') Code: 4004 Category: ManagedRuntimeError Message: System.Windows.Markup.XamlparseException: [Line: 0 Position: 0] I bind a listbox to a collection of 20 (or so) items. the collection loads fine and b...

C# Web Application Question

Hi All First question on Stack overflow... I am a novice in C#, yet finding it quite straight forward in learning it. I saw this tutorial just a few minutes ago. Reading through the various c# technologies WCF, WPF, Silver light, c# with asp.net, that is quite a lot of technologies to take it in with c#. I will be creating a web ap...

Setting the xaml of the Silverlight 4 RichTextBox

I can retrieve the xaml with rtb.xaml.ToString() and store it in a database. But how do I set it? As an example, I thought rtb2.Xaml = rtb.Xaml would work. ...

Change Page when entering fullscreen mode

Hi, my problem is quite simple: when user changes selection in a ListBox, I need my app to go to fullscreen mode, but I need to change the displayed page. I use Silverlight 4 private void MainListBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { PresentationPage currentPresentationPage = new Presentatio...

Creating high resolution image

I have an image (png) with resolution 1600*1200 (96 dpi). I have put some text on the image and then saved it to a file for it to be loaded using silverlight's deepzoom with the pivotviewer. The text is blurry when zooming in and I was wondering how I can make the text look sharper (only if zooming in a bit). This is my first bit of pr...

ComboBox Binding is lost when bound item is swapped for a new item containing null for the field

I have a "User" screen where a User entity is bound. When it starts off as a new user, the values bound to the combobox is null so the combobox starts off blank and the works as intended. If I then click my "New User" button, any comboboxes that were switched from the empty null value to a value while still on the previous entity seems t...

visualizing multi layered xml data in visual studio

If I have a multi layered XML Data file of the following type <versions> <version id="1"> <features> <feature id="1"> <deatil>aaaaa</detail> </feature> <feature id="2"> <deatil>bbbb</detail> </feature> </features> </version> </versions> I want to build an interface in visual studio using ajax or asp.ne...

Prism regions not displaying registered views

I'm using PRISM in a SilverLight 4 application. I have a problem where views registered to some regions doesn't get displayed. When loading a module at startup I register some views to regions as follows: RegionManager.RegisterViewWithRegion("MyRegion1", typeof(IMySubView1)); RegionManager.RegisterViewWithRegion("MyRegion2", typeof(IMy...

Silverlight UpdateTarget() workaround for BindingExpression

Hello there, Can anyone suggest a way to create in Silverlight a workaround for UpdateTarget() method that exists in WPF? Removing the existing binding that exists on the DP and setting the value manually is not an option for me. Thanks ...

Using httpwebrequest to get image from website to byte[]

I want to read the raw binary of a PNG file on a website and store it into a byte[], so far I have something like this: Uri imageUri = new Uri("http://www.example.com/image.png"); // Create a HttpWebrequest object to the desired URL. HttpWebRequest imgRequest = (HttpWebRequest)WebRequest.Create(imageU...

XAML projects (Silverlight / WPF) Images or converted XAML Paths

My teammates and I are discussing the relative merits of converting icons our project uses into XAML. Blend has an "import" option that we can use to convert some of the image resources in the project to XAML Path elements automatically. On the one hand by producing XAML the assembly will remain small. On the other hand there is a simp...

Binding A Value in Header WP7/Silverlight

Noob question. :) I'm trying to add Margin to a Header through out my app and dont want to have to manually add that in all my views and I'll need to have various HeaderText. I know i need to add this to the App.xaml and i can get the Margin applied but I can't seem to get the Text to Bind. My Header Looks like this currently: ...