brush

Modify Silverlight Resource in VisualState

I am wondering if there is an easy way to modify some kind of shared resource (i.e. a Brush) of a control between different VisualStates. For example, I would like to define a Brush to use as both the Background of a Border and the Fill of a different Rectangle. In a different VisualState I would like to change this background Brush in o...

Referring to a brush resource in a VisualState ColorAnimation

I'm trying to style the Calendar control and need the buttons to adopt the colors we already have defined as named resources. But the storyboards require colors in the ColorAnimation, and I'm not sure how to use a brush there. For example, I need to turn this <VisualState x:Name="MouseOver"> <Storyboard> <ColorAnimation Duration="00...

GDI+ winforms C#

I wanna make a paintbrush application in winforms using c# and mouse events. Can somebody help in coding it. ...

Brushed steel brush in WPF?

I am looking for ideas to create a WPF Brush with a brushed steel look, similar to the MacOSX Panther style, preferably without resorting to an ImageBrush. Is there a funky way to use a GradientBrush to create this effect? Thanks in advance! ...

c# radial gradient brush effect in GDI and winforms

Dear All, I have created a c# windows application and written 75% of the code. The program allows the user to create a flow chart, and will shade the flow chart shapes according to their status. I wanted them to become 3d buttons such as from the website Webdesign.org Rather than create a PNG for each button, I wanted to create the...

AS3 photoshop brushes

Hi, I'm searching for a way to build a photoshop like drawing tool in ActionScript 3. Especially I want to build something like the brushes in photoshop. So that you can use different PNG's as a brush. I tried it with saving a brush in photoshop as a transparent png, import it into my AS3 project and with a mouse move event, draw the p...

Apply Brush to Two Objects At Once

Hi All-- I'd like to apply a Brush (LinearGradientBrush in this case) to two or more objects (TextBlocks) at once. The effect that I'd like is something like this: Edit I cannot simply apply the same brush to both objects, as this will make both of them start red and go to blue (instead of the second one starting at a shade of purpl...

C# How to store Brush/Pen information in a database table

I need to store Brush/Pen information about several shapes in a database table, one row for each layer I draw. I was thinking of two schemes: BRUSH_INFO PEN_INFO SolidBrush(Color.Red) Pen(Color.Black) pros: only two colums cons: eval'd column BRUSH_INFO PARAM_B1 PARAM_B2 ... PEN_INFO PARAM_P1 PARAM_P2...

Can a brush draw outside of an wpf element?

Hello, is there any possibility to draw outside of an wpf element with a brush, E.g. <Polyline StrokeThickness="10" Points="100,100 200,100 200,0"> <Polyline.Stroke> <VisualBrush > <VisualBrush.Visual> <Rectangle Stroke="Red" Height="500" Width="500"></Recta...

Is there a graphical overview of the HatchStyle enumeration?

A hatch pattern is made from two colors: one defined by the BackgroundColor, which fills the background and one for the lines that form the pattern over the background defined by the ForegroundColor property. The HatchStyle property defines what type of pattern the brush has and can be any value from the HatchStyle enumeration. There are...

WPF BoolToBrushConverter with 4 values and 4 Brushes to return?

I bind a TextBox`s Brush Property to an IsValid Dependency Property in a UserControl with a BoolToBrushConverter. My IsValid would need 4 states because I need 4 different brushes to return from the converter. Is there another way using strings? instead of bool, could that work? ...

Reference to another Brush from one Brush in xaml

Is it possible to directly reference to a Brush value from another Brush in my resource dictionary, without using a Color definition (or to be exact, copy one brush resource into another)? For example, I have a Brush definition: <SolidColorBrush x:Key="PanelBackgroundBrush" Color="White"/> And I have a couple of other brushes I'd lik...

rendering a photoshop style brush in openGL

I have lines that are programmatically defined by my program. what I want to do is render a brush stroke along them. the way I think the type of brush I want works is, it simply has a texture, mostly transparent, and what you do is, render this texture centered on EVERY PIXEL in the path, and they blend together to create the stroke. ...

Can I access a named fill gradient in a WPF Datatemplate?

I have a DataTemplate with a number of layered text and graphic objects. One of them is a glow effect that comes from the RadialGradientBrush Fill property of a Rectangle. At first, I named the Rectangle and bound to the Fill property and changed it using a DataTrigger. This worked fine, but I have a number of RadialGradientBrush objects...