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.
Questions tagged [uielement]
404 questions
29
votes
4 answers
Why are radio buttons called 'radio' buttons?
I was thinking about my first contact with html language and I remembered when I was looking for that specific button with the dot. It gives you some choices and you can select only one of them. I found out that it was called a radio button. I had…

ApollonDigital
- 913
- 3
- 15
- 24
15
votes
2 answers
UIElement vs FrameworkElement in WPF/Silverlight
When do I derive from UIElement and FrameworkElement considering FrameworkElement inherits UIElement. Can anyone give real life examples?

Greens
- 3,061
- 11
- 43
- 61
14
votes
2 answers
WPF ListBox - Getting UIElement instead of of SelectedItem
I created a ListBox that has a DataTemplate as Itemtemplate. However, is there an easy way to access the generated UIElement instead of the SelectedItem in codebehind?
When I access SelectedItem, I just get the selected object from my
ItemsSource…

Joachim Kerschbaumer
- 9,695
- 7
- 49
- 84
13
votes
2 answers
Getting the top left coordinates of a WPF UIElement
I am working on extending the Microsoft resize Adorner example and need to be able to reposition the element after say the bottom left drag handle has been dragged.
So if I have a textbox of say 150 wide, 35 high postitioned on my form, and the…

user547708
- 131
- 1
- 2
- 5
13
votes
3 answers
WPF - Determining if Mouse Is Over a UIElement
I have some xaml markup that looks essentially like this:
I want to determine if the mouse is over Canvas B.
When I click while my mouse is over Canvas B, Mouse.DirectlyOver returns Canvas A…

Brent Lamborn
- 1,370
- 3
- 17
- 37
11
votes
7 answers
Is there any unique identifier for wpf UIElement?
For logging user actions in my WPF forms, I added some global event handlers
I want to log exactly which control fire the event, is there some unique identifier for a wpf UIElement like ClientId in ASP.Net?

Arsen Mkrtchyan
- 49,896
- 32
- 148
- 184
11
votes
1 answer
Find position of Button/UIElement on screen relative to grid Windows Phone
I can't find a way to get the position in (x,y) co-ordinates of an on-screen control like a button relative to the grid that it is inside. Is there a way to do this that I am overlooking?

James Mundy
- 4,180
- 6
- 35
- 58
10
votes
1 answer
How can you get the parent of a UIElement?
Ok, I know that FrameworkElement, which is a direct subclass of UIElement, has a Parent property, but Panel objects have children of type UIElement, not FrameworkElement (The Children property is of type UIElementCollection) which seems it would…

Mark A. Donohoe
- 28,442
- 25
- 137
- 286
10
votes
2 answers
WPF - Get size of UIElement in Memory?
Is there a way to get the size of a UIElement that resides in memory and has not yet been rendered?
I currently have a routine that creates a Grid from a DataTable and then adds the Grid into a FixedDocument. I need to know the size of the Grid…

Sonny Boy
- 7,848
- 18
- 76
- 104
10
votes
4 answers
Silverlight 4 - Render UIElement as an Image
I have a UIElement that I want to capture a snapshot of when a user clicks a button. When a user clicks the button, I want to take the UIElement and load it's current state into an Image element. How do I render a UIElement as an Image?

user208662
- 10,869
- 26
- 73
- 86
9
votes
1 answer
ckeditor dynamically add uiElement
I want to dynamically add UIElements to a dialog depending on the value of another uiElement..I believe what i need is defined here : http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.definition.contentObject.html#add. unfortunately,…

oggiemc
- 273
- 2
- 4
- 12
9
votes
1 answer
UIElement to image file (WP7)
I have a StackPanel which includes a few Rectangles that I want put to an image file (e.g. PNG). I'm developing this on Windows Phone 7 and most of the information I found on the internet wasn't applicable (I think) to WP7.
I think the…

judehall
- 884
- 12
- 27
9
votes
2 answers
About box with Application is agent (UIElement) set to YES?
Im trying to create a application that should only be visible in the status bar, and not have a window until you press the NSStatusItem menu options. So i have one that should open "about"
[[NSApplication sharedApplication]…

Erik
- 5,791
- 5
- 30
- 45
9
votes
1 answer
"A value of type FixedToolBar cannot be added to a collection or dictionary of type 'UIElementCollection'" but FixedToolBar is a subclass of UIElement
We have a custom control called FixedToolBar defined in a class library which is referenced by a second assembly which uses it via XAML. However, VS2015 is showing the error:
A value of type FixedToolBar cannot be added to a collection or…

Mark A. Donohoe
- 28,442
- 25
- 137
- 286
9
votes
1 answer
Absolute coordinates of UIElement in WinRT
Cannot find a way to locate absolute position of an UIElement in Metro style app. Anybody know the solution?
(the context: I want a Popup to be shown next to the button called it)

snuk182
- 1,022
- 1
- 12
- 28