XAML
(1)
WPF
(1)
VisualBrush
(1)
ImageBrush
(1)
TileBrush
(1)
TileMode
(1)
MSFTNGP
(1)
UI
(1)

How do you control the Viewport on a VisualBrush or an ImageBrush in Blend

Asked By Alexandra
08-Apr-07 04:24 PM
How do you control the Viewport property on the Visual or Image Brushes?
This property is key to recreating and controlling the number of repeats
that the brush performs in order to create a new texture, pattern or
reflection effect.

I followed the following instructions by Mario Guzzi (copied below) in his
response to someone's enquiry about how to use the tile brush. The tile
effect works great in the brush resource editor ONLY. The tile effect is not
trasposed to the element in which it is illustrating. Upon reviewing the
code, I noticed that the Viewport property is missing. Is it located in
another part of the program or was it an oversight?

Alexandra

1) Create an Image Brush
-----------------------
Add an image file
Insert the image into the scene
Tools | Make Brush Resource | Make Image Brush

2) Use Tile Brush on the image brush
---------------
Insert a rectangle
Apply the image brush created before. (you can do this by using the brush
resources tab in the brushes palette)
Move to the tile brush tab in the Brushes Palette
Set Tile Mode to Tile
Select the Brush Transform Tool from the tools toolbar (press B will do it
as well)
Resize the image brush applied to the rectangle to see the different "tiles"

We don't expose all the Brush properties in our UI.

Asked By Unni Ravindranathan \(MS\)
08-Apr-07 11:33 PM
We do not expose all the Brush properties in our UI. Viewport on Tile brushes
in an example of such a property. Your only option is to set that in XAML by
hand.

Thanks,
-Unni

Hi Unni,Thanks for your reply but it also doesn't make sense.

Asked By Alexandra
11-Apr-07 06:14 AM
Hi Unni,

Thanks for your reply but it also doesn't make sense. What is the point of
creating a Tile brush if the USER (being me) isn't able to Tile the images
in my project? The only tiling actually performed is within the Tile Brush
editor - this is great but is completely irrelevant when it comes to the
interface that I am creating.

Thanks,

Alexandra

My apologies - there are a few properties that we allow you to configure like

Asked By Unni Ravindranathan \(MS\)
17-Apr-07 04:55 PM
My apologies - there are a few properties that we allow you to configure
like TileMode and Stretch. We just have not enabled all the properties of a
TileBrush in v1.

You should still be able to create and apply a TileBrush (for example,
ImageBrush or VisualBrush) in Blend. You just cannot control it with the
precision you can do in WPF.

Thanks,
-Unni
Post Question To EggHeadCafe