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

08-Apr-07 04:24:37
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"
reply
 
 

How do you control the Viewport on a VisualBrush or an ImageBrush in Blend - Unni Ravindranathan \(MS\)

08-Apr-07 11:33:08
We don't 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
reply
 

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

11-Apr-07 06:14:52
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
reply
 

How do you control the Viewport on a VisualBrush or an ImageBrush in Blend - Unni Ravindranathan \(MS\)

17-Apr-07 04:55:58
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
reply
 
visual studio & blend:Keeping files in sync
promotion
Silverlight    WPF    WCF    WWF    LINQ   
JavaScript    AJAX    ASP.NET    XAML   
C#    VB.NET    VB 6.0    GDI+    IIS    XML   
.NET Generics    Anonymous Methods    Delegate   
Visual Studio .NET    Expression Blend    Virus   
Windows Vista    Windows XP    Windows Update   
Windows 2003 Server    Windows 2008 Server   
SQL Server    Microsoft Excel    Microsoft Word   
SharePoint    BizTalk    Virtual Earth   
.NET Compact Framework    Web Service   

"Everything" RSS / ATOM Feed Parser
How to send and receive messages through message queuing in .Net
How to Read text file as database
SQL Server 2005 Paging Performance Tip
Display code of web page.
Fully Scalable Excel File Importer class for .net using Microsoft Jet driver
Generic Chart Color Manager class that can be used for any charts
Helper class to style the infragistics wingrid
Using Reflection to detemine as Assembly Info in and out.
Helper class to play with Window (Owners and position)
Resolving displayname from the culture using the XmlLanguage and LanguageSpecificStringDictionary class