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
0
votes
1 answer
How to copy an UIElement fast?
I need to copy an UIElement.
I searched for a solution and found this example:
string saved = XamlWriter.Save(canvas1);
StringReader sReader = new StringReader(saved);
XmlReader xReader = XmlReader.Create(sReader);
Canvas newCanvas =…

yonit
- 1
- 3
0
votes
2 answers
Acess uiviewController element from another class
there is this project im working on, but there is a problem with the element in the viewcontroller of my storyboard which i want to change its property from another class!
my first approach was instantiating an object from the viewcontroller in my…

sci3nt15t
- 93
- 1
- 8
0
votes
2 answers
How can I find an UIElement using Linq?
I am trying like this, but I get only the first level textbox. How do I query and get all the textboxes
IEnumerable textboxes =
from c in this.LayoutRoot.Children
where c.GetType() == typeof(TextBox)
select…

coder
- 4,121
- 14
- 53
- 88
0
votes
1 answer
Selecting image from StackPanel C# UWP (Adding action listener to UIElement and Image to UIElement)
I am using C# and I am creating UWP app.
I am using Windons.Ui.Xaml.Controls.Image and I have created follwoing code which lists my images
UxHelpers.DispatchToASTAThread(
async () =>
{
imageIndex++;
StackPanel stackPanel = new StackPanel();
…

user7827649
- 39
- 8
0
votes
1 answer
Which events are suppressed by IsHitTestVisible
I cannot find the answer in MSDN documentation.
All I want is a list of UIElement's events which are suppressed when IsHitTestVisible = false.
It must be here somewhere but I can't find it. It is for a UWP project but I'm guessing it will be almost…

Paulustrious
- 609
- 1
- 11
- 17
0
votes
1 answer
Silverlight Drag and drop for any UIElement?
I see a great deal of writing about Silverlight 4's support for drag and drop. However, it is all about files. I want to just make normal user controls draggable. Is this possible, or is it limited to files?

Nick Heiner
- 119,074
- 188
- 476
- 699
0
votes
1 answer
C# - Click event on multiple UIElement types collection
I'm displaying a collection of UI elements of different types (Rectangles and Images) in the canvas. Both derive from the UIElement type.
…

xa19
- 43
- 1
- 7
0
votes
1 answer
Render of UIElement Causes App To Hang For Several Seconds
I have a WPF application - using MVVM for the design pattern.
In the Main View, there is a ContentPresenter that is bound to a property in the corresponding ViewModel. I have type-referential DataTemplate for the data type associated with that…

Chris
- 2,148
- 8
- 31
- 52
0
votes
1 answer
LINQ to delete UIElement in SilverLight Children
foreach (UIElement el in GridBoard.Children.ToList())
{
if (el is Ellipse)
{
GridBoard.Children.Remove(el);
}
}
Is there any LINQ equivalent to do the above? If yes, can please provide the code? Thanks

TechTravelThink
- 3,014
- 3
- 20
- 13
0
votes
1 answer
How can I reparent a WPF UIElement?
How can I reparent an UIElement to another Window? I have set Content to null prior to closing the Window. Afterwards a new Window is started and the UIElement is set to the Content of that Window.
This gives an InvalidOperationException: "Het…

Wouter
- 2,170
- 1
- 28
- 58
0
votes
1 answer
Force a repaint of a custom drawn UIElement in a custom WPF control
I'm working on a custom WPF control. The main purpose of this control is to visualize thousands of graphical primitives in a scrollable area. The core part of the control's template looks like this:
…

TecMan
- 2,743
- 2
- 30
- 64
0
votes
1 answer
How do I bind touch manipulation to a UIElement property on Windows Phone 7?
I would like to have a property of a UIElement be modified when the user swipes vertically on the screen in Windows Phone 7. I can see how to do it using the OnManipulationDelta override but it seems like that should be a Xaml binding of some sort…

dkackman
- 15,179
- 13
- 69
- 123
0
votes
1 answer
Children of 'System.Windows.Controls.UIElementCollection' cannot be null. Object derived from UIElement expected
I got this exception and don't know what to do with it.
I'm using a TreeListView that I found on the net:
Has…

Erez
- 6,405
- 14
- 70
- 124
0
votes
1 answer
Route KeyUpEvent from UIElement to a TextBox
How do I route the KeyUpEvent event for a UIElement to a TextBox in WPF?
For example with the following objects:
If an 'A' is pressed on rectangleWPF then an 'A'…

Jannes
- 1
0
votes
1 answer
Silverlight Binding properties of a UIElement to properties of another UIElement dynamically
A list of ellipses and lines are added as Children to LayoutRoot. Lines are connecting between ellipses.
How can I bind these two elements together so that when ellipse moves lines should also move?
How can I bind the…

async
- 45
- 1
- 6