eXpand
eXpand copied to clipboard
How to show CardView List with Xpand in a XAF project
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 ?
the ditor lives in the Xpand.ExpressApp.Win assembly and needs the XpandSystemWindowsForms module.
Closing issue for age. Feel free to reopen it at any time.
.Thank you for your contribution.