Issues



  • 0 comments   /   posted by   Denislav Savkov  on  Jul 17, 2008 (6 days ago)

    Introduction

    We’ve introduced you to the basics of Custom Controls in our previous article. Now we will give another example this time involving the Visual States Manager. We will create a templatable ContentControl that uses animations on its Content and the States & Parts model proposed by Microsoft.

    Dowload source code

    Parts & States Model

    The idea behind the States & Parts is to separate better the logic from the visual appearance and thus to allow better flexibility for both.



  • 0 comments   /   posted by   Denislav Savkov  on  May 22, 2008 (2 months ago)

    Introduction

    Sockets are well-known to many programmers today but this article is for the rest who aren’t familiar with them yet. Here we will also review an example of using sockets in Silverlight and their beta peculiarities. You can download the example and read the instructions for it at the end of the article.

    Download source code

    Overview of sockets in general

    To begin with, some preliminary information will be helpful. Sockets are used for communication among applications over a network. Network architecture can be generalized as consisting of four layers:
    1. Application
    2. Transport
    3. Network
    4. Link and Physical
    Each layer communicates only to the layer above and to the layer below it.
    -The Application layer provides services for communication among applications; such are FTP, HTTP, DNS and DHCP.
  • 0 comments   /   aggregated from   Non-Destructive Me  on  Apr 30, 2008 (2 months ago)   /   original article

    "Found" an annoying little bug that I can't seem to get around while moving some Silverlight 1.1 code to Silverlight 2.0.

    In this project, all of our controls have a base class that provides some common functionality.  In Silverlight 2.0, now that we have proper user controls and that wonderful InitializeComponent() method, I've been moving all our old style user controls to the proper method.

    However, Silverlight generates a partial class where the InitializeComponentMethod() sits, and this class is regenerated every time you change some of the XAML.

  • 0 comments   /   aggregated from   To Code or not To Code  on  Apr 30, 2008 (2 months ago)   /   original article

    I finally had time to sit down and really debug the Silverlight animation problem I described in a previous post.  I recommend heading over there and reading that post, it also displays the problem in action.

    The issue is that when using the Height or MaxHeight properties to restrict a TextBlock, if the text is longer than is allowed by the defined size, even though visually the text is truncated, the area in which the text would be still responds to mouse actions.  It does not matter if the properties are set on a parent object like a StackPanel or on the TextBlock itself, the issue is the same.

  • 0 comments   /   aggregated from   Eric Hexter  on  Apr 20, 2008 (3 months ago)   /   original article

    Working with the Silverlight testing framework the last three weeks has been interesting.  I ran into a crazy intermittent bug which drove me made for about 2 hours.  The usercontrol that I was adding to the TestSurface would be visible about 50% of the time when running my tests. The test would still run and I could hear the audio portion of the videos that were playing as part of an integration test, but the Controls were not visible on the test surface.

  • 0 comments   /   aggregated from   Laurent Bugnion (GalaSoft)  on  Apr 04, 2008 (3 months ago)   /   original article
    Introduction

    In WPF, one of the best know effects is the "reflection" effect, where a scene reflects itself dynamically. It's a very cool feature, because it's really easy to realize, and it allows to reflect images, but also videos or other User Interface scenes. The key to this is to use a VisualBrush. Silverlight is not exactly as powerful as WPF, and doesn't have VisualBrush, but it has ImageBrush and VideoBrush, both of them allowing cool media reflection effects (these brushes can also be used for other things!).

    The key to making a reflection is placing a picture (or a video), and underneath it, an element (typically a Border).

  • 0 comments   /   aggregated from   Karsten Januszewski  on  Apr 02, 2008 (3 months ago)   /   original article

    For some random reason, occasionally Silverlight 2 projects will suddenly no longer support debugging.  Very frustrating.  Fortunately, the fix is pretty simple:

    Right click on the Web in the Solution Explorer pane.  If you have a Web project, you will see "Property Pages", if you have a Web Application project you will see "Properties".  Select that.

    Under "Property Pages" select "Start Options" and make sure that both "Silverlight" and "ASP.NET" are checked, "Native Code" and "SQL Server" are unchecked.

  • 0 comments   /   aggregated from   theADOguy  on  Apr 01, 2008 (3 months ago)   /   original article
    Silverlight Logo

    As I've been neck-deep in Silverlight 2 for a couple of months now I noticed that there are some bugs/inconsistencies that aren't necessarily known to everyone. Here's a list of some of the issues (with workarounds if possible):

    Custom Control Data Binding

    If you are writing User/Custom Controls that want to be used in data binding (i.e. DataTemplate), you must use the assembly name in the namespace declaration, even if it is in the main assembly:

    Bad:
    xmlns:my="clr-namespace:MyAssembly.Controls"
    Good:
    xmlns:my="clr-namespace:MyAssembly.Controls;assembly=MyAssembly"

    This is a known bug that will be fixed in future builds.

  • 0 comments   /   aggregated from   theADOguy  on  Mar 16, 2008 (4 months ago)   /   original article

    Silverlight 2

    If you don't know Ian Griffiths, you should.  He's the co-author of my favorite WPF book (with Chris Sells)*.  Ian has a great post today that details a bug with the Silverlight 2 Cross Domain Policy file.  It seems that the Flash crossdomain.xml file is working, but the Silverlight policy file is broken.  Take a read if you are doing cross-domain and pulling out your hair...its a great tip.

    * Sure, I wrote the WPF/E appendix but that's not what I prefer it.

  • 1 comments   /   aggregated from   Michael's Blog  on  Mar 09, 2008 (4 months ago)   /   original article

    In my last post I wrote about how you can use sockets in Silverlight 2 beta 1. Well, when publishing my application to a Internet domain the code didn't work. I always get a socket exception: error code 10013, access denied. I have put an example online at http://frankfurt.schwarz-interactive.de:4501/test.aspx.

    I'm following up with the people who wrote the policy code and see what's going on here. You'll get a message here on my blog when there is a fix for the source code or a work-around.