public MainPage(string wrapperid) { InitializeComponent(); HiddenMouseRightButton(); InitializeViewModel(); this.WrapperID = wrapperid; ShowWfDiagram(); HtmlPage.RegisterScriptableObject("SLM", this); LayoutRoot.AddHandler(Grid.MouseLeftButtonUpEvent, new MouseButtonEventHandler(this.LayoutRoot_MouseLeftButtonUp), false); LayoutRoot.AddHandler(Grid.MouseRightButtonUpEvent, new MouseButtonEventHandler(this.LayoutRoot_MouseRightButtonUp), false); }
// 构造函数 public MainPage() { InitializeComponent(); var bar = GetTemplateChild("VerticalScrollBar"); _manager = new BookManager(App.Current.CurrentBook); //ListBox.ListBox.ItemsSource = _manager.List; ListBox.ItemsSource = _manager.Book; ListBox.Inited += ListBox_Loaded; LayoutRoot.AddHandler(Grid.TapEvent, new EventHandler <System.Windows.Input.GestureEventArgs>(Page_Taped), true); Menu.Visibility = System.Windows.Visibility.Collapsed; }