Version

PreviewItems Property

Returns a read-only list off all the GalleryItems defined in the GalleryTool. It is used to show the GalleryItems in the preview area.
Syntax
'Declaration
 
Public ReadOnly Property PreviewItems As ReadOnlyObservableCollection(Of GalleryItem)
public ReadOnlyObservableCollection<GalleryItem> PreviewItems {get;}
Example
The following example shows how to use the PreviewItems property to show the GalleryItems in the preview area.

Imports System
Imports System.Windows
Imports Infragistics.Windows.Ribbon


Namespace MyNamespace
    Public Partial Class MyWindow
        Inherits XamRibbonWindow
        Public Sub New()
            InitializeComponent()
        End Sub
       
        Protected Sub ShowPreviewItems()
            For Each item As GalleryItem In galleryTool.PreviewItems
                Console.WriteLine("The preview item text is: {0}", item.Text)
            Next
        End Sub
       
    End Class
End Namespace
using System;
using System.Windows;
using Infragistics.Windows.Ribbon;


namespace MyNamespace
{
    public partial class MyWindow : XamRibbonWindow
    {
        public MyWindow()
        {
            InitializeComponent();
        }

        protected void ShowPreviewItems()
        {
            foreach (GalleryItem item in galleryTool.PreviewItems)
            {
                Console.WriteLine("The preview item text is: {0}", item.Text);
            }
        }
    }
}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also