Exemplo n.º 1
0
            public DockableContentDescriptor(FrameworkElement content, DockableCollectionDescriptor dockableCollection, int internalId)
            {
                TabText    = DockingPanel.GetTabText(content);
                InternalId = internalId;

                SerializableColor?backgroundColor = GetColorFromContent(content, "Background");
                SerializableColor?foregroundColor = GetColorFromContent(content, "Foreground");

                if (backgroundColor.HasValue)
                {
                    Background = backgroundColor.Value;
                }
                if (foregroundColor.HasValue)
                {
                    Foreground = foregroundColor.Value;
                }

                TypeName    = content.GetType().ToString();
                Description = DockingPanel.GetDescriptiveText(content);

                dockableCollection.Content.Add(this);
            }