Beispiel #1
0
        public CustomEditorViewModel()
        {
            PrivateEmployee            = new PrivateEmployee();
            PrivateEmployee.Name       = "Johnson";
            PrivateEmployee.Age        = 25;
            PrivateEmployee.EmailID    = "johnabc@gt";
            PrivateEmployee.Experience = 5;
            PrivateEmployee.Height     = 260;
            PrivateEmployee.Image      = new BitmapImage(new Uri("/syncfusion.demoscommon.wpf;component/Assets/People/People_Circle31.png", UriKind.RelativeOrAbsolute));
            PrivateEmployee.Salary     = "500";
            PrivateEmployee.Weight     = 100;

            //Initialize the custom editor collection
            CustomEditorCollection = new CustomEditorCollection();

            // CurrenyEditor added to the collection and will applied to the "Salary" property
            CustomEditor customEditor = new CustomEditor();

            customEditor.Editor = new CurrencyEditor();
            customEditor.Properties.Add("Salary");

            CustomEditorCollection.Add(customEditor);

            //DoubleUpdownEditor added to the collection and it will applied to the "Double" type properties
            CustomEditor customEditor1 = new CustomEditor();

            customEditor1.Editor          = new DoubleUpDownEditor();
            customEditor1.HasPropertyType = true;
            customEditor1.PropertyType    = typeof(double);

            CustomEditorCollection.Add(customEditor1);
        }
Beispiel #2
0
    public CustomEditorViewModel()
    {
        //Initialize the custom editor collection
        CustomEditorCollection = new CustomEditorCollection();

        // CurrenyEditor added to CustomEditor collection
        // And it will applied to the "Salary" property
        CustomEditor customEditor = new CustomEditor();

        customEditor.Editor = new CurrencyEditor();
        customEditor.Properties.Add("Salary");

        CustomEditorCollection.Add(customEditor);

        //DoubleUpdownEditor added to the collection
        //And it will applied to the "Double" type properties
        CustomEditor customEditor1 = new CustomEditor();

        customEditor1.Editor          = new DoubleUpDownEditor();
        customEditor1.HasPropertyType = true;
        customEditor1.PropertyType    = typeof(double);

        CustomEditorCollection.Add(customEditor1);
    }