问题标签 [uielementcollection]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
1077 浏览

c# - Windows Phone 8.1 中的抽屉布局

我在我的 Windows Phone 8.1 WINRT 应用程序中 添加了一个DrawerLayout Nuget 包。https://www.nuget.org/packages/DrawerLayout/

教程: https ://code.msdn.microsoft.com/windowsapps/WindowsPhone-81-Now-its-b63049f9

所以在添加引用之后,我编写了代码。点击hunberger按钮打开抽屉/列表并再次点击它再次关闭它。它工作正常,但有时应用程序崩溃。我尝试在每个语句上使用断点,但它没有帮助。于是我得到了这个DrawerLayout的源代码(DrawerLayout.cs)。在这个cs文件中有:

但它说UIElementCollection不包含OfType的任何定义。我检查了 MSDN 文档: https ://msdn.microsoft.com/en-us/library/system.windows.controls.uielementcollection(v=vs.110).aspx

它在扩展方法中显示OfType 。如何使用这个 OfType?有替代品吗?

DrawerLayout.cs 的完整代码:

调用 InitializeDrawerLayout:

0 投票
1 回答
3566 浏览

c# - 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):

How can I select the child Button object with an ID of 87? (as a for instance)

Intellisense isn't popping up with the Linq methods when I type MyUniformGrid.Children. (after adding using System.Linq;).

0 投票
0 回答
1081 浏览

spring-mvc - 使用 JpaRepository 更新 @ElementCollection

在 spring-boot webapp 中,我在给定成员实体的情况下使用 JpaRepository 仅查找实体的 @ElementCollection 更新

成员存储库

当然 save(member) 方法可以工作,但我的目标是只保留 elementCollection 而不是携带成员实体的其他属性

0 投票
0 回答
18 浏览

wpf - 什么是违反类亲和力的例子?

UICollectionClass上的页面(来自 Microsoft WPF 库)具有以下注释:

UIElementCollection 与其自己的上下文(类)具有关联性。您必须从拥有面板的上下文中访问该集合。

什么是使用此类的不正确方式的示例,我会遇到上面提到的问题?

在此处输入图像描述

0 投票
1 回答
104 浏览

c# - WPF 中是否有 UIElementCollection.Move(oldIndex, newIndex) 的替代方法

我需要重新排序面板的子项,我可以在 UWP 中找到 Move(oldindex, newindex),但在 WPF 中找不到。有没有其他替代方法可以实现这一目标?

我知道可以通过删除和插入来完成。但在我的情况下,我有可能在同一个面板中有更多的孩子,因此它会导致在每个操作上安排覆盖。有什么解决方案。