Samples



  • 0 comments  /  posted by  John Papa  on  Sep 02, 2008 (6 days ago)

    Step 1)  Create a tester control...



  • 0 comments  /  posted by  Denislav Savkov  on  Aug 15, 2008 (3 weeks ago)

    ...continues from part 2

    Introduction

    In the last part of our article series about the weather control we take a look at the templates and the web service we use.

    Making the templates

    Common resources

    We try to make the control change its look easy and without retemplating everything. That is why we define text styles and brushes and we use them throughout the templates we create.

    <Color x:Name="DarkColor">DodgerBlueColor>
    <Color x:Name="MediumColor">LightSkyBlueColor>
    <Color x:Name="LightColor">WhiteSmokeColor> 
    <SolidColorBrush x:Name="DarkBrush" Color="{StaticResource DarkColor}"/>
    <SolidColorBrush x:Name="MediumBrush" Color="{StaticResource MediumColor}"/>
    <SolidColorBrush x:Name="LightBrush" Color="{StaticResource LightColor}"/>
    <Style x:Name="TextStyle" TargetType="TextBlock">
         <Setter Property="HorizontalAlignment" Value="Center"/>
         <Setter Property="FontSize" Value="12"/>
         <Setter Property="Foreground" Value="{StaticResource DarkBrush}"/>
     Style>
     <Style x:Name="TextHeading" TargetType="TextBlock">
         <Setter Property="HorizontalAlignment" Value="Center"/>
         <Setter Property="FontSize" Value="14"/>
         <Setter Property="Foreground" Value="{StaticResource LightBrush}"/>
         <Setter Property="FontWeight" Value="Bold"/>
     Style>

    Thus by editing those few styles and brushes we can very easily change the look of the control, even though not that dramatically.

  • 2 comments  /  posted by  Denislav Savkov  on  Aug 12, 2008 (3 weeks ago)

    …Continues from Part 1

    Download full source code

    What is the slider

    Main part of the weather control we introduced is the slider.

  • 4 comments  /  posted by  Denislav Savkov  on  Aug 08, 2008 (1 month ago)

    Introduction

    In this article series we'll show you how we made a custom weather forecast control. To create the control we used some of the developments from our previous articles. Here we review mostly the new things that were not reviewed before. In the end of the article there are links to those articles that are relevant. 

     

    As you see in the end we have a a nice control with custom look that draws weather data from a web service and that is usable in real-life.

  • 0 comments  /  posted by  Rich Griffin  on  Aug 07, 2008 (1 month ago)

    Last year I built a couple of WPF tag cloud applications that hooked up to my del.icio.us account and displayed the data using different visualisations whichtagcloud included a tag cloud in a variety of different flavours and I also used the Time Line Panel from the blendables control suite from Identity Mine. To access del.icio.us I used a .net library up on Source Forge originally developed for use in the del.icio.us Winforms client called Netlicious which was originally written for .net 2.0 by Nate Zobrist.

  • 2 comments  /  posted by  Denislav Savkov  on  Aug 01, 2008 (1 month ago)

    Introduction

    The need of selection is a pretty common thing. That made us think of a way to generalize the task and create a reusable class that can be used in more than one scenario. We put together a simple helper class that lets you handle selection easily.  The responsibilities of the class are:

    • to keep only one item selected;
    • to give you the index of the selected item;
    • possibly to return a handle to the selected item

    You can use the SelectionManager on any ObservableCollection of ISelectable objects. In fact you could use it on non-UI objects if you need to have one object in one state and the rest in another.

  • 0 comments  /  posted by  Denislav Savkov  on  Jul 28, 2008 (1 month ago)

    Introduction

    In our serial article about custom controls in Silverlight we will create a control that inherits from ItemsControl. We thought it would be interesting to show you how to replace the default StackPanel with Grid and let items arrange consecutively like in StackPanel instead of using the Row and Column attached properties. Another thing we added is a container for each item. We used ListBox as a model for our control, the Reflector was very helpful for that. To achieve extended functionality we implement Dependency Properties.

  • 0 comments  /  posted by  Ola Karlsson  on  Jul 25, 2008 (1 month ago)

    Note: This article is submitted by Ola Karlsson for Silverlight Contest: Write and Win.Thanks a lot, Ola! Hello All, Please drop a comment if you like it.

    Overview

    In this article we’ll be looking at the concept of adding interactive Silverlight elements to existing Web pages to provide added rich features. We’ll be looking at creating an animated Silverlight panel which will slide in from the side of the browser window when a button is clicked.

    The somewhat tricky bit is that we want the panel to lie on top on the normal HTML content of the page and when when the Silverlight UI is slid out we want to be able to interact with the HTML instead.

    Download source code

  • 0 comments  /  posted by  Matt Serbinski  on  Jul 24, 2008 (1 month ago)

    Note: This article is submitted by Matt Serbinski for Silverlight Contest: Write and Win.Thanks a lot, Matt! Hello All, Please drop a comment if you like it.

    Drupal is an open source content management system (CMS) that allows users to add modules to their sites for great flexibility. These modules are typically written in PHP and use drupal's API to connect themselves with the framework. Silverlight (version 2.0 and greater) is a cross-platform browser plugin that allows users to write managed .NET code for the back end and use XAML as the front end. Since silverlight is a browser application and drupal is a framework for hosting data in browsers there can be data that is shared between the two using HTTP as the transport. In this example, I have chosen to use XML-RPC as drupal uses xml-rpc natively and silverlight can easily take advantage of this.

     


  • 0 comments  /  posted by  Matt Perdeck  on  Jul 23, 2008 (1 month ago)

    Note: This article is submitted by Matt Perdeck for Silverlight Contest: Write and Win.Thanks a lot, Matt! Hello All, Please drop a comment if you like it.

    Reusable code to do narrow data columns with navigation buttons, such as address lists.

    Download Source code

    Contents

    • Introduction
    • Requirements
    • Installation
    • TallColumns Project
    • TallColumnsManager Project
    • Db Project
    • WrapPanel Project
    • GroupHeader Project

    Introduction

    When it comes to presenting data, there is a lot of emphasis on grids that present data in a single wide column, showing lots of fields horizontally.

    However, some data tend to be presented in narrow columns, such as address lists and book indices...