123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411 |
- <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
- <Style x:Key="ContextMenuStyle" TargetType="{x:Type ContextMenu}">
- <Setter Property="SnapsToDevicePixels" Value="True" />
- <Setter Property="Grid.IsSharedSizeScope" Value="true" />
- <Setter Property="HasDropShadow" Value="True" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ContextMenu}">
- <Border Uid="Border_93">
- <Border.Style>
- <Style TargetType="{x:Type Border}">
- <Setter Property="Tag" Value="{DynamicResource {x:Static SystemParameters.DropShadowKey}}" />
- <Style.Triggers>
- <DataTrigger Binding="{Binding Tag, RelativeSource={RelativeSource Self}}" Value="True">
- <Setter Property="Effect">
- <Setter.Value>
- <DropShadowEffect
- BlurRadius="4"
- Opacity="0.8"
- ShadowDepth="1" />
- </Setter.Value>
- </Setter>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </Border.Style>
- <Border
- Uid="Border_50"
- Background="White"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}">
- <ScrollViewer
- Uid="ScrollViewer_9"
- CanContentScroll="True"
- Style="{DynamicResource {ComponentResourceKey ResourceId=MenuScrollViewer,
- TypeInTargetAssembly={x:Type FrameworkElement}}}">
- <ItemsPresenter
- Uid="ItemsPresenter_5"
- KeyboardNavigation.DirectionalNavigation="Cycle"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </ScrollViewer>
- </Border>
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <!-- TextEdit Right Menu Style -->
- <!-- 空白处 - 右键菜单 -->
- <ContextMenu
- x:Key="NoneMenu"
- Width="150"
- Background="#FFF8F8F8">
- <MenuItem Name="PasteNone">
- <MenuItem.Header>
- <Grid>
- <TextBlock Text="Paste" />
- </Grid>
- </MenuItem.Header>
- </MenuItem>
- <MenuItem Name="AddTextNone">
- <MenuItem.Header>
- <Grid>
- <TextBlock Text="Add Text" />
- </Grid>
- </MenuItem.Header>
- </MenuItem>
- <MenuItem Name="AddImgNone">
- <MenuItem.Header>
- <Grid>
- <TextBlock Text="Add Image" />
- </Grid>
- </MenuItem.Header>
- </MenuItem>
- </ContextMenu>
- <!-- 选择文本框 - 右键菜单 -->
- <ContextMenu
- x:Key="SelectTextMenu"
- Width="150"
- Background="#FFF8F8F8">
- <!--<MenuItem Name="EditSelectText">
- <MenuItem.Header>
- <Grid>
- <TextBlock Text="Edit" />
- </Grid>
- </MenuItem.Header>
- </MenuItem>-->
- <MenuItem Name="CopySelectText">
- <MenuItem.Header>
- <Grid>
- <TextBlock Text="Copy" />
- </Grid>
- </MenuItem.Header>
- </MenuItem>
- <MenuItem Name="CutSelectText">
- <MenuItem.Header>
- <Grid>
- <TextBlock Text="Cut" />
- </Grid>
- </MenuItem.Header>
- </MenuItem>
- <MenuItem Name="PasteSelectText">
- <MenuItem.Header>
- <Grid>
- <TextBlock Text="Paste" />
- </Grid>
- </MenuItem.Header>
- </MenuItem>
- <MenuItem Name="DeleteSelectText">
- <MenuItem.Header>
- <Grid>
- <TextBlock Text="Delete" />
- </Grid>
- </MenuItem.Header>
- </MenuItem>
- </ContextMenu>
- <!-- 多选图片 - 右键菜单 -->
- <ContextMenu
- x:Key="SelectMoreTextMenu"
- Width="150"
- Background="#FFF8F8F8">
- <MenuItem Name="CopySelectMoreText">
- <MenuItem.Header>
- <Grid>
- <TextBlock Text="Copy" />
- </Grid>
- </MenuItem.Header>
- </MenuItem>
- <MenuItem Name="CutSelectMoreText">
- <MenuItem.Header>
- <Grid>
- <TextBlock Text="Cut" />
- </Grid>
- </MenuItem.Header>
- </MenuItem>
- <MenuItem Name="PasteSelectMoreText">
- <MenuItem.Header>
- <Grid>
- <TextBlock Text="Paste" />
- </Grid>
- </MenuItem.Header>
- </MenuItem>
- <MenuItem Name="DeleteSelectMoreText">
- <MenuItem.Header>
- <Grid>
- <TextBlock Text="Delete" />
- </Grid>
- </MenuItem.Header>
- </MenuItem>
- </ContextMenu>
- <!-- 选择图片 - 右键菜单 -->
- <ContextMenu
- x:Key="SelectImgMenu"
- Width="150"
- Background="#FFF8F8F8">
- <MenuItem Name="CopySelectImg">
- <MenuItem.Header>
- <Grid>
- <TextBlock Text="Copy" />
- </Grid>
- </MenuItem.Header>
- </MenuItem>
- <MenuItem Name="CutSelectImg">
- <MenuItem.Header>
- <Grid>
- <TextBlock Text="Cut" />
- </Grid>
- </MenuItem.Header>
- </MenuItem>
- <MenuItem Name="PasteSelectImg">
- <MenuItem.Header>
- <Grid>
- <TextBlock Text="Paste" />
- </Grid>
- </MenuItem.Header>
- </MenuItem>
- <MenuItem Name="DeleteSelectImg">
- <MenuItem.Header>
- <Grid>
- <TextBlock Text="Delete" />
- </Grid>
- </MenuItem.Header>
- </MenuItem>
- <MenuItem Name="CropSelectImg">
- <MenuItem.Header>
- <Grid>
- <TextBlock Text="Crop" />
- </Grid>
- </MenuItem.Header>
- </MenuItem>
- <MenuItem Name="ReplaceSelectImg">
- <MenuItem.Header>
- <Grid>
- <TextBlock Text="Replace" />
- </Grid>
- </MenuItem.Header>
- </MenuItem>
- <MenuItem Name="ExportSelectImg">
- <MenuItem.Header>
- <Grid>
- <TextBlock Text="Export" />
- </Grid>
- </MenuItem.Header>
- </MenuItem>
- </ContextMenu>
- <!-- 多选图片 - 右键菜单 -->
- <ContextMenu
- x:Key="SelectMoreImageMenu"
- Width="150"
- Background="#FFF8F8F8">
- <MenuItem Name="CopySelectMoreImg">
- <MenuItem.Header>
- <Grid>
- <TextBlock Text="Copy" />
- </Grid>
- </MenuItem.Header>
- </MenuItem>
- <MenuItem Name="CutSelectMoreImg">
- <MenuItem.Header>
- <Grid>
- <TextBlock Text="Cut" />
- </Grid>
- </MenuItem.Header>
- </MenuItem>
- <MenuItem Name="PasteSelectMoreImg">
- <MenuItem.Header>
- <Grid>
- <TextBlock Text="Paste" />
- </Grid>
- </MenuItem.Header>
- </MenuItem>
- <MenuItem Name="DeleteSelectMoreImg">
- <MenuItem.Header>
- <Grid>
- <TextBlock Text="Delete" />
- </Grid>
- </MenuItem.Header>
- </MenuItem>
- <MenuItem Name="ExportSelectMoreImg">
- <MenuItem.Header>
- <Grid>
- <TextBlock Text="Export" />
- </Grid>
- </MenuItem.Header>
- </MenuItem>
- </ContextMenu>
- <!-- 选择Crop中图片 - 右键菜单 -->
- <ContextMenu
- x:Key="CropImgMenu"
- Width="150"
- Background="#FFF8F8F8">
- <MenuItem Name="CropImg">
- <MenuItem.Header>
- <Grid>
- <TextBlock Text="Crop" />
- </Grid>
- </MenuItem.Header>
- </MenuItem>
- <MenuItem Name="NoCropImg">
- <MenuItem.Header>
- <Grid>
- <TextBlock Text="CancelCrop" />
- </Grid>
- </MenuItem.Header>
- </MenuItem>
- <MenuItem Name="RevokeCropImg">
- <MenuItem.Header>
- <Grid>
- <TextBlock Text="RecoverCrop" />
- </Grid>
- </MenuItem.Header>
- </MenuItem>
- </ContextMenu>
- <!-- 选中文本 - 右键菜单 -->
- <ContextMenu
- x:Key="SelectContentMenu"
- Width="150"
- Background="#FFF8F8F8">
- <MenuItem Name="CopySelectContent">
- <MenuItem.Header>
- <Grid>
- <!--<Path Data="M11.3081693,0.5 L12.1518307,1.04661201 L7.592,8.341 L8.66141901,10.0529238 C9.01895648,9.09225685 9.93114491,8.4093224 11,8.4093224 C12.3807119,8.4093224 13.5,9.5489094 13.5,10.9546612 C13.5,12.360413 12.3807119,13.5 11,13.5 C10.0611159,13.5 9.24311419,12.973055 8.81573481,12.1937968 L7,9.289 L5.172,12.213 L5.10186464,12.3333197 C4.64705902,13.0515502 3.86209624,13.5 3,13.5 C1.61928813,13.5 0.5,12.360413 0.5,10.9546612 C0.5,9.5489094 1.61928813,8.4093224 3,8.4093224 C4.06885509,8.4093224 4.98104352,9.09225685 5.33858099,10.0529238 L6.407,8.341 L1.84816926,1.04661201 L2.69183074,0.5 L7,7.393 L11.3081693,0.5 Z M11,9.42745792 C10.1715729,9.42745792 9.5,10.1112101 9.5,10.9546612 C9.5,11.7981123 10.1715729,12.4818645 11,12.4818645 C11.8284271,12.4818645 12.5,11.7981123 12.5,10.9546612 C12.5,10.1112101 11.8284271,9.42745792 11,9.42745792 Z M3,9.42745792 C2.17157288,9.42745792 1.5,10.1112101 1.5,10.9546612 C1.5,11.7981123 2.17157288,12.4818645 3,12.4818645 C3.5545817,12.4818645 4.05535119,12.1731728 4.31698134,11.6865091 C4.43652752,11.4641388 4.5,11.2146546 4.5,10.9546612 C4.5,10.1112101 3.82842712,9.42745792 3,9.42745792 Z" Fill="Black" />-->
- <TextBlock Text="Copy" />
- </Grid>
- </MenuItem.Header>
- </MenuItem>
- <MenuItem Name="CutSelectContent">
- <MenuItem.Header>
- <Grid>
- <TextBlock Text="Cut" />
- </Grid>
- </MenuItem.Header>
- </MenuItem>
- <MenuItem Name="PasteSelectContent">
- <MenuItem.Header>
- <Grid>
- <TextBlock Text="Paste" />
- </Grid>
- </MenuItem.Header>
- </MenuItem>
- <MenuItem Name="PasteMatchStyleSelectContent">
- <MenuItem.Header>
- <Grid>
- <TextBlock Text="Paste Styles" />
- </Grid>
- </MenuItem.Header>
- </MenuItem>
- <MenuItem Name="DeleteSelectContent">
- <MenuItem.Header>
- <Grid>
- <TextBlock Text="Delete" />
- </Grid>
- </MenuItem.Header>
- </MenuItem>
- <MenuItem Name="AllSelectSelectContent">
- <MenuItem.Header>
- <Grid>
- <TextBlock Text="Select All" />
- </Grid>
- </MenuItem.Header>
- </MenuItem>
- </ContextMenu>
- <!-- 文本为Edit状态,且未选中文本内容时,右键菜单项 -->
- <ContextMenu
- x:Key="NoneSelectContentMenu"
- Width="150"
- Background="#FFF8F8F8">
- <MenuItem Name="AllSelectNoneSelectContentMenu">
- <MenuItem.Header>
- <Grid>
- <TextBlock Text="Select All" />
- </Grid>
- </MenuItem.Header>
- </MenuItem>
- <MenuItem Name="PasteNoneSelectContentMenu">
- <MenuItem.Header>
- <Grid>
- <TextBlock Text="Paste" />
- </Grid>
- </MenuItem.Header>
- </MenuItem>
- <MenuItem Name="PasteMatchStyleNoneSelectContentMenu">
- <MenuItem.Header>
- <Grid>
- <TextBlock Text="Paste Styles" />
- </Grid>
- </MenuItem.Header>
- </MenuItem>
- </ContextMenu>
- </ResourceDictionary>
|