I'm looking to create a bunch of rectanges that are going to share some properties and some other properties will be different. This is all done in codebehind, and clearly it is very possible to do this without breaking a sweat by copy and paste skills, but in the spirit of making my code more elegant; is it possible to have a sample rectangle like so
Rectangle sampleRect = new Rectangle(){Stroke = strokebrush,Margin = new Thickness(5)};
and model everyother rectangle after that with diefferent height and width attributes?
UPDATE Thanks for the answers, I am actually looking for more of a CSS/style thing...