public override void OnApplyTemplate() { base.OnApplyTemplate(); this.contentRoot = GetTemplateChild("contentRoot") as Grid; this.backGround = GetTemplateChild("backGroundBorderElement") as Border; this.navigationRoot = GetTemplateChild("navigationRoot") as PageRoot; (this.windowCaption = navigationRoot.WindowCaption).SetTargetWindow(this); SizeChanged += (sender, args) => { var isMaximized = WindowState == WindowState.Maximized; contentRoot.Margin = isMaximized ? new Thickness(8) : new Thickness(0); compositor.IsEnabled = isMaximized; backGround.Visibility = isMaximized ? Visibility.Hidden : Visibility.Visible; }; }
private ISearchContext CreateSearchContext(IBrowser my) { ISearchContext ctx = new PageRoot(my); return(ctx); }