Silverlight Windows Embedded的多列列表 [英] Multi column list for Silverlight Windows Embedded
问题描述
您好
我需要SWE的多列列表。通过创建从Panel派生的WrapPanel自定义控件并将代码添加到ArrangeOverride和MeasureOverride覆盖,我在托管代码中很容易实现了这一点。
I require a multi column list for SWE. I achieved this quite easily in managed code by creating a WrapPanel custom control derived from Panel and adding code to the ArrangeOverride and MeasureOverride overrides.
我一直在尝试在SWE中执行相同操作但是没什么成功。我已设法识别自定义标签但是我无法创建从IXRPanel(或任何其他面板)派生的控件,IXRControl,IXRItemsControl工作正常。
I have been attempting to do the same in SWE but with little success. I have managed to get a custom tag recognized however I cannot create a control deriving from IXRPanel (or any other panels), IXRControl, IXRItemsControl works fine.
除了从头开始编写列表控件并手动将代码中的每个项目放在后面之外,我无法看到实现所需结果。
Other than writing a list control from scratch and manually placing each item from code behind I cannot see anyway of achieving the desired outcome.
这是我一直试图实现的代码一个WrapPanel
This is the code I have been attempting to realise a WrapPanel with
#pragma once
#include "stdafx.h"
class __declspec(uuid("{C62D9CB3-9DEB-41bd-8327-4CE8CC4AF55E}")) WrapPanel
: public IXRPanel
{
static IXRApplicationPtr m_pApplication;
public:
static HRESULT Register()
{
HRESULT retcode;
UINT uObjectID;
if (FAILED(retcode=App::GetApplication(&m_pApplication)))
return retcode;
retcode = m_pApplication->RegisterXamlObject
(
__uuidof(WrapPanel),
L"WrapPanel",
L"clr-namespace:WrapPanelTest",
&WrapPanel::CreateFn,
IID_IXRPanel,
&uObjectID
);
if (FAILED(retcode))
return retcode;
return S_OK;
}
static HRESULT CALLBACK CreateFn(__in IXRDependencyObject *pExistingXRDO, UINT objectId)
{
return S_OK;
}
};
IXRApplicationPtr WrapPanel::m_pApplication = NULL;
RegisterXamlObject返回E_INVALIDARG
RegisterXamlObject returns E_INVALIDARG
有没有人有任何想法或我可以尝试的替代解决方案,这个井一直在干涸。
Does anyone have any ideas or alternative solutions I could try, the well is running dry at this end.
非常感谢任何帮助。
推荐答案
我正在打同样的问题......在SWE3中没有包装。 有没有人从XRCustomUserControl创建了一个wrappanel?
I'm hitting the same issue...no wrappanel in SWE3. Has anyone created a wrappanel from a XRCustomUserControl?
这篇关于Silverlight Windows Embedded的多列列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!