Questions tagged [visualbrush]
84 questions
1
vote
1 answer
WPF - Error inserting VisualBrush into a Style?
I need to keep all my paths in a canvas so I can retrieve them easily. I found out that it works with VisualBrush. When I try to retrieve the VisuahBrush and put in into Styles, it has error:
Object of the type System.Windows.Media.VisualBrush…

Lily S
- 245
- 1
- 8
- 18
1
vote
0 answers
Preview of TabItem not showing correctly when TabItem is not visible
I have a TabControl and I want a preview window just like the taskbar in Windows 7.
When I hoover the mouse over tabItem1, I get the result that I want. When I select the 2nd or 3rd tab (the content of tabItem1 now not visible) and then hoover over…

ffonz
- 1,304
- 1
- 11
- 29
1
vote
2 answers
Visual brush using control which isn't rendered?
I'm playing around with an idea at the moment and I've hit a brick wall. I'm using a console app to create a visual control (DevExpress chartcontrol to be precise) in memory, I'm then trying to save that control to an image using a VisualBrush but…

Faraday
- 2,904
- 3
- 23
- 46
0
votes
2 answers
RenderTargetBitmap does not respect ColumnDefinitions width
I need to create snapshot of Grid with some hidden columns (by setting it's ColumnDefinition.Width = 0).
On screen it looks fine, but the created image has all columns visible (does not respect the ColumnDefinitions). I red somewhere that it is…

karel
- 1,297
- 1
- 10
- 22
0
votes
1 answer
Why does WPF Loaded event not trigger?
In WPF, I have a DataGrid, and the DataGrid has an attached property (LoadingProperty). When LoadingProperty value is True, I set the DataGrid background with VisualBrush, why does the LoadingCircle UserControl Loaded event not Trigger?
DataGrid…

knab
- 21
- 3
0
votes
1 answer
Clone element to display as an image/bitmap
I'm trying to create a snapshot/image/bitmap of an element that I can display as content in another control.
It seems the suggested way to do this is with a VisualBrush, but I can't seem to get it to create a snapshot of the current value and keep…

wforl
- 91
- 9
0
votes
1 answer
Use a VisualBrush in VisualState but freezable cannot be frozen
I want to use a VisualBrush representing a hatching in a VisualState to change the Fill property of a polygon from a dependency property of type boolean in my user control. Is it possible to do that ?
The change callback of this dependency property…

profou
- 197
- 1
- 17
0
votes
0 answers
Pdfsharp lost visual brush in background of label
My WPF app has a label, the background is visual brush, the brush contains a text"-" ; I use pdfsharp to convert fixeddocument to pdf, but strange things happen, some texts are lost, some are at wrong positions; in my WPF app every label has "-" at…

wwsinsh
- 30
- 3
0
votes
1 answer
Count the number of displayed VisualBrush visuals
I am working on a CAD program in WPF and I'm looking for a way to count the number of controls displayed when a particular brush is rendered.
So say I have an Ellipse:

Ross Graeber
- 179
- 2
- 10
0
votes
1 answer
WPF Visualbrush does not update if the page is not displayed in the frame
Friends!
There is a main window, it contains a frame with which I switch between pages.
I have a page that has a canvas. Canvas in the background stream receives data in the form of images in a mosaic view.
foreach (var item in…

Maxim_A
- 183
- 2
- 13
0
votes
1 answer
Visualbrush binding in a style System.Windows.Data Error: 2
I just have a simple binding, it works well but there is an error popup.
The effects work but still an error.
And the error is
System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element.…

Will Zhang
- 3
- 1
0
votes
1 answer
XAML: Access OpacityMask VisualBrush path inside a button control
I'm a newby in designing WPF frontends, please bear with me. Currently I am creating a style for my XAML apps and need assistance at one point.
I have 3 XAML files: 1 for my brush painting paths, 1 for my styles/colores and the mainWindow.xaml.…

AtzeBK
- 1
- 4
0
votes
1 answer
Access user control property in App.xaml style WPF
I'm trying to set the "Stroke" property of Path in my visual brush (Defined in App.xaml) via the property from my model. I'm using this style in my another control template in a usercontrol.
Style in User control resources:

Tushar Gupta
- 23
- 3
0
votes
1 answer
Create VisualBrush by code behind
I have this example as XAML:

John Goodman
- 59
- 1
- 8
0
votes
1 answer
WPF create thumbnail by VisualBrush
I have a user control for display thumbnail of a window
UserControl XAML :