123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- <UserControl
- x:Class="PDF_Office.Views.BOTA.BOTAContent"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:convert="clr-namespace:PDF_Office.DataConvert"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:PDF_Office.Views.BOTA"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:prism="http://prismlibrary.com/"
- d:DesignHeight="450"
- d:DesignWidth="800"
- prism:ViewModelLocator.AutoWireViewModel="True"
- mc:Ignorable="d">
- <UserControl.Resources>
- <ResourceDictionary>
- <convert:VisibleToBoolConvert x:Key="VisibleToBoolConvert" />
- <convert:BoolToVisible x:Key="BoolToVisibleConvert" />
- </ResourceDictionary>
- </UserControl.Resources>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="48" />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <Border Background="Transparent">
- <Border.ContextMenu>
- <!-- CnotextMenu 不在视觉书树内,绑定其他控件名称需要用到x:Refrence -->
- <ContextMenu>
- <MenuItem
- Name="MenuThumbnail"
- Header="{Binding Source={x:Reference Name=TabItemThumbnail}, Path=Name}"
- IsCheckable="True"
- IsChecked="True" />
- <MenuItem
- Name="MenuOutLine"
- Header="{Binding Source={x:Reference Name=TabItemOutLine}, Path=Name}"
- IsCheckable="True"
- IsChecked="True" />
- <MenuItem
- Name="MenuBookMark"
- Header="{Binding Source={x:Reference Name=TabItemBookMark}, Path=Name}"
- IsCheckable="True"
- IsChecked="True" />
- <MenuItem
- Name="MenuAnnotation"
- Header="{Binding Source={x:Reference Name=TabItemAnnotation}, Path=Name}"
- IsCheckable="True"
- IsChecked="True" />
- <MenuItem
- Name="MenuSearch"
- Header="{Binding Source={x:Reference Name=TabItemSearch}, Path=Name}"
- IsCheckable="True"
- IsChecked="True" />
- <MenuItem
- Name="MenuFrom"
- Header="{Binding Source={x:Reference Name=TabItemForm}, Path=Name}"
- IsCheckable="True" />
- <MenuItem
- Name="MenuSign"
- Header="{Binding Source={x:Reference Name=TabItemSign}, Path=Name}"
- IsCheckable="True" />
- </ContextMenu>
- </Border.ContextMenu>
- </Border>
- <TabControl
- Grid.ColumnSpan="2"
- Background="Transparent"
- Style="{StaticResource TabControlWithUnderLineStyle}"
- TabStripPlacement="Left">
- <!-- 建立一个空的标头占位 -->
- <TabItem Height="0" />
- <TabItem
- Name="TabItemThumbnail"
- Width="48"
- Height="48"
- Header="缩略"
- Visibility="{Binding ElementName=MenuThumbnail, Path=IsChecked, Converter={StaticResource BoolToVisibleConvert}, Mode=TwoWay}" />
- <TabItem
- Name="TabItemOutLine"
- Width="48"
- Height="48"
- Header="大纲"
- Visibility="{Binding ElementName=MenuOutLine, Path=IsChecked, Converter={StaticResource BoolToVisibleConvert}, Mode=TwoWay}" />
- <TabItem
- Name="TabItemBookMark"
- Width="48"
- Height="48"
- Header="书签"
- Visibility="{Binding ElementName=MenuBookMark, Path=IsChecked, Converter={StaticResource BoolToVisibleConvert}, Mode=TwoWay}" />
- <TabItem
- Name="TabItemAnnotation"
- Width="48"
- Height="48"
- Header="注释"
- Visibility="{Binding ElementName=MenuAnnotation, Path=IsChecked, Converter={StaticResource BoolToVisibleConvert}, Mode=TwoWay}" />
- <TabItem
- Name="TabItemSearch"
- Width="48"
- Height="48"
- Header="搜索"
- Visibility="{Binding ElementName=MenuSearch, Path=IsChecked, Converter={StaticResource BoolToVisibleConvert}, Mode=TwoWay}" />
- <TabItem
- Name="TabItemForm"
- Width="48"
- Height="48"
- Header="域"
- Visibility="{Binding ElementName=MenuFrom, Path=IsChecked, Converter={StaticResource BoolToVisibleConvert}, Mode=TwoWay}" />
- <TabItem
- Name="TabItemSign"
- Width="48"
- Height="48"
- Header="签名"
- Visibility="{Binding ElementName=MenuSign, Path=IsChecked, Converter={StaticResource BoolToVisibleConvert}, Mode=TwoWay}" />
- </TabControl>
- </Grid>
- </UserControl>
|