Clipping Path
Last post 05-06-2008 8:31 AM by Gamewolf. 2 replies.
Sort Posts:
05-05-2008 6:50 PM
Clipping Path

I am pretty new to Silverlight. I am wanting to have some text that is fully transparent that will show whatever is behind it. I also want a black background. When I make the text transparent, it only blends in with the black. I searched google and found that you can use the clipping path, but it didn't show any examples and I couldn't find much in the MSDN2 Library. What can I do? Here is what I have:

 <Canvas xmlns="http://schemas.microsoft.com/client/2007">
    <Canvas Width="300" Height="300" Background="Black">
        <TextBlock Canvas.Left="10" Canvas.Top="10" Text="Enter Text Here" Foreground="#ff00aaff" Opacity=".5" />
    </Canvas>
</Canvas>

 

Thanks!
 

Gamewolf

Joined on 05-05-2008
Posts 19
05-06-2008 2:25 AM
Marked as Answer
Re: Clipping Path

Hi:

  We can use Expression Blend to do this. Let's do it step by step:

1. Open Expression Blend, create new Silverlight 2 project.

2. Add a Canvas.<Canvas Width="200" Height="200"></Canvas>

3.Add a Rectangle and a TextBox in this Canvas:

<Canvas Width="200" Height="200">
 <Rectangle Height="200" Width="200" Fill="#FF0A0A0A" Stroke="#FF000000"/>
 <TextBox Height="81" Width="150" Canvas.Left="33" Canvas.Top="41" Text="TextBox" FontSize="36"/>

</Canvas>

4. Select the TextBox. Click Object->Path->Convert to Path. Convert it to Path.

5. Select both the Rectangle and the TextBox. Note select the TextBox first then select the Rectangle. Click Object->Combine->Subtract.

Regards

 

Sincerely,
Allen Chen
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.

Allen Chen – MSFT

Joined on 03-16-2007
Posts 717
05-06-2008 8:31 AM
Re: Clipping Path

Ok Thanks, but unfortunately, I cannot afford Blend. I could get the trial, but that isn't going to last long. Thanks for the info.

Gamewolf

Joined on 05-05-2008
Posts 19