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
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,986
- 34
- 110
- 147
8
votes
1 answer
WPF MouseMove InvalidateVisual OnRender update VERY SLOW
I haven't found anything useful either on Google or Stack Overflow or simply no answers (or maybe I just don't know what to search for) -- the closest question I can get to is this one: The reason behind slow performance in WPF
But I want to get to…

pm101
- 1,309
- 10
- 30
8
votes
2 answers
How to set absolute position for an UIElement in UWP?
I want to set position attribute of an UIElement to an absolute value of X and Y.
How can I do this operation?
And why absolute positioning in UWP is so hard?

n.y
- 3,343
- 3
- 35
- 54
8
votes
1 answer
How can I make Silverlight controls invisible to mouse actions?
How can I get a UIElement to ignore mouse clicks on it and pass it through to the control behind it?
I have a 50% transparent UIElement which covers another element. When I attempt to click on the background element, the mouse click is captured by…

Mark Ingram
- 71,849
- 51
- 176
- 230
7
votes
1 answer
UIElement vs FrameworkElement
I am unclear about when you would use a UIElement as opposed to a FrameworkElement, and why is there a FrameworkElement class at at all. Essentially, what is the extra functionality that a FrameworkElement provides as opposed to UIElement?

mihajlv
- 2,275
- 4
- 36
- 59
7
votes
3 answers
I want to drag an image from a Silverlight UIElement and drop it on the users Desktop or Windows Explorer
I have a Silverlight control containing an image. I want the user to be able to drag the image out of the Silverlight application and drop it anywhere they would be able to drop an image. For example, to the Desktop or to a PowerPoint slide or…

wheels53
- 719
- 1
- 7
- 21
7
votes
1 answer
WPF UIElements Inline with Text "Adornments"
In WPF how can I put regular UIElements inline with text? For example a certain classification of text would replace a span of text with a dropdown containing specific options.
I've used objects like Span, Bold, Hyperlink that do some light…

joshperry
- 41,167
- 16
- 88
- 103
7
votes
1 answer
Why is Style lost for cloned UIElement or FrameworkElement
I'm trying to load a Grid with UIElements and/or FrameworkElements that have Style and DataTriggers.
The following is a simple native XAML which works as expected; toggling the check box through the 3 states give three different styles to the…

codebender
- 469
- 1
- 6
- 23
7
votes
2 answers
Find the center of a uielement in wpf
How can I find the center of a UIElement in wpf?

np.
- 2,319
- 4
- 31
- 36
6
votes
1 answer
How to make interactable or click-able in WPF UI
This is my first day to design UI using WPF. I have looked up MSDN official document of Flow Document and found that I can place an UI control inside a RichTextBox. I did put a button in but found it's not interactable - I cannot click on it as it's…

JXITC
- 1,110
- 1
- 13
- 27
6
votes
3 answers
Saving an image of a UIElement rendered larger than it appears on screen
I have a chart that I'm displaying to the user and I want to be able to export the chart as an image to disk so they can use it outside of the application (for a presentation or something).
I've managed to get the basic idea working using…

Technicolour
- 677
- 1
- 7
- 17
6
votes
1 answer
How to check if I'm deleting (Backspace, Delete or 'Cut') a UIElement in a RichTextBox?
I have a RichTextBox that has to contain some buttons which should be deleted properly (handled) when the user is editing content in it. I am able to check if I'm deleting (Backspace, Delete or Cut) text (characters) but not the

Natalie Tay
- 133
- 12
6
votes
3 answers
How can I get IDs, names or x paths for ui elements used in a mobile app (Android/iOS) for mobile automation testing?
I want to know how can I get IDs or names of UI elements used in a mobile application that are used in mobile automation testing like appium, monkey-talk, xamarian etc.

Mohsin Awan
- 1,176
- 2
- 12
- 29
6
votes
1 answer
WPF FrameworkElement Parent and Moving a UIElement
I'm trying to move a control from one parent to another (if this will work I'm not quite sure). I can get a hold of the control that I want to move. Here is my code:
public void MoveElement(UIElement uiElement)
{
var element =…

Adam Driscoll
- 9,395
- 9
- 61
- 104
6
votes
2 answers
How to clone UIElement in WinRT XAML C#?
I have tried this approach first but getting error "Element is already the child of another element"
var objClone = new MyImageControl();
objClone = this;
((Canvas)this.Parent).Children.Add(objClone);
Then I checked this and this, but XamlWriter…

Farhan Ghumra
- 15,180
- 6
- 50
- 115