Questions tagged [imagebrush]
92 questions
29
votes
2 answers
What is Uri Pack, and ":,,," in a BitmapImage?
What I add a Image.Source I have to type the following:
playIcon.Source = new BitmapImage(new Uri(@"pack://application:,,,/TempApplication2;component/Images/play.png"));
I'm moving from web development to WPF C# and I don't get why setting a Path…

KMC
- 19,548
- 58
- 164
- 253
9
votes
1 answer
WPF: How do I create a background that repeats horizontally without scaling?
I would like to create a background for my window which is an image that I want repeated horizontally. So far I've tried with the ImageBrush, but this option repeats the image horizontally and vertically. Also, I don't want it to scale when user…

federubin
- 626
- 1
- 8
- 15
7
votes
3 answers
Create imagebrush, bitmap and writeablebitmap from an url
Hey I have a windows phone 8.1 app using the silverlight API.
I am downloading this image from my blob storage.
The image is coming from a link like this: https://[service].blob.core.windows.net/[imagename].png and the image can be showned and…

JTIM
- 2,774
- 1
- 34
- 74
6
votes
1 answer
Don't scale ImageBrush while resizing, Repeat it!
I have a problem with ImageBrush:
…

Jalal
- 6,594
- 9
- 63
- 100
6
votes
3 answers
Grid Background Image using ImageBrush
I wish to use an ImageBrush in XAML to apply a background to a Grid.
I've given the brush a x:Key and want to refer to it in my grid.
Sadly, it doesn't come up with the image as a background at all.

Luke
- 22,826
- 31
- 110
- 193
4
votes
2 answers
How to Use an image as ImageBrush on a Line or Path in WPF
I have a Canvas on which I draw lines (via Lines or Paths) that indicates a road to follow for users. Is there a way to change the line so that it displays a repetitive image instead? What I'm looking for is to have a step icon (png with…

Jonthemoon
- 49
- 1
- 2
4
votes
1 answer
Create Brush by combining other brushes (gradients, etc.)
an app uses a background which is composed from a background color, a linar gradient and two radial gradient (looks better that it sounds :). Since this background is used on all pages I would like to define it once and than re-use it on all…

Andrei Herford
- 17,570
- 19
- 91
- 225
3
votes
1 answer
WPF 3D - Why does my ImageBrush not render?
I have a 3D plane which I'm trying to render with an ImageBrush as it's DiffuseMaterial.Brush. If i use a SolidColorBrush then the plane appears fine but I get nothing at all with either an ImageBrush or a VisualBrush.
Can anyone tell me why? …

EightyOne Unite
- 11,665
- 14
- 79
- 105
3
votes
0 answers
Why ImageBrush raises an error but still shows up normally?
I have a custom control with the following DependencyPorperty:
public static readonly DependencyProperty MyImageProperty = DependencyProperty.Register(
"MyImage",
typeof(ImageSource),
typeof(ImageButton), // that's my custom…

JustAMartin
- 13,165
- 18
- 99
- 183
3
votes
1 answer
Fill texture brush using image, not tile
I have a texture brush that uses a certain image to make the texture to be displayed like this:
Image image = new Bitmap("Untitled.png");
for (int i = 0; i < points.Count; i++)
{
using (TextureBrush tbr = new TextureBrush(image))
{
…

Cleaven
- 974
- 2
- 9
- 30
3
votes
0 answers
RenderTargetBitmap : Impossible to free/dispose handle
Sorry for my bad english.
I want to render a DrawingVisual to a bitmap so I can create a DiffuseMaterial. I do this:
public DiffuseMaterial GetDiffuseMaterial(string text, string font, double fontSize, Brush brush)
{
FormattedText formattedText…

steacker
- 127
- 1
- 10
3
votes
3 answers
Images taking long time to load WinRT XAML
In our WinRT app, we have provided image as a background to grid and buttons through XAML.
We observed that images taking long time to load, app showing only other text controls (like TextBlock) first, then after some duration, our images loaded.…

patel kavit
- 484
- 1
- 6
- 22
3
votes
0 answers
Looking to display a live webpage as a texture on a 3d object in WPF
I'm using http://awesomium.com/ (1.7 RC2) for the webview and http://perspective.codeplex.com/ for the 3d objects.
XAML:
…

duckflambe
- 31
- 3
2
votes
2 answers
Is ImageBrush able to work multithreaded?
I am working on WPF with images. When calling an Image control to set the imageSource it is needed to use the dispatcher if image comes from different thread instead of the GUI thread.
I just wonder if I can set an ImageBrush instead to work…

Nasenbaer
- 4,810
- 11
- 53
- 86
2
votes
1 answer
windows phone 7, favoriting a panorama item
Is there a way to program to show what the selected panorama item is on screen, and if so what the content property of it is?
I have three panorama items (1, 2, 3) and each have a single rectangle with a rectangle.fill of an image.
I want to design…

Craig
- 21
- 1