eXpand icon indicating copy to clipboard operation
eXpand copied to clipboard

How to show CardView List with Xpand in a XAF project

Open aityahiaidir opened this issue 3 years ago โ€ข 1 comments

I want to display a CardView list in an XAF Project, i noticed that the XVideoRental Demo use the LayoutViewListEditor to achieve this task.

I tried to use the Common.Win module of the demo project but it has a System.NullReferenceExceptionย when we close to designer in design time or runtime, the bug is related to the following method

protected object PropertyDefaultValue(object value, ModelNode node, PropertyDescriptor propertyDescriptor, ModelValueInfo valueInfo, object component) {
            var defaultValueAttribute = propertyDescriptor.Attributes.OfType<DefaultValueAttribute>().FirstOrDefault();
            if (defaultValueAttribute == null) {
                if (propertyDescriptor.PropertyType.IsStruct())
                    return Activator.CreateInstance(propertyDescriptor.PropertyType);
            } else if (defaultValueAttribute.Value.Equals(propertyDescriptor.GetValue(component))) {
                return null;
            }
            return NodeRealValueCore(valueInfo, node);
        }

In the ModelSynchronizer class.

How it is possible to use LayoutViewListEditor directly as part of an xpand module ?

aityahiaidir avatar May 04 '22 17:05 aityahiaidir

the ditor lives in the Xpand.ExpressApp.Win assembly and needs the XpandSystemWindowsForms module.

apobekiaris avatar May 05 '22 00:05 apobekiaris

Closing issue for age. Feel free to reopen it at any time.

.Thank you for your contribution.

expand avatar Jan 08 '24 21:01 expand