JournalEntryUnifiedViewConverter 클래스

정의

JournalEntryUnifiedViewConverter는 후방 탐색 기록과 전방 탐색 기록(Frame 또는 NavigationWindow로 노출)을 단일 Windows Internet Explorer 7 스타일 탐색 메뉴로 병합합니다.

public ref class JournalEntryUnifiedViewConverter sealed : System::Windows::Data::IMultiValueConverter
public sealed class JournalEntryUnifiedViewConverter : System.Windows.Data.IMultiValueConverter
type JournalEntryUnifiedViewConverter = class
    interface IMultiValueConverter
Public NotInheritable Class JournalEntryUnifiedViewConverter
Implements IMultiValueConverter
상속
JournalEntryUnifiedViewConverter
구현

예제

다음 예제에서는 텍스트 기반 탐색 기록 메뉴를 생성 하는 방법을 보여 줍니다. 메뉴 사용 JournalEntryUnifiedViewConverter 뒤로 및 앞으로 탐색 기록에 호스트 된 모두 결합 Frame 탐색기.

<Window 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:presentationFramework="clr-namespace:System.Windows.Navigation;assembly=presentationframework"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="JournalEntryUnifiedPositionConverterSnippets"
    >

    <Window.Resources>

        <presentationFramework:JournalEntryUnifiedViewConverter x:Key="JournalEntryUnifiedViewConverter" />

        <!--MenuItem data template-->
        <DataTemplate x:Key="JournalEntryMenuItemTemplate">
            <MenuItem VerticalContentAlignment="Center" Command="NavigationCommands.NavigateJournal" CommandTarget="{Binding ElementName=frame}" CommandParameter="{Binding RelativeSource={RelativeSource Self}}">
                <MenuItem.Template>
                    <ControlTemplate>
                        <TextBlock>
                            <TextBlock Text="{Binding (JournalEntryUnifiedViewConverter.JournalEntryPosition)}" FontWeight="Bold"></TextBlock>
                            <LineBreak />
                            <TextBlock Text="{Binding Path=Name}" />
                        </TextBlock>
                    </ControlTemplate>
                </MenuItem.Template>
            </MenuItem>
        </DataTemplate>

    </Window.Resources>

    <DockPanel>

        <!--Unified navigation history menu-->
        <Menu DockPanel.Dock="Top">
            <MenuItem Header="Unified Navigation History" ItemTemplate="{DynamicResource JournalEntryMenuItemTemplate}">
                <MenuItem.ItemsSource>
                    <MultiBinding Converter="{StaticResource JournalEntryUnifiedViewConverter}">
                        <MultiBinding.Bindings>
                            <Binding ElementName="frame" Path="BackStack"/>
                            <Binding ElementName="frame" Path="ForwardStack" />
                        </MultiBinding.Bindings>
                    </MultiBinding>
                </MenuItem.ItemsSource>
            </MenuItem>
        </Menu>

        <!--Navigator (Frame with its navigation chrome hidden-->
        <Frame Name="frame" NavigationUIVisibility="Hidden" Source="HomePage.xaml" />

    </DockPanel>
    
</Window>

설명

둘 다 FrameNavigationWindow 다음과 같은 메커니즘을 사용 하 여 기록 탐색을 지 원하는 탐색 크롬 표시:

  • 탐색을 위한 단추 한 번에 한 콘텐츠를 백업 합니다.

  • 앞으로 탐색 콘텐츠의 한 번에는 단추입니다.

  • 다음을 보여 주는 Windows Internet Explorer 7 스타일 드롭다운 목록

    • 최대 9 개의 결합 된 목록을 항목 후방 탐색 기록 하 고, 전방 탐색 기록의 항목으로 구성 합니다.

    • 뒤로 및 앞으로 탐색 기록을 기준으로 콘텐츠는 현재 데이터의 위치입니다.

탐색 기록은 모두에 의해 저장 됩니다 NavigationWindowFrame 속성에서:

뒤로 탐색 기록: Frame.BackStack, . NavigationWindow.BackStack

앞으로 탐색 기록: Frame.ForwardStack, . NavigationWindow.ForwardStack

Windows Internet Explorer 7 스타일 드롭다운 목록을 NavigationWindowFrame 만들고 를 사용하여 JournalEntryUnifiedViewConverter 개별 백 탐색 기록 및 전달 탐색 기록을 탐색 기록 항목의 단일 목록에 병합합니다. 결과 목록 후방 탐색 기록에서 전방 탐색 기록에서 9 개의 항목 및 현재 내용에 대 한 항목이 최대 9 개까지 항목을 포함합니다.

사용자 지정 탐색 UI를 만들고 Windows Internet Explorer 7 스타일 드롭다운 목록을 제공해야 하는 경우 유사한 효과를 사용할 JournalEntryUnifiedViewConverter 수 있습니다.

XAML 특성 사용

이 클래스는 XAML에서 일반적으로 사용 되지 않습니다.

생성자

JournalEntryUnifiedViewConverter()

JournalEntryUnifiedViewConverter 클래스의 새 인스턴스를 초기화합니다.

필드

JournalEntryPositionProperty

JournalEntryPosition 연결된 속성을 식별합니다.

연결된 속성

JournalEntryPosition

항목이 후방 탐색 기록, 전방 탐색 기록 또는 탐색기의 현재 내용에 있는지 여부를 지정하는 값을 가져오거나 설정합니다.

메서드

Convert(Object[], Type, Object, CultureInfo)

두 탐색 기록 스택을 병합합니다.

ConvertBack(Object, Type[], Object, CultureInfo)

구현되지 않았습니다.

Equals(Object)

지정된 개체가 현재 개체와 같은지 확인합니다.

(다음에서 상속됨 Object)
GetHashCode()

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetJournalEntryPosition(DependencyObject)

지정된 요소에 대한 JournalEntryPosition 연결된 속성을 가져옵니다.

GetType()

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
SetJournalEntryPosition(DependencyObject, JournalEntryPosition)

지정된 요소의 JournalEntryPositionProperty 연결된 속성을 설정합니다.

ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

적용 대상

추가 정보