Ejemplo n.º 1
0
        public ContentEditor()
        {
            ContentModel = new ContentModel();
            Journal      = new Journal <List <ItemVersionUri> >();

            InitializeComponent();

            AppearanceOptions = AppearanceManager.GetDefaultAppearanceOptions(this);

            BackButton.CommandTarget    = this;
            ForwardButton.CommandTarget = this;
            Filter = string.Empty;
            ItemBreadcrumb.Initialize(this);

            Notifications.RegisterItemEvents(this, modified: ItemModified, renamed: ItemRenamed, deleted: ItemDeleted);
            Notifications.RegisterFieldEvents(this, FieldChanged);
            Notifications.RegisterTemplateEvents(this, saved: TemplateSaved, changed: TemplateChanged);

            GotFocus += FocusControl;
            Loaded   += ControlLoaded;
            Notifications.Unloaded += ControlUnloaded;

            FilterWidth.Width = new GridLength(AppHost.Settings.GetInt("ContentEditor", "SplitterPosition", 150));
        }