Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
475
Howto hide functions in the editor?
posted

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?

Parents
No Data
Reply
  • 17475
    Offline posted

    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.

Children