示例#1
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;
		}
        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;
        }
示例#3
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;
        }