Hi,
Is there any way to give end user an interface to customize (add/delete/edit) appearance rules for specific view or object type?
I found several documentations for run time customization of rules via code but those are not enough to fulfill my purpose.
Thanks
We have closed this ticket because another page addresses its subject:
Appearance rules not effect after call View.SynchronizeWithInfoEnd user appearance rule customization
Answers
Hello Ahsan,
You should modify your code as follows:
C#//View.LoadModel();
AppearanceController appearanceController = Frame.GetController<AppearanceController>();
if (appearanceController != null) {
appearanceController.ResetRulesCache();
appearanceController.Refresh();
}
Further details can be found at Appearance rules not effect after call View.SynchronizeWithInfo.
Thanks,
Dennis
P.S.
Can I make this ticket public so that other Support Center users could benefit from it? Thank you in advance!
@Willem: I think it is best to repost this question in the corresponding eXpand support forum where support for eXpand Framework is usually provided.
Great,
but i have an issue, when i delete the appearance rule it is removed from the list, bu not from the edit module.
@Mysoft Systems: Would you please submit a separate ticket in the Support Center and attach your current implementation (a sample project) as well as screenshots illustrating the repro steps and context, because for now it is not quite clear? With that, we will be able to address your problem much faster. Thanks.
Hello Ahsan,
You can create a non-persistent class with properties required to define the appearance rule (Criteria, ObjectType, etc.) and show its DetailView to end-users. Then, when a user clicks OK, create an appearance rule model node (IModelAppearanceRule) based on entered parameters. To create an appearance rule, use the following code:
Please let me know if you need any further assistance.
Thanks,
Anatol
Hi Anatol,
I have modified the main demo project with couple of appearance classes and controllers to dynamically add appearance rules.
I have succeeded to create rules according to your instructions but there are some problem of applying those rules. Appearance does not change at all even after model is reloaded.
Please check the attached project.
Thanks
Hi Ahsan,
Please pardon our delayed response. We need some additional time to research your project. We will get back to you as soon as we can.
Thanks,
Dennis