Questions tagged [uielement]

UIElement is a base class for most of the objects that have visual appearance and can process basic input as part of the user interface.

404 questions
2
votes
1 answer

Export FlowDocument with UIElement to rtf

I am trying to export a FlowDocument which contains a grid to rtf. I used the following code using (FileStream fs = new FileStream(@"C:\demo.rtf", FileMode.OpenOrCreate, FileAccess.Write)) { TextRange textRange = new TextRange(doc.ContentStart,…
2
votes
1 answer

Getting the Background of a UIElement or sender

I'm trying to find a generic way to set the Background property on a UIElement. I'm not having much luck... Here's what I have so far (trying to use reflection to get the BackgroundProperty). Action setTheBrushMethod = (UIElement x) => …
tronious
  • 1,547
  • 2
  • 28
  • 45
2
votes
1 answer

Use UIElement as Clip in WPF

Please pardon my ignorance- I'm very new to WPF. I am looking to implement a minor, visual effect in my application that gives the look of "inner" rounded corners. The window in question has a dark border that encapsulates several UIElements, one of…
egoodberry
  • 2,746
  • 2
  • 26
  • 29
2
votes
1 answer

Binding on a Non-UIElement

I am having problems with Binding. Since RelativeSource needs the visual tree to travel up and find the desired Ancestor, you are only allowed to use it on an UIElement but I am trying to do a RelativeSource binding on an Non-UIElement, such as is a…
snowy hedgehog
  • 652
  • 1
  • 7
  • 23
2
votes
3 answers

Execute method after value from UIElement changes

Is it possible to subscribe to a Property of a specific UIElement in WPF? I want to animate an UIElement as soon as the Heightvalue changes and add the new height to a list, but I don't see how I can subscribe to the…
MidSky
  • 43
  • 4
2
votes
1 answer

Resolving interface as UIElement (Unity, PRISM, C#)

when using PRISM the normal way to hookup things with unity is to define an interface and register an implementation with this interface. Now, I have a problem regarding views. The scenario is simple: Assume a custom video control which allows to…
Christian Ruppert
  • 3,749
  • 5
  • 47
  • 72
2
votes
1 answer

Strange behavior during movement of UIElement. Why?

I'm having some trouble understanding (and fixing) a bug I'm experiencing. I have the UI like in the following picture: All of those areas colored in lightblue are Canvases and they are movable. This is where I have my problem. The one from the top…
Andrei
  • 63
  • 4
2
votes
0 answers

WPF: How to achieve visual print of UIElement into multiple pages?

I have several controls in a ScrollViewer which when printed should span multiple pages both horizontally and vertically. My current solution uses a series of scrolls (both in horizontal & vertical direction) to achieve the printing. For this…
user527614
  • 465
  • 5
  • 19
2
votes
1 answer

How can I add a UIElement to a Windows Forms application?

I have a WPF custom control I'd like to add to a Windows Forms application. So I added a reference to the WPF assembly, created an ElementHost and set the Child property in code. Is there a way to do this with drag and drop i e without writing…
tom greene
  • 5,361
  • 9
  • 39
  • 52
2
votes
2 answers

How can I send an NSString to the currently focused UIElement of another application?

I have a menubar application without a dock icon or global menu, it's just a StatusItem and a Window. I've got it wired up to a hotkey which activates the window and upon deactivating the window I am able to send focus back to the previously active…
johndbritton
  • 2,652
  • 1
  • 19
  • 20
2
votes
2 answers

Generate/save bitmap from UIElement in metro app

I need to save image corresponding to a UIElement. I have tried following Generate BitmapSource from UIElement link for WPF but this is not working in Metro apps due to limited API. DirectX is a way, but there is a steep learning curve.
Tilak
  • 30,108
  • 19
  • 83
  • 131
2
votes
1 answer

Lots of bindings, really slow, are binding active even if attached UIElement not visible?

I'm developing a WPF application that heavily relies on DataBinding. Basically the app has several tabsheets each of which have ~50 elements using DataBinding to my ViewModel. Some of the binding are a bit complex with datatriggers and converters to…
ecastro
  • 39
  • 2
2
votes
1 answer

Remove focus from UIElement in silverlight

Do you know, how can I remove focus from UIElemnent programatically? The situation is: I need to remove focus from TextBox, when I pressed enter. How to handle key pressing I know. Please help me to remove focus from UIElement in Silverlight.
Evgeny Ekim
  • 241
  • 3
  • 13
2
votes
3 answers

All UIElements become inaccessible after animation completes

I am trying to implement city lights animations by having an array of CGRect's with the coordinates of each light. Then creating UIViews around these CGRects. This logic (Thanks to Darren for helping with this logic) is working fine however after…
Alex
  • 833
  • 3
  • 15
  • 28
2
votes
0 answers

How to implement both GPUImageWhiteBalanceFilter and uiElement blend more efficiently?

I'm working on an app which use GPUImage framework. I want to use GPUImageWhiteBalanceFilter to adjust whitebalance and record some watermark use uiElement blend, it works but the framerate is poor when capture 1080p video in iphone 4s. Codes as…
JonnyHan
  • 97
  • 4