This how-to will show you a few simple steps to making a clipping path in Blend 4. Below is a mockup of my basic canvas (this is a PNG imported into Blend). I want to make the green area visible and I want to clip the while rectangles out of the image. Eventually, I will place some animated elements where the white rectangles are.
The first thing you want to do is to draw rectangles where you want the image to be visible.
Now that I have all of my purple rectangles drawn out I am ready to convert them to a clipping path.
Remember, the rectangles are the areas that will be visible on the clipped object.
Choose the direct select tool: and select all of your rectangles. Hold down the CTRL key and you can multi-select. You can also select the rectangles from the Objects and Timeline window.
Choose Object | Path | Convert to Path from the Blend menu. This converts all your rectangles to a path which we will in turn convert to a clipping path.
Next, go back to Object | Path on the menu and choose Make Compound Path. This will make one complex path from your individual paths.
Now that you have one compound path select the Path object from the Objects and Timelines window. Now you can go back to Object | Path and you have the option to Make Clipping Path.
Now you choose the object to clip and you will now have a clipped object (an image in my case).
Here is the end result in the Blend designer:
And here is the nice clean XAML you generated (please note, for space constraints I truncated the path data in the Clip property):
<Grid x:Name="LayoutRoot" >
<Image Margin="0" Source="Images/game-mockup.png" Stretch="Fill"
Clip="M0.5,0.5 L799.5,0.5 L799.5,202.5 L0.5,202.5 z M0.5,203.5 ... z">
This is a function I wrote to receive a transfer order. The code will receive into the default receiving location as defined when the transfer order was placed. I found other code snippets for creating a transfer order but none to receive.
static void receiveTransferOrderToDefaultLocation(str 20 transferId)
itpt.ParmId = RunBaseMultiParm::getSysParmId();
itpt.TransferId = transferId;
itpt.UpdateType = InventTransferUpdateType::Receive;
itpt.PrintTransferReceipt = NoYes::No;
itpt.ReceiveUpdateQty = InventTransferReceiveUpdateQty::All;
itpt.EditLines = NoYes::Yes;
itpt.ExplodeLines = NoYes::Yes;
itpt.InventDimFixedReceiveList = 245; // See note below on how to compute this.
itur = InventTransferUpdReceive::newParmBuffer(itpt);
This is really easy, hopefully this helps some newbies.
I have a button with the text Add User in the ‘Content’ property. XAML is cool because you can make the content anything you want, including other controls or groups of controls.
I start by changing my XAML to break out the content property:
1) Remove the Content="Add User" from the Button tag.
2) Break out the content property like this:
3) Add a stack panel inside the Content property and add an image control and a textblock control:
<Image Height="16" />
4) Now you need to add an image resource to your Silverlight application.
5) Reference the new image in the Source attribute of your Image control inside the Content property of your Button control and you now have an image and text inside your button.
<Image Height="16" Source="Images/user_add.png" />
<TextBlock Margin="5,0,0,0">Add User</TextBlock>
That’s all there is to it. You can add pretty much anything inside the Content property.