Click here to Skip to main content
12,752,319 members (37,375 online)
Click here to Skip to main content

Stats

264K views
4.8K downloads
260 bookmarked
Posted 11 Mar 2008

WPF: A Beginner's Guide - Part 6 of n

, 5 Apr 2008 CPOL
An introduction into WPF Styles and Templates.
Part6_Styles_And_Templates
Styles_And_Templates
Beatriz Costa Planet ListBox
bin
Debug
Styles_And_Templates.exe
Styles_And_Templates.vshost.exe
Styles_And_Templates.vshost.exe.manifest
Data
Images
2moons_2.gif
DataLogo.png
earglobe.gif
jupglobe.gif
marglobe.gif
merglobe.gif
nepglobe.gif
planetx.jpg
plutoch_2.gif
sun.jpg
uraglobe.gif
venglobe.gif
obj
Debug
Bea Costa Planet ListBox
Beatriz Costa Planet ListBox
Templates
TempPE
Properties
Part6_Styles_And_Templates_VB
Part6_Styles_And_Templates_VB
Beatriz Costa Planet ListBox
bin
Debug
Part6_Styles_And_Templates.exe
Part6_Styles_And_Templates.vshost.exe
Part6_Styles_And_Templates.vshost.exe.manifest
Data
Images
2moons_2.gif
DataLogo.png
earglobe.gif
jupglobe.gif
marglobe.gif
merglobe.gif
nepglobe.gif
planetx.jpg
plutoch_2.gif
sun.jpg
uraglobe.gif
venglobe.gif
My Project
MyExtensions
obj
Debug
Beatriz Costa Planet ListBox
TempPE
Part6_Styles_And_Templates_VB.vbproj.user
using System;
using System.Collections.Generic;
using System.Text;

namespace PlanetsListBox
{
	public class SolarSystemObject
	{
		private string name;

		public string Name
		{
			get { return name; }
			set { name = value; }
		}

		// In Astronomic Units (AU)
		private double orbit;

		public double Orbit
		{
			get { return orbit; }
			set { orbit = value; }
		}

		// In Km
		private double diameter;

		public double Diameter
		{
			get { return diameter; }
			set { diameter = value; }
		}

		private Uri image;

		public Uri Image
		{
			get { return image; }
			set { image = value; }
		}

		private string details;

		public string Details
		{
			get { return details; }
			set { details = value; }
		}

		public SolarSystemObject(string name, double orbit, double diameter, Uri image, string details)
		{
			this.name = name;
			this.orbit = orbit;
			this.diameter = diameter;
			this.image = image;
			this.details = details;
		}

		public override string ToString()
		{
			return this.name;
		}
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Sacha Barber
Software Developer (Senior)
United Kingdom United Kingdom
I currently hold the following qualifications (amongst others, I also studied Music Technology and Electronics, for my sins)

- MSc (Passed with distinctions), in Information Technology for E-Commerce
- BSc Hons (1st class) in Computer Science & Artificial Intelligence

Both of these at Sussex University UK.

Award(s)

I am lucky enough to have won a few awards for Zany Crazy code articles over the years

  • Microsoft C# MVP 2016
  • Codeproject MVP 2016
  • Microsoft C# MVP 2015
  • Codeproject MVP 2015
  • Microsoft C# MVP 2014
  • Codeproject MVP 2014
  • Microsoft C# MVP 2013
  • Codeproject MVP 2013
  • Microsoft C# MVP 2012
  • Codeproject MVP 2012
  • Microsoft C# MVP 2011
  • Codeproject MVP 2011
  • Microsoft C# MVP 2010
  • Codeproject MVP 2010
  • Microsoft C# MVP 2009
  • Codeproject MVP 2009
  • Microsoft C# MVP 2008
  • Codeproject MVP 2008
  • And numerous codeproject awards which you can see over at my blog

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170217.1 | Last Updated 5 Apr 2008
Article Copyright 2008 by Sacha Barber
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid