silverlight

Localizing dates and times automatically in Silverlight

This is more of a question about best pattern and practice than asking about any one particular method. We have app that is heavily reliant on dates and times and is hosted in the US. Sometimes it needs to perform actions based on those values, like emailing out reminders and expiring "single-use" session tokens. However there are clien...

Why does System.Windows.Controls.Button always have a padding of 10px?

See screenshot. The bounding cyan-bordered box is the button, while the blue fill is the rectangle. I cannot for the life of me figure out how to get rid of the padding in the button. Is there a way to position the rectangle to the top left so it touches the cyan border? Thanks. ...

Is it possible to read user files on Windows Phone 7? If yes, how?

Hi everyone. I'm building an application that displays a bunch of images (such as a slide-show), but I wan't the user to be able to chose this files, or folders. I have no idea how to make it (I've read something about IsolatedFileStorage, but didn't understand if this means I can't look into user files). Edit: I found out a way to sele...

Silverlight development: shoud I type XAML or use a tool?

Hi all! I have been wondering what is the best way to do silverlight development in order to achieve the best results. So far, there are threee possibilities that come into my mind: 1 - visual studio visual editor, 2 - expression blend, 3 - coding XAML directly in visual studio. I was especially curious about third point: are you devel...

Silverlight 4.0: Launch User Control to a new Window

Hi, Is it possible in Silverlight 4.0 to launch a piece of user control to another browser window just like WPF DevComponents docking control behavior? Thank you ...

Silverlight 3 Element binding in a datatemplate

Hi, <DataTemplate x:Key="StatusColumnTemplate"> <Canvas> <Rectangle Fill="Red" Canvas.ZIndex="1" Opacity="30" Height="{Binding Value, ElementName=Stacky}" Width="{Binding Value, ElementName=Stacky}"></Rectangle> <StackPanel x:Name="Stacky" Orientation="Horizontal"> <Image Height="16"...

Monitoring Keyboard shortcuts in Silverlight

Hi, I have certain Keyboard shortcuts (ctrl+Key presses) in my Silverlight app which I use to do certain actions using Input Bindings. Now I am trying to monitor what are the shortcuts used most often. I do not want to explicitly log when the user invokes a input binding . I want it to be more generic. Now my question has two parts: I...

ASP.NET vs Silverlight

Hi, I was wondering why you would still use ASP over Silverlight, since with silverlight there is a lot you can do already. And you dont have to use css, jquery, js, html, etc. Also with silverlight you can do a call to the database via ria service. I can only think of 1 reason which is, that not every one has the plugin installed. B...

font color to the silverlightdatgrid cell of particular column while binding

i just want to apply font color to the text of a silverlight datgrid cell for a particular column while binding the itemsource how can that be accomplished? ...

Inherit custom class from Panel and VirtualStackPanel

Hi I am implementing a my custom class which needs to be derived from Panel. After inheriting from Panel, the overridden method "MeasureOverride" gets the default size. In my xaml page, I am using ListBox for which no width and height is specified and this custom panel is called from ItemsPanel Template. When the class is derived fr...

Silverlight - moving an image out of screen in little pieces

Hi I am using a lot of pictures moving out of the screen. I can dismiss them, for example if they are moving right from left, if their new coordinate is more then canvas.width-img.width they dissapear immidiatly, so they cant fly out the box. Thats fine, but i want to dinamicly 'kill' them, so in little pieces. I mean only the part that...

How often are customers willing to install Silverlight when they are not willing to update from IE6?

Assuming you are trying to sell large business/government software then IE6 will be a fact of life for many years to come. If you are dealing with the UK government, NHS, or local government in the UK then IE6 support is a given. A lot of customers will not move from IE6 as they have other web apps that will only work on IE6, they are ...

Silverlight 4 Binding to List of List of objects

Hello, someone can suggest how I can do it? I have a public static int _index in App.xaml.cs I have a List < List < Person > > foreach List < Person > I create a new button -> foreach button, the click.event of it opens a PopUp. Now I want to bind the Textboxes of the PopUp to the person-propertys For example: P...

Why is there no vertical scroll bar for this listbox

Given the following XMAL why is no vertical scrollbar for the ListBox which is bound to an ObservableCollection of 100 strings. If I change the height of the second row from * to something fixed like 500 then a scrollbar appears, but obviously i want the row height to be what ever is available (which is what I understand * to mean) <Us...

Failing to import external scripts using in IronPython DLR in the browser

I am trying to use IronPython in the browser and attempting to import external python scripts: <script src="http://gestalt.ironpython.net/dlr-latest.js" type="text/javascript"> </script> ... <script type="application/python" src="test.py" defer="true"></script> <script type="application/python"> import test test.Hello() </script> The ...

Testing navigation in silverlight

I have a Silverlight application that is using a navigation frame. I am trying to write a unit-test for that application using the silverlight testing framework, however when I execute the test method I get the following error: InvalidOperationException No XAML was found at the location '/Pages/LoginPage.xaml' The unit-test method loo...

Set Silverlight combobox selected item from string name

I am trying to set the selected item in my silverlight combobox from a string. In this example lets say I have a combobox named "MyComboBox" as follows: <ComboBox Height="23" x:Name="MyComboBox" Width="200" HorizontalAlignment="Left"> <ComboBoxItem Tag="0" Content="Pizza" IsSelected="True"/> <ComboBoxItem Tag="1" Content="Soda"...

Is it alright to use Code Behind of View to be View Model in MVVM?

In all tutorials about MVVM, I see code behind file is of no great use as we are trying to shift all the logic in view model. Is there any specific reason why we dont use Code Behind file itself as View Model? I understand benefits of MVVM over typical code behind codes with events and book keeping, but I am trying to explore possibilit...

Silverlight DataGrid - simulate Outlook AutoPreview

I want to use the Silverlight DataGrid to show notes. When they select an item in the grid I am going to show the note in a different area of the screen. However, I am hoping to also do something similar to Outlook AutoPreview, where the first few lines of the note are shown beneath each row in the grid. What is the best way to accomp...

Silverlight and Expressions components on a Build Box

I have a solution that needs to build Silverlight projects on a computer that doesn't have standard editing tools like VS or Expression Blend. From Expressions, I do need the font embedding and media processing capabilities of the Blend SDK. For Silverlight, I need to build for these 3 runtimes - SL3, SL4 and Windows Phone SL3. I am goin...