Example #1
0
        public CategoryList()
        {
            _stateContainer = new AggregateStateContainer(
                new CategoryListStateContainer(this),
                _categoryStates);

            // Setup the shared width container
            _sharedWidthContainer = new SharedPropertyValueColumnWidthContainer();
            SharedPropertyValueColumnWidthContainer.SetOwningSharedPropertyValueColumnWidthContainer(this, _sharedWidthContainer);

            // When someone new gets focus, we may need to mess around with selected property, so listen to the event
            this.AddHandler(FocusManager.GotFocusEvent, new RoutedEventHandler(OnSomeoneGotFocus));

            // When editing is done in the value editor, shift focus back to the selected property
            this.CommandBindings.Add(new CommandBinding(PropertyValueEditorCommands.FinishEditing, OnFinishEditing));

            // Need to call this method from a UI thread because some of Sparkle's value editors rely on it
            UIThreadDispatcher.InitializeInstance();
        }
Example #2
0
        public static void SetOwningSharedPropertyValueColumnWidthContainer(DependencyObject obj, SharedPropertyValueColumnWidthContainer value)
        {
            if (obj == null)
            {
                throw FxTrace.Exception.ArgumentNull("obj");
            }

            obj.SetValue(OwningSharedPropertyValueColumnWidthContainerProperty, value);
        }
        public static void SetOwningSharedPropertyValueColumnWidthContainer(DependencyObject obj, SharedPropertyValueColumnWidthContainer value) 
        {
            if (obj == null)
            {
                throw FxTrace.Exception.ArgumentNull("obj");
            }

            obj.SetValue(OwningSharedPropertyValueColumnWidthContainerProperty, value);
        }