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.

404 questions
0
votes
1 answer

Can the WPF Storyboard applied to a UIElement be disovered from the UIElement (in code)?

Is there a way to interrogate a UIElement to determine which Storyboards are affecting it? For example, Storyboard resources can be defined in a number of places (eg Application.Resources, Window.Resources, Control.Resources). If you have a…
Zodman
  • 3,178
  • 2
  • 32
  • 38
0
votes
1 answer

WPF: ICollectionView.Refresh() refreshing only when UIElement loses focus, instead of Text and Value Change

I have an ICollectionView, called RepozitorijumWrapper which should display my entities based on six fields. The fields are two TextBox and four DateTimePicker elements. Basically, every time any of those elements change (even by a number/letter) I…
NLuburić
  • 912
  • 1
  • 10
  • 28
0
votes
2 answers

Use UIElements as ItemsSource of ListBox in Silverlight

I've noticed that if you have anything deriving from UIElement as items in a ListBox in Silverlight it renders the object as is and isn't paying any attention to settings of DisplayMemberPath and/or ListBox.ItemTemplate. For example if you have XAML…
Alan Mendelevich
  • 3,591
  • 4
  • 32
  • 50
0
votes
3 answers

How do I get the UIElement that triggered a MouseDoubleClick Event?

I'm working on a simple IM program as a personal project, and I've hit a bit of a snag. It's really more of a cosmetic thing, but I'm having some trouble with it. I've got a sidebar that lists all of a user's contents in the main window, and I'd…
Sean Cogan
  • 2,516
  • 2
  • 27
  • 42
0
votes
1 answer

Override event in UIElement initialization statement

I created a SecondaryWindow dynamically that has a WindowStyle set to None. Hence, I want to set its content to DragMove-able by overriding its OnMouseLeftButtonDown. I could not figure out how to include the override function within the…
KMC
  • 19,548
  • 58
  • 164
  • 253
0
votes
1 answer

Add Parent to UIElement in C#

Is it possible to add a parent to the UIElement in C#? I know it's possible to do it with children like this: (AssociatedObject as Grid).Children.Add(imageObject); I can't find any way to set the parent of a UIElement, and can't find very much on…
Jason
  • 259
  • 2
  • 12
0
votes
1 answer

Positioning UIElement in Custom Control

I am developing a Custom Control, where there is a TextBox and a Button placed inside the Grid. The thing is when I set a Custom Property for the UserControl Say - Left : the Button should be displayed before the TextBox, and for Right the Button…
Arun Selva Kumar
  • 2,593
  • 3
  • 19
  • 30
0
votes
1 answer

Navigation Based app : refreshing UIElements when controller is no more the current controller

My app use a custom navigation controller. When I push UIVIewController up on the navigation stack I have to load data over the network. I use : dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^(void) { }); to load…
user2252092
  • 61
  • 1
  • 9
0
votes
1 answer

ControlTemplate for adding UIElements to original control

I want to add an exclamation mark Image to the left of the built-in TextBox and make it visible whenever the TextBox Validation.HasError attached property is true, otherwise hide it. How can I use ControlTemplate to add the Image without having…
Jake
  • 11,273
  • 21
  • 90
  • 147
0
votes
1 answer

Blocks to UIElement conversion

Is it possible to convert a System.Windows.Documents.Block to System.Windows.UIElement? I need this as I want to add the blocks I created to a fixed document. Is there any other way?
Kaja
  • 97
  • 1
  • 2
  • 9
0
votes
1 answer

WinRT Grid, Remove UIElement placed with Grid.SetRow(element, rowIndex)

Like the title says. I have a grid into which i place several elements via the Grid.SetRow() method: Grid.SetRow(myElement, 0); Later on I want to remove these items but I have no idea how. Just dropping the reference to the ui element doesnt…
Ostkontentitan
  • 6,930
  • 5
  • 53
  • 71
0
votes
2 answers

Creating thumbnails of a grid/WrapPanel or other UIElement in WPF

I have a Grid with some Images. I want to make another Grid that will be copy of this Grid, 'only smaller'. I want every Image I will add to the first Grid will add also to the other Grid. If someone can help me.
uuuu
  • 1
0
votes
1 answer

What is the best lightweight container to group UIElements?

I am self-training myself in WPF. I am using a Canvas to have two polygons grouped together: var grp = new Canvas(); var polygon = new new Polygon(); polygon.Points.Add(new Point(-15, -20)); polygon.Points.Add(new Point(0,…
Larry
  • 17,605
  • 9
  • 77
  • 106
0
votes
1 answer

How to add a list of UIelement in Windows Phone

I want to create a page with dynamic control in windows phone. While doing this I also want to show a progress bar Below is my code protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { base.OnNavigatedTo(e); …
Koushik
  • 345
  • 1
  • 7
0
votes
1 answer

Deriving UIElement - how to receive focus

I created a class based on UIElement and my intention is to render it myself overriding OnRender. Rendering works fine. Next I want to implement focus management and continue with other aspects of LIFE, but overriding GotFocus and calling Me.Focus()…