Exemplo n.º 1
0
        public ePUBBookView2()
        {
            using (new TimeLogger("ePUBBookView.ePUBBookView"))
            {
                InitializeComponent();
                VisualHelper.AllowFocus(this);

                Messenger.Default.Register <TocNaviguateNotification>(this, HandleNaviguationChange);

                this.Loaded += (object sender, RoutedEventArgs e) =>
                {
                    SetValue(ThisProperty, this);

                    ePUBBookViewModel2 viewmodel = (this.DataContext as ePUBBookViewModel2);
                    if (viewmodel.DocumentContent == null)
                    {
                        viewmodel.Load();
                        SubscribeToAllHyperlinks((this.DataContext as ePUBBookViewModel2).DocumentContent as FrameworkContentElement);
                    }
                };

                this.Unloaded += (object sender, RoutedEventArgs e) =>
                {
                    ePUBBookViewModel2 viewmodel = (this.DataContext as ePUBBookViewModel2);
                    if (viewmodel.DocumentContent == null)
                    {
                        viewmodel.Load();
                        UnsubscribeToAllHyperlinks((this.DataContext as ePUBBookViewModel2).DocumentContent as FrameworkContentElement);
                    }
                };
            }
        }
Exemplo n.º 2
0
 public TwoPageView()
 {
     using (new TimeLogger("TwoPageView.TwoPageView"))
     {
         InitializeComponent();
         VisualHelper.AllowFocus(this);
     }
 }
Exemplo n.º 3
0
 public XpsBookView()
 {
     using (new TimeLogger("XpsBookView.XpsBookView"))
     {
         InitializeComponent();
         VisualHelper.AllowFocus(this);
     }
 }
Exemplo n.º 4
0
 public FeedView()
 {
     using (new TimeLogger("FeedView.FeedView"))
     {
         InitializeComponent();
         VisualHelper.AllowFocus(this);
     }
 }
Exemplo n.º 5
0
 public LibraryView()
 {
     using (new TimeLogger("LibraryView.LibraryView"))
     {
         InitializeComponent();
         VisualHelper.AllowFocus(this);
     }
 }
Exemplo n.º 6
0
        public DriveExplorerView()
        {
            using (new TimeLogger("DriveExplorerView.DriveExplorerView"))
            {
                InitializeComponent();

                VisualHelper.AllowFocus(this);
            }
        }
Exemplo n.º 7
0
        public ExplorerView()
        {
            using (new TimeLogger("ExplorerView.ExplorerView"))
            {
                InitializeComponent();
                VisualHelper.AllowFocus(this);

                if (!System.ComponentModel.DesignerProperties.GetIsInDesignMode(this))
                {
                    Messenger.Default.Register <MessageBase>(this, (s) => { this.CatalogListView.Grouping(); });
                }
            }
        }