123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows;
- using System.Windows.Controls;
- using System.Windows.Data;
- using System.Windows.Documents;
- using System.Windows.Input;
- using System.Windows.Media;
- using System.Windows.Media.Imaging;
- using System.Windows.Navigation;
- using System.Windows.Shapes;
- namespace PDF_Office.Views.Form
- {
- /// <summary>
- /// FormsToolContent.xaml 的交互逻辑
- /// </summary>
- public partial class FormsToolContent : UserControl
- {
- public FormsToolContent()
- {
- InitializeComponent();
- }
- private void BtnAlignment_Click(object sender, RoutedEventArgs e)
- {
- MenuAlignment.PlacementTarget = this.BtnAlignment;
- MenuAlignment.IsOpen = true;
- }
- /// <summary>
- /// 取消右键弹出下拉菜单
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void BtnAlignment_Initialized(object sender, EventArgs e)
- {
- //取消右键菜单的绑定,只能左键点击弹出
- this.BtnAlignment.ContextMenu = null;
- }
- private void BtnMore_Click(object sender, RoutedEventArgs e)
- {
- MenuMore.PlacementTarget = this.BtnMore;
- MenuMore.IsOpen = true;
- }
- private void BtnMore_Initialized(object sender, EventArgs e)
- {
- //取消右键菜单的绑定,只能左键点击弹出
- this.BtnMore.ContextMenu = null;
- }
- }
- }
|