Perhaps I'm having a Post-Ballmer-Peak Moment.
I'm hoping that someone can help point out the obvious to me.
Why does this code generate a context menu on right click:
<Canvas Background="Transparent">
<Canvas.ContextMenu>
<ContextMenu>
<TextBlock>WTF?</TextBlock>
</ContextMenu>
</Canvas.ContextMenu>
</Canvas>
And ...
I am writing a brush in XAML that I can use to paint the background of a Grid to create a banner. It looks like this:
I want the brush to "stretch" with the Grid when the Window resizes, but I do not want the center angles to deform.
I only need to be able to draw the shapes in the background of a Grid. How can I avoid the deformat...
I'm new in Silverlight, and I'm looking for something like a drawing brush on Silverlight without success. I saw Tamir Khason blog on building a drawing brush in Silverlight and i download the code without any success
i'm taking about the next link:
http://www.codeproject.com/KB/silverlight/Silverlight-DrawingBrush.aspx
Can someone fin...
I have the following styles in WPF to draw and color a box, which is a custom control with various PART_Name items defined in a ResourceDictionary:
<ResourceDictionary>
.
.
.
<Brush x:Key="BoxStroke">#FFD69436</Brush>
<LinearGradientBrush x:Key="BoxBrush" StartPoint="0,0" EndPoint="0,1">
<LinearGradientBrush.GradientStops>
...
Is it possible to use multiple brushes within a single GeometryDrawing? I have several geometries that I want to draw with different brushes, and it's rather verbose to have to declare an individual GeometryDrawing for each. I'm looking for a more concise way to express the following:
<DrawingImage x:Key="SomeDrawingImage">
<Drawing...
I have a VB6 application (please don't laugh) which does a lot of drawing via BitBlt and the standard VB6 drawing functions. I am running up against performance issues (yes, I do the regular tricks like drawing to memory). So, I decided to investigate other ways of drawing, and have come upon OpenGL.
I've been doing some experimenting...
IN WPF,I can set the background of a stack panel using the below code
stackPanelFlasher .Background =Brushes.Aqua
How can i set the color as a hex color code (ex :#C7DFFC) ?
...
Hi,
I use an ImageBrush to fill an Ellipse.
<ImageBrush Stretch="Uniform" ImageSource="{Binding Image}" />
Since I use uniform stretching my image doesn't fill the whole area of the ellipse and the empty space is transparent. I couldn't find a way to fill it with some other color. Any ideas how to achieve that?
...
I have a brush that colors the background of a header. I like the way the brush looks but would like it to fade to transparent in the bottom third. Any ideas how to do this?
<LinearGradientBrush
x:Key="HeaderBackgroundBrush"
EndPoint=".5,1"
StartPoint="1,0">
<GradientStop Color="#006699" Offset="1"/>
<GradientStop Color="#8...
Is there a list somewhere of all the common states for each control? We're restyling them and it would be nice to not have to hunt through each control to figure this out.
Basically a list like:
Button: Disabled, Hover, Pressed, Selected, Focus, etc.
ListBox: Disabled, Hover, Focus, etc
I'm looking in Blend and MSDN but not finding a...
Is it possible with an animation to change the Ellipse.Fill from a LinearGradientBrush to a SolidColorBrush or change the gradientStops within the LinearGradientBrush?
...