Questions tagged [imagebrush]
92 questions
1
vote
2 answers
Assign WritableBitmap to an ImageBrush.ImageSource property
I want to have an animated panorama control background in Windows Phone application.
I have an algorithm that constantly draws onto the WritableBitmap the desired image.
I have bound the Panoramas' background property to ViewModels'…

Maxim V. Pavlov
- 10,303
- 17
- 74
- 174
1
vote
0 answers
Set embedded image as button background - wpf
I have to embed the all images (all images are stored under a folder 'images' on project) within the exe of wpf application created. For that I have set the property of image as below .
Build Action : Resource
Copy to output directory : Do not…

user2431727
- 877
- 2
- 15
- 46
1
vote
1 answer
Can you render using a VisualBrush that has an offset?
I've got a 64x64 image that I'm using as the source of a VisaulBrush which I tile over the background of a control. However, based on some run-time logic, I want to change the origin of the visual brush. Not the tile size, just where the 'upper…

Mark A. Donohoe
- 28,442
- 25
- 137
- 286
1
vote
1 answer
How to set Background image's Scretch and TileMode in Code behind?
Using C#, how to set the Background image's TileMode and Stretch property?
StackPanel1.Background = new ImageBrush(new ....); // OK
StackPanel1.Background = Stretch.Uniform; //this doesn't work...

KMC
- 19,548
- 58
- 164
- 253
1
vote
0 answers
WPF Brush with Image texture
Using WPF, I have an InkCanvas which has its background set to an image. I want to draw over this image with a brush that has the texture of another image. I know it's possible to use an ImageBrush and set the source of it to an image, but my…

jackbot
- 2,931
- 3
- 27
- 35
1
vote
0 answers
C# tinting an ImageBrush
Is it somehow possible to change the hue of an imagebrush. I'm currently using an imagebrush to create a texture material in wpf 3d. To get selection and grouping effects, i need up to three materials per model. This results in quite the performance…

FS'Wæhre
- 196
- 2
- 16
1
vote
2 answers
Clipping Path on an ImageBrush in Silverlight
Is there a way to put a clipping path on an ImageBrush in Silverlight (not an Image)? I don't see it available from Intellisense, but I'm wondering if there may be a way to do this.

Todd Main
- 28,951
- 11
- 82
- 146
1
vote
1 answer
WPF image thumbnail with the offset
I have an image 800x600 and I would show a thumbnail 90x30 with some offset x=12 and y 12.
I have created a brush but I am struggling to apply an offset.
var source = new ImageBrush(groundSource);
source.Stretch = Stretch.None;
…

Ievgen
- 4,261
- 7
- 75
- 124
1
vote
2 answers
WPF Image Mapping
Is there a way to draw/fit a simple Quadrilateral cut-out from an image onto a standard axis-aligned rectangle for screen display. (So that the cut-out will be distorted to fill the rectangle points). Seems to me it should be possible with an…

Nicholas
- 1,392
- 16
- 38
1
vote
1 answer
WPF Rectangle FIll imagebrush not updating
I am developing a WPF application, a messenger client. The user should be able to change his avatar image. When he right-clicks his avatar, a open file dialog appears and there he can select the image he wants. After he has made his decision I…

tudor.gergely
- 4,800
- 1
- 16
- 22
1
vote
1 answer
Two Brushes, same Image, but one with opacity
I have two Imagebrushes, as you see they are exactly the same but one is with opacity.

GreenEyedAndy
- 1,485
- 1
- 14
- 31
1
vote
2 answers
Set ImageBrush.ImageSource to Image in Windows 8 store app
I have an Image object in my C# code and I'd like to use it as ImageSource for ImageBrush.
Is there a way to do this?
In other words, I need something like this:
Image image = new Image();
image.source = GetBitmapImage();
//execute various image…

alexbtr
- 3,292
- 2
- 13
- 25
1
vote
1 answer
WPF apply margin on ImageBrush in Ellipse?
Please take a look at my following code:
What I'm trying to do is to…

SuicideSheep
- 5,260
- 19
- 64
- 117
1
vote
0 answers
Imagebrush ResourceDictionary
I've created an Resourcedictionary where i define my ImageBrush to an jpg picture. I use this ImageBrush on my Path object to fill it. However when I build I get the error Error:
Error HRESULT E_FAIL has been returned from a call to a COM component.…

JonasN89
- 1,386
- 2
- 11
- 23
1
vote
2 answers
Free Memory after ImageBrush was set to null in WPF
In my app(music player) i have feature called "Game Mode" which stops every background operations except playing music and i wanna free some memory too.
E.g.
I have Background Image on Base Grid in my window which i set that…

Aldos
- 193
- 2
- 12