Five Magical Operations in Blend also known as Combine Operations

Combine Operations

Hello everyone! Today we are going to learn some interesting features of Blend these are called Combine Operations. Or rather called as five magical functions of blend. Some of you who already are familiar with Photoshop would know about this but blend is rather more useful tool.

First of all the Combine Operations you use in Blend generates xaml code of all your styling. You don’t have to write a specific code for xaml like you have to do while importing things from Photoshop.

How to Open your project in Blend?

  • Right Click you project under solution explorer heading.
  • Then below you will see an option “Open in Blend”. Press it and you project will be open in blend.
    Opening in Blend (Combine Operations)
  • After doing so you can see now just the designer phase will be open in front of you, and that project is open in blend.

Now what to do next  for Combine Operation?

  • Select rectangle from the menu and draw two overlapping Rectangles like shown in picture below
    rectangle selecting (Combine Operations)
  • Now select both Rectangles by pressing ctrl + click on the Rectangles while holding ctrl button select the other Rectangle also.
  • Now go to the Objects and there you can see five magical operations that we can do on the Rectangles we made. These operations are Unite, Divide, Subtract, Intersect and Exclude Overlap.
  • By clicking onto the Unite you can see that both squares are united as one
    unite sample (Combine Operations)
  • And now select direct mouse option present on top left corner of blend and pick any point you want on rectangle and stretch it in the direction you want it and draw any figure
    point streching (Combine Operations)
  • By Clicking onto the Divide button you can see that two rectangles are divided into 3 parts now the common section is also a new part
    divide sample (Combine Operations)
  • Here you can also stretch the points in any direction and draw any figure
    Divide (Combine Operations)
  • By Clicking onto the Intersect button  now only intersecting part is left and you can draw any figure by stretching points
    Intersect (Combine Operations)
    intersect sample Divide (Combine Operations)
  • It quite useful as we have shown in petal example
    roration (Combine Operations)
  • By Clicking onto the Subtract button all of the overlapping part is removed and also the part of secondary rectangle
    subtract (Combine Operations)
    subtract sample (Combine Operations)
  • And after this you can also pick any point and stretch it to draw any figure
  • Now lastly by clicking onto the Exclude Overlapping button now the overlapping part is gone and rest is left
    excudeoverlap (Combine Operations)
  • Now you can also pick any point draw whatever you want as we in this case have draw grass (some sort of not so much neat but an example to show you)
    grass (Combine Operations)

 

Download the Code Sample from here

 

By Muhammad Asad