Ejemplo n.º 1
0
 protected override void CustomTitleBar()
 {
     if (DeviceHelper.IsDesktop && _titleBar == null)
     {
         _titleBar = new TitleBarControl()
         {
             ShowBackBtn = false
         };
         (this.Content as Grid).Children.Add(_titleBar);
         Grid.SetColumnSpan(_titleBar, 5);
         Grid.SetRowSpan(_titleBar, 5);
         Canvas.SetZIndex(_titleBar, 100);
     }
     _titleBar.Setup();
 }
Ejemplo n.º 2
0
        protected virtual void CustomTitleBar()
        {
            var currentContent = this.Content as Grid;

            if (currentContent == null)
            {
                throw new ArgumentNullException("The root element of the page should be Grid.");
            }
            if (TitleBarUC == null)
            {
                TitleBarUC = new TitleBarControl();
                TitleBarUC.OnClickBackBtn += () =>
                {
                    if (Frame.CanGoBack)
                    {
                        Frame.GoBack();
                    }
                };
                (currentContent as Grid).Children.Add(TitleBarUC);
                Grid.SetColumnSpan(TitleBarUC, 5);
                Grid.SetRowSpan(TitleBarUC, 5);
            }
            TitleBarUC.Setup();
        }