private void LoadProperties()
        {
            Children.Clear();

            var type      = Value.GetType();
            var accessors = type.GetAccessors();

            accessors.Foreach(a =>
            {
                var viewModel = PropertySheetManager.GetViewModelFor(a.ValueType);

                if (viewModel == null)
                {
                    return;
                }
                viewModel.Accessor = a;
                viewModel.Object   = Value;

                Children.Add(viewModel);
            });
        }
示例#2
0
 public App()
 {
     PropertySheetManager.Initialize();
     PropertySheetManager.RegisterViewModelForType(typeof(Vector2), typeof(Vector2ViewModel));
 }