alfredoalvarez.com

Paint.net Tutorial Glamour image processing

by alfredo on Mar.03, 2010, under Uncategorized

A couple of days ago i had my first glamour photo shooting in Iris modeling in Seattle. I still need to figure a bunch of the lights and poses part of this equation but i at least figured part of the post processing for this type of image. On this post I’m going to go step by step till my final image explaining how to do it in paint.net. Below is my original image.

orignalimage

Has you may see she looks really well on this image except for a few details the background is not that pleasing and her completely arm looks a bit weird. The first step i took before doing anything was to use the levels tool contrast and hue tool to make sure the image looked well. After that it ended looking like this.

AfterHueandContrast

Now we got more detail on the face and the hair and shadow are less strong. I decided that her face should be the most important part of this image and selected it using the selection tool and cropped the rest of the image.

DuplicateandCrop

I liked this crop and thought that the face needed some smoothing since it had some slight marks on it. First thing i did was duplicate the layer. After duplicating the layer on the top layer i erased everything except the skin that i wanted to smooth making sure to remove the details from this selection (extra hint do the borders with an eraser on 20% alpha blending keeps more details on the image).

SkinSelection 

I took this layer and applied a gaussian blur this can be done at your discretion depending on how plastic you want the end product to be anything more than 10 and below 30 seems reasonable my value was 18 for this image.

AfterGaussianBlur

For the last step i set the layer mode to alpha blending 75% and reactivated the bottom layer.

last

This was my end product i was happy with how this image turned out. It was an interesting experiment on paint.net Some other enhancements that can be done are sharpening the eyes by selecting that part and applying sharpening just to it and the using alpha blending on the layer. Last but not least highlights on the hair. Hope people have enjoyed this small tutorial. I know i owe a new genetic algorithm post … but I’m uninspired….

Share and Enjoy:
  • Digg
  • Facebook
  • BarraPunto
  • DotNetKicks
Leave a Comment more...

Notes from the first day doing product photography

by alfredo on Feb.07, 2010, under photography

Hi everyone long time since i have posted sorry for that(assuming someone actually reads this blog). I have decided that the format for this blog will be the following once a month i will post a post based on my notes on whatever I’m currently doing in photography and the second article will be about programming so today i will be writing about product photography and my first experience with it.  I got the oneshot photo studio made by merax from meritline.com for $35 and decided to give product photography a try.

     First thing was building the box is somewhat simple but this is where i made my first mistake when i placed the backdrop the first time it had a line from being folded from shipping i should had iron that out before starting so this would be lesson #1:Iron the backdrop before placing it. I kept playing with it and i realized that my first pictures look kind of awkward because the backdrop was not completely extended which brings us to lesson #2: Strech the back drop. Do this by placing it has far up has you can on the velcro and letting it flow without being twisted.

oneshotphotostudio

    After fixing all the issues with the building the box i actually started shooting i was doing it handheld and using a very big aperture with a fast shutter. I got some pictures that were decent i actually enjoyed the look of the faded out backdrop but was not really happy with the details on the products two problems identified. First problem was motion blur destroying features of it because i was using the camera handheld even if my shutter was fast the item is really small so it’s easy to screw up. Therefore lesson #3:Use a small tripod(the kit i got actually has one). Looking at the pictures after this i was still having a problem since the aperture would make loose detail in some of the ends therefore since now i had a tripod i started shooting using a bigger aperture i settled in F32 because is the smallest my lens does (tamron 17-50 f/2.8 aspherical for sony minolta). Lesson #4: Shoot with a small aperture.

22644_583657684379_121804113_34635844_1412964_n 22644_583657689369_121804113_34635845_2480962_n

   At this point i was starting to get fairly consistent pictures and realized that the way the background looked in most cases in reference to the objects was a bit weird since it made it look very flat and not have that many parts of the products and the solution here was simple i was shooting straight to the object and background and by changing to shoot from the top towards the bottom and adjusting my table angle the results seemed to improve.Which brings us to Lesson #5 Shoot from the top.

22644_583657714319_121804113_34635850_5195639_n 22644_583657759229_121804113_34635859_6631959_n

  Did this for awhile then i started making some combinations of more than one element shot and decided to start trying and making splash pictures basically have water and doing the timing for this was kind of tricky so i changed into continous mode which help getting more sucesses, thefore Lesson #6 Use continuous mode when going for action events. An important thing to remember when using continous is to start shooting before trigering the action, getting one or two shots without anything is not bad at all. I also noticed that while doing this shot i wanted more speed  on the shutter so i changed my camera to manual and fixed the shutter speed that i wanted which was 1/60 and the aperture to f/11 i had left the iso at 100 and the pictures came with more action in them but they were dark still got the lesson # 7 use manual to set the aperture and shutter speed doing action sequences. Next to solve the problem with the light i decided to go and raise my Iso to 800 it was still to dark i raised it to 1600 and i started to get some noise but because the tent is well lit is something that is insignificant therefore Lesson #8 Feel free to use your Iso setting to get more speed.

22644_583657804139_121804113_34635868_948902_n 22644_583657819109_121804113_34635871_3081359_n

  At this point i got a good feel for it and its something that i enjoyed doing probably going to work on it a bit more next weekend but we still got the next part post processing the images. To make a summary of the settings i enjoy:

  • Stationary images (aperture mode F/32 iso 100)
  • Action shots (shutter 1/60 f/11 iso from 400 to 1600 depending on the looks via the camera.)

  The post processing for most of the images was pretty simple it consisted in using levels to control the input of the dark blue region into it so that other colors would not look blue tinted and running a bit of noise reduction in some of the pictures i did my processing using paint.net and the soften filter was really useful in all the images that had bright colored since the output of that effect made it look better. Lesson #8 Keep the post processing simple. That’s all i found from today’s photography session i will write again in about 15 days with a programming article.

 

22644_583657854039_121804113_34635878_6201534_n

Share and Enjoy:
  • Digg
  • Facebook
  • BarraPunto
  • DotNetKicks
2 Comments : more...

Expression Design: Step By Step Designing my Dragon icon

by alfredo on Oct.02, 2009, under Personal project, Programming tutorial

kick it on DotNetKicks.com

This article is not exactly about programming or photography. Is about a tool that i enjoy a lo when designing icons or creating UI interfaces for XAML and silverlight. Or simply a vector image. I’m going step by step through the process i followed while creating this draconic symbol when i was imagining a logo for myself. First step open expression design this is what the program looks like:

1

We are going to continue by drawing a black square on the board by selecting the square tool and dragging the mouse it should look like this:

2

Now we draw the shape that we want to cut from the square to begin giving it shape in order to cut the shape from the box in order to start making the design you want to end up with. In my case I’m trying to remove a part of the square to create a snout for the dragon icon. I made the shape then go to Object > Path operations > Back minus front. It ended up looking like this:

3

I repeat the step to create the small bump on the dragon head it starts to look as follows:

4

In the next steps i want to design the left side of the design my idea is to make it look like butterflies wings to make an E like the one in the middle name and be connected to the back of the dragon. The first step of this was to do a circle in a color that contrast with the color I’m using for my design. I elongated the circle to look like the top part of the wing using the direct selection tool the white arrow in the tool box and select an anchor to elongate it and make it look like below:

5

In order to create the bottom of the wing i selected the shape and made a copy of it afterwards i reflected it horizontal and align them then removed the circular parts of the shape using a square and the Object > Path operations > Back minus front. This is what i ended up with6

For the next step we wanted to hollow the wings in order for it to look the way that i envision it. I copied the wings and change their size to fit the one i wanted. At this point it looked like this:7

To Remove the red filling we use the same technique as before Object > Path operations > Back minus front. Making the wing look as follow:

8

With the wings ready we need a back of the dragon in order to attach them. I created shape using the pen tool that would cut the way i wanted it looked like this:9

I repeated the step before until i got the back that i wanted and it ended up looking like this:10

Now it is ready to attach the wings to the back in order to do this i grabbed the wings objects and place it in the position that i want it. Afterwards pressed Object > Path Operations > Unite. To make it all into one image it ended up as follows:

11 

After this i decided to work on the eye i created a circle again of a color contrasting with the background then using the direct selection tool made it have the shape of an eye by placing the circle inwards toward itself.

12

Next i wanted to give the dragon piece the shape of A therefore i needed to cut the innards on that shape. After creating the original shape it went like this :13

I used the direct selection tool to make it exactly the way that it would cut. This was the way that it look:

14

After this we needed to shape the bottom and it was done in a similar fashion, Created a new shape and distorted till it would eliminate the bottom in the shape. It looked like this at this point:

16

The next steps was to create the claw of the dragon shape procedure like the one used in the steps before was followed and it looked like this :

19

Afterward we created the last leg by cutting and uniting again and ended with the final product that was the following :

23

Hope that this helps anyone interested in starting to use Expression Design.

Share and Enjoy:
  • Digg
  • Facebook
  • BarraPunto
  • DotNetKicks
2 Comments :, more...

Magic Lantern Guide Sony alpha 100 7.0/10.0

by alfredo on Sep.22, 2009, under photography

I got my library card recently which is bringing me a lot of happiness, because now I can get books that otherwise I would not buy and find hidden gems like this one. This books is like the guide that this camera should had brought. It goes step by step trough all the details of what the camera can do an explains all the menus, if it wasn’t enough it also goes trought the trouble of providing the context that is needed in order to understand a photographic concept. My favorite chapter was the one about lenses because it explained all the types of lenses but gave concrete examples of the ones availables for this camera. I give this book a seven because is a starter book and i find it really useful to know your equipment at first but it looks like it won’t have much reuse value afterwards.

Link to the book in amazon

Share and Enjoy:
  • Digg
  • Facebook
  • BarraPunto
  • DotNetKicks
Leave a Comment :, more...

Chapter 1: Genetic Algorithms

by alfredo on Sep.13, 2009, under Personal project, Programming tutorial

kick it on DotNetKicks.com
I’m reading the book and introduction to genetic algorithms by MIt Press and i really like the topic at the moment. I have not read any implementation online of the many implementations that they are for this type of algorithms and i’m going to implement them from scratch. Then after i finish the book compare to the ones online. So the firs thing that needs to be explained before we go into the code is what is a genetic algorithm and what are their uses. According to wikipedia “A genetic algorithm (GA) is a search technique used in computing to find exact or approximate solutions to optimization and search problems.” That sums it up pretty well they help us find better candidate solutions to a problem that has no optimal solution. They help you search for solutions. What involves a genetic algorithm.

  1. Define a starting population.
  2. Use a method of probability to decide who breeds with who (fitness function).
  3. Breed the next generation.
  4. Mutate the next generation.
  5. Iterate trough the process a given number of times.

After reading the first chapter of the book and seeing and example of the steps that take to create a genetic algorithm is the code at the bottom is what i came up with. There is a few things at the moment i still need to clean it up quite a bit and make a more generic implementation but if someone wants to give me feedback or participate on this it will be more than welcome:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
namespace SimpleGeneticAlgorithm
{
public delegate int FitnessDelegate(object chromosomeRepresentation);
public delegate ChromosomePair SelectionDelegate();
public struct ChromosomePair
{
public Chromosome parent1;
public Chromosome parent2;
}

public class Chromosome
{
public string ChromosomeString
{
set;
get;
}

public int CalculateFitness(FitnessDelegate fitnessFunction)
{
return fitnessFunction(ChromosomeString);
}

public static int SumStringCharacter(object chromosomestring)
{
int sum = 0;
foreach (char c in (string)chromosomestring)
{
if (c == '1')
{
sum++;
}
else if (c == '0')
{
}
else
{
//tODO:AddErrorCondition
}
}
return sum;
}

public Chromosome()
{
Random r = new Random(Convert.ToInt32(DateTime.Now.Ticks % Int16.MaxValue));
this.ChromosomeString = String.Empty;
for (int i = 0; i < 8; i++)
{
this.ChromosomeString += "" + r.Next() % 2;
}
Thread.Sleep(1);
}
}

public class GenerationManager
{
public Chromosome[] CurrentGen;
public List PastGenerations = new List();
public SelectionDelegate SelectionAlgorithm;
public int CrossoverProbability = 50; //This is a percentage
public int MutationProbability = 25;
public GenerationManager()
{
CurrentGen = new Chromosome[4];
for (int i = 0; i < 4; i++)
{
CurrentGen[i] = new Chromosome();
}
}

public ChromosomePair BasicSelection()
{

ChromosomePair pair = new ChromosomePair();
int currentHighest=-1;
int secondHighest=-1;
for (int i = 0; i < 4; i++) { Random r = new Random(Convert.ToInt32(DateTime.Now.Ticks % Int16.MaxValue)); int val = (CurrentGen[i].CalculateFitness(Chromosome.SumStringCharacter) + (r.Next() % 14)); if (val >= currentHighest)
{
pair.parent2 = pair.parent1;
pair.parent1 = CurrentGen[i];
secondHighest = currentHighest;
currentHighest = val;
}
Thread.Sleep(1);
}
if (secondHighest == -1)
{
return BasicSelection();
}
return pair;
}

public ChromosomePair Crossover(ChromosomePair pair)
{
ChromosomePair par = new ChromosomePair();
Random r = new Random(Convert.ToInt32(DateTime.Now.Ticks % Int16.MaxValue));
bool doCrossover = (((r.Next() % 100) + 1) < CrossoverProbability);
if (doCrossover)
{
par.parent1 = GenerateChild(pair);
}
else
{
par.parent1 = pair.parent1;
par.parent2 = pair.parent2;
}
return par;

}

private Chromosome GenerateChild(ChromosomePair pair)
{
Byte[] parentOneArray = getByteArrayFromString(pair.parent1.ChromosomeString);
Byte[] parentTwoArray = getByteArrayFromString(pair.parent2.ChromosomeString);
Chromosome ret = new Chromosome();
for(int i =0 ; i< parentOneArray.Length; i++)
{
parentOneArray[i] = (byte)(parentOneArray[i] | parentTwoArray[i]);
}
ret.ChromosomeString = getStringFromByteArray(parentOneArray);
return ret;
}

private byte[] getByteArrayFromString(string p)
{
List ret = new List();
foreach (Char c in p)
{
if (c == '1')
{
ret.Add(1);
}
else {
ret.Add(0);
}
}
return ret.ToArray();
}
private string getStringFromByteArray(byte[] p)
{
string a = string.Empty;
foreach (byte c in p)
{
a += c;
}
return a;
}

public Chromosome Mutate(Chromosome entry)
{
Random r = new Random(Convert.ToInt32(DateTime.Now.Ticks % Int16.MaxValue));
bool doMutation = (((r.Next() % 100)) < MutationProbability); Chromosome ret = new Chromosome(); ret.ChromosomeString = entry.ChromosomeString; if (doMutation) { if (entry.ChromosomeString.IndexOf('0') >= 0)
{
byte[] tmp = getByteArrayFromString(entry.ChromosomeString);
tmp[entry.ChromosomeString.IndexOf('0')] = 1;
ret.ChromosomeString = getStringFromByteArray(tmp);
}

}
return ret;
}
}

}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SimpleGeneticAlgorithm;

namespace GeneticAlgorithmTestConsole
{
class Program
{
public static void Main(string[] args)
{
GenerationManager manager = new GenerationManager();
Console.WriteLine("First gen:");
Chromosome[] Gen = manager.CurrentGen;
foreach (Chromosome c in Gen)
{
Console.WriteLine(c.ChromosomeString +" " + c.CalculateFitness(Chromosome.SumStringCharacter));
}
Console.WriteLine("Pair Matches");
List pairs = new List();
foreach (Chromosome c in Gen)
{
ChromosomePair pair = manager.BasicSelection();
pairs.Add(pair);
Console.WriteLine(pair.parent1.ChromosomeString + " " + pair.parent2.ChromosomeString);
}
Console.WriteLine("First Generation Before mutation Childrens");
List nextgen = new List();
foreach (ChromosomePair p in pairs)
{
ChromosomePair pair = manager.Crossover(p);
if (pair.parent2== null)
{
Console.WriteLine(pair.parent1.ChromosomeString);
nextgen.Add(pair.parent1);
}
else
{
Console.WriteLine(pair.parent1.ChromosomeString + " " + pair.parent2.ChromosomeString);
nextgen.Add(pair.parent1);
nextgen.Add(pair.parent2);
}
}
if (nextgen.Count > 4)
{
nextgen.RemoveRange(3, nextgen.Count - 1 - 3);
}
//Run mutations
Console.WriteLine("First Generation After Mutation Childrens");
for(int i =0; i< nextgen.Count; i++)
{
nextgen[i] = manager.Mutate(nextgen[i]);
Console.WriteLine(nextgen[i].ChromosomeString);
}
manager.PastGenerations.Add(manager.CurrentGen);

manager.CurrentGen = nextgen.ToArray();

Console.WriteLine("How many more generations would you like to iterate");
int iterations = Convert.ToInt32(Console.ReadLine());
for (int i = 0; i < iterations; i++)
{
IterateGeneration(manager);
}
Console.ReadLine();
}

public static void IterateGeneration(GenerationManager manager)
{
Chromosome[] Gen = manager.CurrentGen;
foreach (Chromosome c in Gen)
{
Console.WriteLine(c.ChromosomeString + " " + c.CalculateFitness(Chromosome.SumStringCharacter));
}
Console.WriteLine("Pair Matches");
List pairs = new List();
foreach (Chromosome c in Gen)
{
ChromosomePair pair = manager.BasicSelection();
pairs.Add(pair);
Console.WriteLine(pair.parent1.ChromosomeString + " " + pair.parent2.ChromosomeString);
}
Console.WriteLine("First Generation Before mutation Childrens");
List nextgen = new List();
foreach (ChromosomePair p in pairs)
{
ChromosomePair pair = manager.Crossover(p);
if (pair.parent2 == null)
{
Console.WriteLine(pair.parent1.ChromosomeString);
nextgen.Add(pair.parent1);
}
else
{
Console.WriteLine(pair.parent1.ChromosomeString + " " + pair.parent2.ChromosomeString);
nextgen.Add(pair.parent1);
nextgen.Add(pair.parent2);
}
}
if (nextgen.Count > 4)
{
nextgen.RemoveRange(3, nextgen.Count - 1 - 3);
}
//Run mutations
Console.WriteLine("First Generation After Mutation Childrens");
for (int i = 0; i < nextgen.Count; i++)
{
nextgen[i] = manager.Mutate(nextgen[i]);
Console.WriteLine(nextgen[i].ChromosomeString);
}
manager.PastGenerations.Add(manager.CurrentGen);

manager.CurrentGen = nextgen.ToArray();

}
}
}

Share and Enjoy:
  • Digg
  • Facebook
  • BarraPunto
  • DotNetKicks
Leave a Comment : more...

Cleaning the Sony alpha 100 sensor

by alfredo on Sep.13, 2009, under photography

I have gotten a lot of questions on how this is done first time doing it with an actual sensor scope. Hope this helps. The steps are the following:
1.Set camera to sensor cleaning.
2.Inspect with the sensor scope.
3.Vacuum.
4.Inspect again.
5.Clean with swabs.
6.Inspect.
7.Repeat if necessary.
8.Turn off camera.
Whatch the video for an example of how is done. Please if you can provide feedback on the video it would be helpful.

Share and Enjoy:
  • Digg
  • Facebook
  • BarraPunto
  • DotNetKicks
Leave a Comment : more...

Clean Code : Review 7.0/10.0

by alfredo on Sep.12, 2009, under Programming tutorial

I read the book by Uncle Bob and went trough some of the exercises. I have to say he really knows what he wants to see when he opens a person code and he really places a lot of the lessons learned into it.

If you look trough the Content Table of the book you get a clear idea of what he promotes. I agree with a lot of the things he sys and the TDD style of development he promotes. Getting things done first then done right to me it’s the only way of actually getting with functional and decent code. But i think that some of the proposed solutions like domain specific languages that are covered for testing purposes are to involved except for a few cases. This book is a good read like i mentioned and i would classify it as an optional read if you are interested in improving your coding style. In octoberi will review Code complete has part of the review list which is the next one on my schedule. Currently i’m reading An introduction to Genetic Algorithms so my next posts might be related to that. Also in photography i’m going to make a video of how to clean your sensor. In terms of jewelcrafting i’m pretty much dead at the moment since my apt really does not help.

Alfredo

Share and Enjoy:
  • Digg
  • Facebook
  • BarraPunto
  • DotNetKicks
Leave a Comment :, more...

Review : The Pragmatic Programmer 9.0/10

by alfredo on Aug.25, 2009, under Programming tutorial

I just read this book and i think is one of the best books that i have read in terms of software process and explaining things clearly. The authors wen out of their wya to explain the methodologies they placed in practice and give concrete examples.

The table of content of the book looks like follows and i’m going to comment on it my thought of the chapter:

Table of Contents

  1. A Pragmatic Philosophy – This chapter introduces the whole book and explain what being pragmatic is all about that is a philosphy of getting things done that are realistic in the best way possible and not trying to be perfecting understanding that we will make mistakes and the way to handle our approach.
  2. A Pragmatic Approach – On this chapters i read things that i loved like the tips on the evils of duplication but somethings that they would be impossible to apply in my day to day scenarios due to my type of work like the tracer bullets chapter and the use of specific domain languages. The ideas are still interesting and very much worth reading.
  3. The Basic Tools – The tools described in this chapter are the basic essentials for developing code. The part of source control and code generators seems like incredible good pieces of advise. 
  4. Pragmatic Paranoia – This was the first chapter that i did not agree completely with what was said on the book completely the section of Design By contracts i don’t see how i could do that in my current workplace and the methodology followed not saying i sa bad idea just a bit impossible in my current situation. I would say the same thing with the Assertive Programming. This chapter has very good tips on how to go trought the life cycle of a project.
  5. Bend or Break – This is one of the best chapters in the book and i’m not going to spoil it worth reading every single page.
  6. While You Are Coding  – This chapter explains practices to follow while programming and things to take into hand lessons learned from it are to refactor anything that needs it the moment you notice the need. Also good explanation of why is a problem to program by coincidence therefore simply by stumbling until you get to your end.
  7. Before the Project  – Tackles requirements and when to actually start programming in the pragmatic way talks about iterating in order to get clearness.
  8. Pragmatic Projects -Explains that being pragmatic needs to be a team effort and not a one person effort.

Like i said at the beginning is an excellent book and i think that every programmer should have the oportunity of going trough it.

Now to read clean code by uncle bob.

Share and Enjoy:
  • Digg
  • Facebook
  • BarraPunto
  • DotNetKicks
Leave a Comment :, more...

How to do panoramic shots

by alfredo on Jun.20, 2009, under photography

Every know an then someone always asks me how do i do panoramic shots from vistas and i decided to write it down for people to be able to see. Okay first things first what to use , for optimal results we need to set our camera to the manual settings and keep them the same for all the shots that are going to be part of the pano. Second use a pretty wide lense in order to avoid taking the lesser amount possible to get the shot that you desire.

Know they are to type of panos that you can do an arch panoramic or a flat panoramic. For the first type is very easy to do since you can do it without any need for special equipment simply stand still make sure that your arms are steady and take pictures that overlap for around 10% each.

For a flat panoramic you need a special head for a tripod in order to move the camera lateral way this represents a more realistic image but not your specific point of view.

There are many applications that you can use to generate panoramic’s right now im really enjoying Microsoft ICE because it allows me to do pano’s using deepzoom in order to put them straight in my website.

http://avatare.deviantart.com/art/Pano-Hurricane-Ridge-123713592

If anyone wants more information please let me know.

Share and Enjoy:
  • Digg
  • Facebook
  • BarraPunto
  • DotNetKicks
Leave a Comment : more...

Writing games in WPF (programatically creating a grid)

by alfredo on May.31, 2009, under Programming tutorial

Hello Everyone,
I’m working with a friend of mine on a tetris clone using WCF and realized that its really fun. It takes a bit to wrap your head around the proper way of using XAML but after that it’s pretty smoth. Also the layout tools on Visual Studio 2008 are pretty wicked they pretty much read your code to generate previes as long as you have a default constructor with some default settings. I will be posting screenshot to the game once it’s done but i wanted to explain something that many people might found useful.

Programatically creating a grid the way i do it.

  • First go to the xaml and place the grid were you want it to be and set the size to it.
  • Second since you want to set columns and rows by yourself write code similar to this one for your objects:
    //MainGrid is the name i gave in the XAML to my grid.
    MainGrid.RowDefinitions.Add(new RowDefinition());//Adds a new row to the Grid
    MainGrid.ColumnDefinitions.Add(new ColumnDefinition()); // adds a new column
  • Step 3 set the objects that you wish to have in each of the places you created on the layout
    Rectangle tmp = new Rectangle(); //Creates rectangle
    tmp.Width = 20;
    tmp.Height = 20;
    tmp.Stroke = Brushes.Black;
    Grid.SetColumn(tmp , 0);
    Grid.SetRow(tmp , 0);
    MainGrid.Children.Add(tmp); //Adds rectangle to grid on position 0
  • This can be done with any type of UIElement object. I will be sure to post at least screenshots of the tetris clone when we finish it. Expect Soon a post on how to go about creating and using your own user components in WPF.

    Later.

    Share and Enjoy:
    • Digg
    • Facebook
    • BarraPunto
    • DotNetKicks
    Leave a Comment more...

    Looking for something?

    Use the form below to search the site:

    Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

    Visit our friends!

    A few highly recommended friends...