示例#1
0
        public override void ViewWillAppear(bool animated)
        {
            base.ViewWillAppear(animated);

            var titleViewMaxSize = ScreenWidth - LocalConstants.Chat_TotalIconsWidth;

            this.NavigationItem.TitleView = ViewModel.Chat == null
                ? CustomUIExtensions.SetupNavigationBarWithSubtitle(ViewModel.MemberName, ViewModel.MemberDetails, titleViewMaxSize)
                : CustomUIExtensions.SetupNavigationBarWithSubtitle(ViewModel.Chat.MemberName, ViewModel.Chat.MemberDetails, titleViewMaxSize);

            this.NavigationController.NavigationBar.TintColor           = Colors.MainBlue;
            this.NavigationController.NavigationBar.TitleTextAttributes = new UIStringAttributes {
                ForegroundColor = Colors.White
            };
            this.NavigationItem.LeftBarButtonItem = UIButtonExtensions.SetupImageBarButton(LocalConstants.TabBarIconSize, "back_white", CloseView);

            this.NavigationItem.RightBarButtonItems = new UIBarButtonItem[] {
                UIButtonExtensions.SetupBarWithTwoButtons(LocalConstants.TabBarIconSize, "options", Options),
                UIButtonExtensions.SetupBarWithTwoButtons(LocalConstants.TabBarIconSize, "call_white_medium", CallUser)
            };

            this.NavigationController.InteractivePopGestureRecognizer.Delegate = new UIGestureRecognizerDelegate();
            this.NavigationController.NavigationBar.BarTintColor = Colors.MainBlue;
            this.NavigationController.NavigationBar.Translucent  = false;
            this.NavigationController.SetNavigationBarHidden(false, true);
            this.NavigationController.NavigationBar.SetBackgroundImage(new UIImage(), UIBarMetrics.Default);
            this.NavigationController.NavigationBar.ShadowImage = new UIImage();
            UIApplication.SharedApplication.StatusBarStyle      = UIStatusBarStyle.LightContent;
            _navBarView.BackgroundColor = Colors.MainBlue;

            UpdateTableView();
        }