Exemple #1
0
 private void PropertyGrid2_AutoGeneratingPropertyDefinition(object sender, AutoGeneratingPropertyDefinitionEventArgs e)
 {
     if (e.PropertyDefinition.SourceProperty.PropertyType == typeof(bool))
     {
         e.PropertyDefinition.EditorTemplate = TryFindResource("comboboxEditor") as DataTemplate;
     }
 }
 private void PropertyGrid2_AutoGeneratingPropertyDefinition(object sender, AutoGeneratingPropertyDefinitionEventArgs e)
 {
     if (e.PropertyDefinition.SourceProperty.PropertyType == typeof(bool))
     {
         e.PropertyDefinition.EditorTemplate = this.Resources["comboboxEditor"] as DataTemplate;
     }
 }
        private void RadPropertyGrid_AutoGeneratingPropertyDefinition(object sender, AutoGeneratingPropertyDefinitionEventArgs e)
        {
            var type = e.PropertyDefinition.SourceProperty.PropertyType;

            var description = new StringBuilder();
            AppendFriendlyTypeName(type, description);
            e.PropertyDefinition.Description = description.ToString();
        }
Exemple #4
0
 private void WireUpValidation(object sender, AutoGeneratingPropertyDefinitionEventArgs e)
 {
     (e.PropertyDefinition.Binding as Binding).ValidatesOnDataErrors   = true;
     (e.PropertyDefinition.Binding as Binding).NotifyOnValidationError = true;
     (e.PropertyDefinition.Binding as Binding).UpdateSourceTrigger     = UpdateSourceTrigger.PropertyChanged;
     if (sender is RadPropertyGrid)
     {
         var propGrid = sender as RadPropertyGrid;
         propGrid.AddHandler(Validation.ErrorEvent, new RoutedEventHandler(OnBindingValidationError));
     }
 }
Exemple #5
0
        private void RadPropertyGrid_AutoGeneratingPropertyDefinition(object sender, AutoGeneratingPropertyDefinitionEventArgs e)
        {
            var prop = e.PropertyDefinition.SourceProperty;

            if (prop != null)
            {
                var propType = prop.PropertyType;
                if (e.PropertyDefinition.EditorTemplate == null)
                {
                    if (propType == typeof(Vector3))
                    {
                        var dataTemple = createVector3DataTemplate(prop);
                        e.PropertyDefinition.EditorTemplate = dataTemple;
                    }
                }
            }
        }
Exemple #6
0
        private void RadPropertyGrid_AutoGeneratingPropertyDefinition(object sender, AutoGeneratingPropertyDefinitionEventArgs e)
        {
            var prop = e.PropertyDefinition.SourceProperty;

            if (prop != null)
            {
                var propType = prop.PropertyType;
                if (e.PropertyDefinition.EditorTemplate == null)
                {
                    // プロパティの型がEnumFlagsかつPropertySetで設定する場合には特殊対応が必要なので対応.
                    if (propType.IsEnum && propType.GetCustomAttributes(typeof(FlagsAttribute), false).Any())
                    {
                        var dataTemple = createFlagEnumEditorDataTemplate(prop);
                        e.PropertyDefinition.EditorTemplate = dataTemple;
                    }
                }
            }
        }
Exemple #7
0
 static PropertyDefinition \u202B‮‍‌​‍‍​‪‏‪‎‮​‍‬‎‮‌‪‎‪‮([In] AutoGeneratingPropertyDefinitionEventArgs obj0)
 {
     return(obj0.get_PropertyDefinition());
 }
Exemple #8
0
        private void RadPropertyGrid_AutoGeneratingPropertyDefinition(object sender, AutoGeneratingPropertyDefinitionEventArgs e)
        {
            label_1 :
            int num1 = 997835520;

            while (true)
            {
                int  num2 = 670112882;
                uint num3;
                bool flag;
                switch ((num3 = (uint)(num1 ^ num2)) % 10U)
                {
                case 0:
                    goto label_1;

                case 1:
                    goto label_3;

                case 2:
                    num1 = (int)num3 * -806871124 ^ 547411925;
                    continue;

                case 3:
                    num1 = (int)num3 * -292476176 ^ 1444422854;
                    continue;

                case 4:
                    num1 = (int)num3 * 1192580278 ^ 219320881;
                    continue;

                case 5:
                    num1 = (int)num3 * 1119204335 ^ 1105421375;
                    continue;

                case 6:
                    int num4 = LayoutEditorView.\u206B‍‌​‮‍​‍‎‭‌‌‫‍‪‍‎‌‌​‏‮(LayoutEditorView.\u206E‎‫‮‌‮‫‫‮‎‍‍‫‬‎‫​​‭‎‭‭‮‭‍‮(LayoutEditorView.\u206B‏‎​‬‭‎‫‮​‍‮‬‌‭‭‌‭‫‍‫‌‪‮‍‍‌‮​‮(LayoutEditorView.\u202B‮‍‌​‍‍​‪‏‪‎‮​‍‬‎‮‌‪‎‪‮(e))), \u003CModule\u003E.\u206B‎‏‎‮‌​‪‏‭‭‍‍‬‬‫‌‎‮‮‪‌‪‮ <string>(3353321762U)) ? 1121915693 : (num4 = 1106151161);
                    int num5 = (int)num3 * -291016170;
                    num1 = num4 ^ num5;
                    continue;

                case 7:
                    int num6 = flag ? -115194088 : (num6 = -1027844014);
                    int num7 = (int)num3 * -465606063;
                    num1 = num6 ^ num7;
                    continue;

                case 8:
                    num1 = (int)num3 * -1638296754 ^ 428004940;
                    continue;

                case 9:
                    flag = LayoutEditorView.\u206B‍‌​‮‍​‍‎‭‌‌‫‍‪‍‎‌‌​‏‮(LayoutEditorView.\u206E‎‫‮‌‮‫‫‮‎‍‍‫‬‎‫​​‭‎‭‭‮‭‍‮(LayoutEditorView.\u206B‏‎​‬‭‎‫‮​‍‮‬‌‭‭‌‭‫‍‫‌‪‮‍‍‌‮​‮(LayoutEditorView.\u202B‮‍‌​‍‍​‪‏‪‎‮​‍‬‎‮‌‪‎‪‮(e))), \u003CModule\u003E.\u202A​‬‫‪‫‪‮‪‫‎‭‪‏‮‎‭‍‌‎‫‍​‎‎‮ <string>(3572104350U));
                    num1 = 1410722677;
                    continue;

                default:
                    goto label_12;
                }
            }
label_12:
            return;

            label_3 :;
        }
    private static void PropertyGridOnAutoGeneratingPropertyDefinition(object sender, AutoGeneratingPropertyDefinitionEventArgs eventArgs)
    {
        PropertyDefinition propertyDefinition = eventArgs.PropertyDefinition;

        string propertyName = propertyDefinition.SourceProperty.Name;

        if (Array.IndexOf(_HiddenProperties, propertyDefinition.AutoGeneratedPath) > 0)
        {
            eventArgs.Cancel = true;
        }
        else
        {
            var descriptor = ((MemberDescriptor)(propertyDefinition.SourceProperty.Descriptor));

            /// Work with properties attribute, properties display name, etc
        }
    }