Ejemplo n.º 1
0
        public AvalonWorkbenchWindow(AvalonDockLayout dockLayout)
        {
            if (dockLayout == null)
            {
                throw new ArgumentNullException("dockLayout");
            }

            CustomFocusManager.SetRememberFocusedChild(this, true);
            this.IsFloatingAllowed = true;
            this.dockLayout        = dockLayout;
            viewContents           = new ViewContentCollection(this);

            ResourceService.LanguageChanged += OnTabPageTextChanged;
        }
Ejemplo n.º 2
0
        public AvalonPadContent(AvalonDockLayout layout, PadDescriptor descriptor)
        {
            this.descriptor = descriptor;
            this.layout     = layout;

            CustomFocusManager.SetRememberFocusedChild(this, true);
            this.Name = descriptor.Class.Replace('.', '_');
            this.SetValueToExtension(TitleProperty, new StringParseExtension(descriptor.Title));
            placeholder = new TextBlock {
                Text = this.Title
            };
            this.Content = placeholder;
            this.Icon    = PresentationResourceService.GetBitmapSource(descriptor.Icon);

            placeholder.IsVisibleChanged += AvalonPadContent_IsVisibleChanged;
        }