Represents an ordered collection of UIElement objects.
Questions tagged [uielementcollection]
15 questions
8
votes
1 answer
How to select a child from an UIElementCollection where a property = some value?
I have a UniformGrid with a number of Button's as Children. Each Button has a Tag with an ID, e.g. (dumbed down code):
MyUniformGrid.Children.Add(new Button {
Margin = new Thickness(5),
Tag = Query.GetUInt32("id"),
Width =…

Danny Beckett
- 20,529
- 24
- 107
- 134
6
votes
1 answer
Given UIElementCollection, find all elements that have StyleA, and change them to StyleB in WPF
I've got a MyGrid.Children UIElementCollection, I would like to find all the Rectangles in it that have there styles set to StyleA, and set them to StyleB.
I'd like to use LINQ if possible, so I can avoid a nasty nested loop.
Something like this…

Kage
- 563
- 2
- 10
- 20
5
votes
2 answers
XamlWriter.Save() is not serializing DependencyProperties
Consider the following XAML from my UserControl:
And the associated event handler:
private void TextBlock_OnLoaded(object sender, RoutedEventArgs e)
{
var xaml =…

bugged87
- 3,026
- 2
- 26
- 42
3
votes
0 answers
Update of @ElementCollection using JpaRepository
In a spring-boot webapp, i look for the update of only the @ElementCollection of an entity using JpaRepository
given the member entity
public class Member implements Serializable {
private static final long serialVersionUID = 1L;
...
…

alveomaster
- 1,681
- 2
- 12
- 21
3
votes
1 answer
Rapidly removing (and adding) many items to a Canvas in WPF
At a certain point in my WPF application, the UI thread will lock up for ~0 till ~500 ms (depending on the amount) once I remove and/or add items to a Canvas. Several performance tests pointed to Canvas.Children.Remove for the main cause, and .Add…

Tgys
- 612
- 1
- 11
- 21
3
votes
2 answers
ElementCollection: failed to lazily initialize a collection, no session or
I have a field with a set of String to save and edit the value of selectManyCheckbox. I use the annotation @ElementCollection as described in
http://docs.oracle.com/javaee/6/tutorial/doc/bnbqa.html
I can save at the first time but by saving at the…

tcnguyen
- 101
- 1
- 7
2
votes
1 answer
How delete data from CollectionTable | Hibernate (Jpa)
i have "A" entity with List MyList:
@Entity(name = "A_table")
@Inheritance(strategy=InheritanceType.JOINED)
public class A implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy =…

user3515151
- 97
- 2
- 10
1
vote
1 answer
Silveright UIElementCollection change notifications?
I am deriving a class from the Silverlight Panel class so that I can perform some custom positioning of the child elements of the panel. How do you find out when the collection of child items has been changed? The Panel.Children collection does not…

Phil Wright
- 22,580
- 14
- 83
- 137
1
vote
2 answers
How to change origin of elements based on another elements in ios
Sorry guys one simple doubt but i could not find any answer. My problem is i want to change the origin of element based on another elements. To be more correct for example if i have three labels, i set each labels in same x axis but different y axis…

IamDev
- 299
- 4
- 17
0
votes
1 answer
Silverlight databinding to locate UIElements
Is it possible to locate UIElement(s) on the visual tree in silverlight by inspecting the databinding somehow for a business object being bound. What I want to do is locate elements using a lambda expression (or any other means) from the element…

almog.ori
- 7,839
- 1
- 35
- 49
0
votes
0 answers
What is an example of violating class affinity?
The page on UICollectionClass (from the Microsoft WPF libraries) has the following note:
A UIElementCollection has affinity to its own context (class). You
must access the collection from the context of the owning Panel.
What is an example of an…

Sabuncu
- 5,095
- 5
- 55
- 89
0
votes
0 answers
DrawerLayout in Windows Phone 8.1
I added a DrawerLayout Nuget package to my Windows Phone 8.1 WINRT App.
https://www.nuget.org/packages/DrawerLayout/
Tutorial:
https://code.msdn.microsoft.com/windowsapps/WindowsPhone-81-Now-its-b63049f9
So after the reference is added, I wrote…

Atif Shabeer
- 553
- 6
- 18
0
votes
1 answer
How can I have an access to a TextBox in a UiElementCollection?
My question seems to be simple and I hope it is.
I have a dynamic collection of TextBox in a UiElementCollection.
The TextBox are children of a StackPanel.
My goal is simple :
Create a new TextBox with the Text of for example…

C0ZEN
- 894
- 11
- 41
0
votes
1 answer
children of object
I have a function that is supposed to return a UIElementCollection. The function takes in a UIElement that has the children property (i.e. stackpanel, grid, etc.) but does not know which UIElement it is, so I store it into a general object.
public…

David
- 77
- 2
- 7
-1
votes
1 answer
Is there any alternative to UIElementCollection.Move(oldIndex, newIndex) in WPF
I need to re order the children of the panel, I could find Move(oldindex, newindex) in UWP, but not in WPF. Is there any other alternative way to achieve this?
I know it can be done by removing and inserting. But in my case, I have the possibility…

yogapriya shanmugam
- 99
- 7