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
1
vote
2 answers
Convert UIElement to DataTemplate
I have a DataTemplate defined in XAML. I want to customize it and give it to DataGridTemplateColumn.CellTemplate. But when I call LoadContent(), the VisualTree is still null, instead a UIElement tree is returned. After I customize the tree, how can…

NS.X.
- 2,072
- 5
- 28
- 55
1
vote
0 answers
WPF print UIElement / Scroller multipage prints same page always
I'm trying to print a scroller a UIelement, or anything multipage for that matter.
I've inherited from DocumentPaginator, and it prints, it even prints the right amount of pages.
The trouble is it keeps printing the first page, over and over.
Here…

Smithy
- 2,170
- 6
- 29
- 61
1
vote
1 answer
How can I retrieve location of an UIElement on silverlight bing maps control?
I put image on the silverlight bing map control like this :
MapLayer mapLayer = new MapLayer();
this.myMap.Children.Add(mapLayer);
Image image = new Image();
BitmapImage btm = new System.Windows.Media.Imaging.BitmapImage(new…

Ben
- 247
- 1
- 3
- 15
1
vote
2 answers
How to know if UIElement has fixed width or should stretch in measure/arrange
I have made a control (looks like a grid) that can contain multiple children (UIElements). I measure and arrange the whole layout in code. Now some of these elements have defined a width in xaml and some doesn't have that.
How do I know in the…

BvdVen
- 2,921
- 23
- 33
1
vote
0 answers
How do I use UI Automation Library to calculate load time for UIElement/FrameworkElement on button click?
My application has a button which creates a UIElement/FrameworkElement on the fly.
I want to use the UI Automation library to click on the button so the element shows up. My problem I want to calculate the time it takes for the…

eltonic
- 11
- 1
1
vote
2 answers
Setting position of a UIElement for a Windows 8 XAML app
I am trying to set the position of an Image based on a tap / click like this (note "contentGrid" is the only child of Page and fills the screen)
private void contentGrid_Tapped(object sender, TappedRoutedEventArgs e)
{
Uri uri = new…

MJR
- 81
- 2
- 5
1
vote
0 answers
Using custom lasso to select any UIElement?
We are trying to implement the same Lasso behavior of InkCanvas with Canvas to select any UIElement. We tried using (IncrementalLassoHitTester) mentioned in this
MSDN link, but it wasn't helpful because it selects strokes only.
Is there any way to…

simo
- 23,342
- 38
- 121
- 218
1
vote
1 answer
Silverlight: How to Make a ShallowCopy of a UIElement
I need to add a UIElement to two different canvases, but one UIElement can only be a child of ONE canvas, so I have to create a ShallowCopy (DeepCopy not needed) of the UIElement.
I want to use MemberwiseClone, but it's protected, I cannot use it.
I…

Peter Lee
- 12,931
- 11
- 73
- 100
1
vote
1 answer
Fire UIElement Manipulation(Delta) in code behind
I'm building a windows store app and I need to trigger the Manipulation(Delta) of an UIElement in code behind, but don't manage to do so.
The idea is that the user can pick an UIElement from the TopAppBar and drag it on the MainGrid (where there is…

Lowie Huyghe
- 275
- 3
- 16
1
vote
2 answers
What is the UIElement of the iOS's mail client?
As you can see the iOS Mail client can see some rich emails, so, it seems that it is not a TextArea, what is the Mail Client using? A UIWebView? or something custom make? Thanks.

DNB5brims
- 29,344
- 50
- 131
- 195
1
vote
0 answers
Add event to dynamically created children of UIElement like Canvas
I have a Canvas with different Elements which are created and removed dynamically at runtime inside a canvas, which itself is in a custom Usercontrol.
Now I want to add a few Touchevents, like ManipulationStarted. However, if I bind it on the…

Aernomn
- 21
- 2
1
vote
1 answer
WPF Style Trigger on Foreign UIElement
If I have 2 Buttons, A and B, is it possible to create a Style and a Trigger such that when the user hovers over Button B, it will cause Button A's Style to change? I've tried using SourceName and TargetName, and am getting compiler errors. Here's…

Andy
- 2,709
- 5
- 37
- 64
1
vote
1 answer
Is it right or wrong to have a UIElement as a property of a code behind object?
I have an object called Block, and an object called Cell. Basically, block has a collection of cells. As far as UI, a block is a Grid. The Grid's children are cells that are TextBoxes. Now, my question is whether or not it's good or bad practice, or…

BrandonS
- 2,513
- 7
- 28
- 29
1
vote
2 answers
Calling UIElement Functions from View Model
I am working on an MVVM C# Metro application that uses media components, particularly leveraging the play to capabilities.
Normally it seems that you would bind properties, however I need to make calls such as MediaElement.Play(source); and things…

Dev Dave
- 41
- 2
1
vote
1 answer
Adding UIElement to a Panel results in an InvalidOperationException "already logicial child of another element"
Ok, most of you will say "remove your element from its previous parent before adding it to the new panel". I know that, I already applied this many times in other situations, and I can't explain why it doesn't work in this particular case.
Here is…

JYL
- 8,228
- 5
- 39
- 63