I want to hide all functions except the functions in Math category, because in my program they make no sense (just dealing with double values). They also shouldn't appear in the intellisense part.
Also I want to hide the Controls category in the Operands part, my program only has named references.
How can I achieve this?
Hello Michael,
Thank you for posting!
In order to modify the displayed values in OperandTree and FunctionTree of FormulaEditorDialog the FormulaEditorDialogDisplaying event could be handled and a filter for their elements can be applied like this: private void formulaEditor_FormulaEditorDialogDisplaying(object sender, Infragistics.Controls.Interactions.FormulaEditorDialogDisplayingEventArgs e) { Dispatcher.BeginInvoke(new Action(() => { XamDataTree xdt = Utilities.GetDescendantFromName(e.Dialog as DependencyObject, "OperandTree") as XamDataTree; (xdt.ItemsSource as FilteredCollection<OperandInfo>).ApplyFilter(t => t.Name != "Controls"); XamDataTree fxdt = Utilities.GetDescendantFromName(e.Dialog as DependencyObject, "FunctionTree") as XamDataTree; (fxdt.ItemsSource as FilteredCollection<FunctionCategory>).ApplyFilter(t => t.Name == "Math"); }), System.Windows.Threading.DispatcherPriority.Background, null); } Please feel free to let me know if you have any other questions on this matter.
Thank you for your help Maria.
This solves a part of the problem, but there are two caveats:
1. It only works with english culture. Is there a possibility to get e.g. the text "Math" in the current culture? Maybe something like FormulaEditorDialog.Properties.Resources.Math?
2. The intellisense (or auto complete) function in the text box still shows these functions.
TIA
Michael
To get the localized version of text of the functions and controls I can suggest you to use the resource manager in order to get the string representation of the Operand_Category_Controls and Func_abs_Category resources. A sampleproject is attached that demonstrates this approach. I have investigated the issue further and it seems that currently the functions of the CalculationManager that are used also to display the items in the tree are internally set. If you would like to control the implemented functions in the calculation manager, you may consider logging a new product idea at http://ideas.infragistics.com/. Steps to create your idea: 1. Log into the Infragistics Product Ideas site at http://ideas.infragistics.com (creating a new login if needed).2. Navigate to the product / platform channel of your choice (e.g. WPF, Windows Forms, ASP.NET, HTML5 / Ignite UI, iOS / NucliOS, etc.)3. Add your product idea and be sure to be specific and provide as much detail as possible. Explain the context in which a feature would be used, why it is needed, why it can’t be accomplished today, and who would benefit from it. You can even add screenshots to build a stronger case. Remember that for your suggestion to be successful, you need other members of the community to vote for it. Be convincing!
The benefits of submitting the product idea yourself include:- Direct communication with our product management team regarding your product idea.- Notifications whenever new information regarding your idea becomes available.
Additional benefits of the Product Idea system include:
- Ability to vote on your favorite product ideas to let us know which ones are the most important to you. You will have ten votes for this and can change which ideas you are voting for at any time.- Allow you to shape the future of our products by requesting new controls and products altogether.- You and other developers can discuss existing product ideas with members of our Product Management team.
The product ideas site allows you to track the progress of your ideas at any time, see how many votes it got, read comments from other developers in the community, and see if someone from the product team has additional questions for you.
Hello Maria,
in your sample you set completely new resource strings for the calculation manager. That's far too much for a small task of simply retrieving the current text of a category.
But it helped me to find my current solution. I use ResourceManager to retrieve the text from the assembly where XamCalculationManager resides.
And for the functions part, I will try to post a new product idea.
Thank you very much for your help.
Thank you for your feedback Michael. You are correct that using a ResourceManager is a better and more compact solution when custom resources are not applied. I am glad that the test project helped you resolve the issue.