/// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="Key">Key/Code for identify the panel.</param>
 /// <param name="Title">Title of the panel.</param>
 /// <param name="Type">Purpose type of the supplied content.</param>
 /// <param name="Content">Visual content to be hosted.</param>
 /// <param name="CanCollapse">Indicates whether the panel is collapsable.</param>
 public AutoCollapsePanel(string Key        = "", string Title = "", EShellVisualContentType Type = EShellVisualContentType.PaletteContent,
                          UIElement Content = null, bool CanCollapse = true) : this()
 {
     this.Key         = Key;
     this.Title       = Title;
     this.ContentType = Type;
     this.Content     = Content;
     this.CanCollapse = CanCollapse;
 }
Beispiel #2
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="Key">Key/Code for identify the panel.</param>
        /// <param name="Title">Title of the panel.</param>
        /// <param name="Type">Purpose type of the supplied content.</param>
        /// <param name="Content">Visual content to be hosted.</param>
        /// <param name="ShowTitle">Indicates to show the title.</param>
        /// <param name="CanMinimize">Indicates that the panel can be minimized.</param>
        public EntitledPanel(string Key        = "", string Title     = "", EShellVisualContentType Type = EShellVisualContentType.EditingContent,
                             UIElement Content = null, bool ShowTitle = true, bool CanMinimize           = false) : this()
        {
            this.Key         = Key;
            this.Title       = Title;
            this.ContentType = Type;
            this.Content     = Content;
            this.ShowTitle   = ShowTitle;
            this.CanMinimize = CanMinimize;

            this.CreationText = "Create new...";
        }
Beispiel #3
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="Key">Key for identify the panel.</param>
 /// <param name="Title">Title of the panel.</param>
 /// <param name="Type">Purpose type of the supplied content.</param>
 /// <param name="Content">Visual content to be hosted.</param>
 public WidgetPalette(string Key = "", string Title = "", EShellVisualContentType Type = EShellVisualContentType.PaletteContent, string ImageLocation = null) :
     this()
 {
     this.Key = Key;
     this.PaletteTitle.Text             = Title;
     this.PaletteTitleContainer.ToolTip = Title;
     this.ContentType = Type;
     if (!ImageLocation.IsAbsent())
     {
         this.PaletteImage.Source = Display.GetAppImage(ImageLocation);
     }
 }
        public void PutVisualContent(EShellVisualContentType Kind, object Content, int Group = 0)
        {
            General.ContractRequiresNotNull(Content);

            switch (Kind)
            {
            case EShellVisualContentType.PaletteContent:
                PutToolPaletteContent(Content as IShellVisualContent);
                break;

            case EShellVisualContentType.QuickPaletteContent:
                PutQuickPaletteContent(Content as IEnumerable <UIElement>);
                break;

            case EShellVisualContentType.NavigationContent:
                PutNavigationContent(Content as IShellVisualContent);
                break;

            case EShellVisualContentType.DocumentContent:
                PutDocumentContent(Content as IShellVisualContent);
                break;

            case EShellVisualContentType.MessagingContent:
                PutMessagingContent(Content as IShellVisualContent);
                break;

            case EShellVisualContentType.EditingContent:
                PutEditingContent(Content as IShellVisualContent, Group);
                break;

            case EShellVisualContentType.StatusContent:
                PutStatusContent(Content as IShellVisualContent);
                break;

            default:
                throw new InternalAnomaly("Cannot put visual content with specified type.", Content);
            }
        }