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
4
votes
4 answers
Enumerate ItemsControl.Items as UIElements
I have a list of hyperlinks that are displayed through an ItemsControl, something like this:

Johan Leino
- 3,473
- 1
- 26
- 27
4
votes
1 answer
How do I make a custom UIElement-derived class that contains (and displays) other UIElements as children?
Let's say I want to make a class that inherits directly from UIElement and is able to contain one or more [externally added] UIElements as children - like Panels and other container controls. It's obviously easy to have the class house a collection…

d7samurai
- 3,086
- 2
- 30
- 43
4
votes
1 answer
In WPF, how can I get the RowDefinition object from the UIElement that belongs to it?
Take the following window layout for example:
There is a Grid element defined. It has 3 rows. Each row has one Button element. How do I get the RowDefinition object of the Button it belongs to? Thanks.
NOTE: By calling Grid.GetRow(Button element),…

Boris
- 9,986
- 34
- 110
- 147
4
votes
2 answers
OS X: Show interface of application agent (UIElement)
How do I make the interface for an application that has 'Application is agent (UIElement)' set to yes reappear?
The interface shows up the first time I start the app, but if I close the window, and the click on the app's icon then nothing happens. I…

Jan Aagaard
- 10,940
- 8
- 45
- 80
4
votes
1 answer
Get height and width of UIElement?
I currently create a class which inherits from a Popup.
Finally it will be used to show the user a popup with validation rules when editing e.g a TextBox.
Therefore I created ValidationPopup with this constructor so far:
public…

TorbenJ
- 4,462
- 11
- 47
- 84
3
votes
4 answers
Canvas Click events in Silverlight when not over a UIElement
I have a canvas object and I am sprinkling fantastic controls all over it. I'm using a ScaleTransform object to scale the canvas so I can zoom in/out.
I have wired up the controls so that I can drag them around, and the drag and drop works well by…

Dan Wolchonok
- 1,930
- 1
- 21
- 21
3
votes
3 answers
In WPF, after DoubleAnimation UIElement property cannot be changed?
OK, I'm making a GUI for my MP3 player using WPF and I have a border that enlarges its width property for every second of the played track, thus making a "Progress Bar" for the currently played song. I named the border ProgressBarBorder. After the…
Boris
3
votes
1 answer
Operator = is not defined for types UIElement and UIElement ..?
I translate from C# some code into VB.NET, (WPF, .NET 4)
C#
// Update the Z-Index of every UIElement in the Canvas.
foreach( UIElement childElement in base.Children )
{
if( childElement == element )
Canvas.SetZIndex( element,…

serhio
- 28,010
- 62
- 221
- 374
3
votes
1 answer
WindowsPhone7: How to animate position of UIElement with code?
It seems like it should be so simple. I've read dozens of links and I can't get anything to animate the position. I believe the closest code I can write so far is this:
Storyboard storyboard = new Storyboard();
TranslateTransform trans = new…

Typewriter
- 1,216
- 1
- 11
- 18
3
votes
2 answers
Generate BitmapSource from UIElement
I am attempting to generate a BitmapFrame that is based on a UIElement. Here is my function:
private BitmapFrame RenderToBitmap2()
{
RenderTargetBitmap renderBitmap = new RenderTargetBitmap(200, 200, 96, 96, PixelFormats.Pbgra32);
…

Joel
- 357
- 3
- 15
3
votes
3 answers
CKEditor how do I get a UIElement
I need to have two select menus in a CKEditor dialog, with the second select menu changing its options according to the selected option of the first menu. Simple enough you would think! But in CKEditor it seems really difficult to obtain the DOM…

Globalz
- 4,474
- 6
- 34
- 43
3
votes
2 answers
WPF Toggle visibility of UIElements in DataTemplate
I have a DataTemplate defined as follows

Praetorian
- 106,671
- 19
- 240
- 328
3
votes
2 answers
Getting Image from UIElement is cropped to displayed size
I am taking an image of a wpf control using this code:
BitmapEncoder imgEncoder = new PngBitmapEncoder();
RenderTargetBitmap bmpSource = new RenderTargetBitmap((int)element.ActualWidth, (int)element.ActualHeight, 150, 150,…

Jon
- 4,295
- 6
- 47
- 56
3
votes
3 answers
How can I make UIElement support binding?
DependencyProperties on UIElements do not support databinding (you get something like:
"Cannot find governing
FrameworkElement..")
. If you try, you get an error because WPF can not resolve the DataContext. From what I know, you get binding…

Marius
- 9,208
- 8
- 50
- 73
3
votes
1 answer
How do I list UIElements in ListView items?
I'm trying to access UIElements in the VisualTree of a ListView but the ItemsCollection is empty even though the ListView IsLoaded, IsInitialized and has items in DataContext.
How can I access UIElements in a ListView? Is there an event I can…

tripleb
- 75
- 5