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.

389 questions
20
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
  • 783
  • 2
  • 10
  • 24
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,387
  • 7
  • 46
  • 83
14
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
  • 2,921
  • 11
  • 41
  • 57
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
12
votes
2 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,342
  • 3
  • 17
  • 37
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
  • 3,701
  • 5
  • 31
  • 54
10
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
  • 47,086
  • 29
  • 143
  • 178
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,381
  • 25
  • 70
  • 85
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
  • 263
  • 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…
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,480
  • 4
  • 26
  • 44
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
  • 944
  • 1
  • 10
  • 26
8
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 Panels have children of type UIElement, not FrameworkElement (Children is of type UIElementCollection) which seems it would mean you can add…
Mark A. Donohoe
  • 23,825
  • 17
  • 116
  • 235
8
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,244
  • 16
  • 67
  • 101
8
votes
1 answer

Positioning UIElement on a Canvas

I have a canvas and a red rectangle laid on it. Rectangle has a MouseDown event handler implemented: private void RedRectangle_MouseDown(object sender, MouseButtonEventArgs e) { CreateMyBorder(); } The CreateMyBorder method is supposed to…
Boris
  • 9,363
  • 30
  • 98
  • 144
1
2 3
25 26