public override void ViewDidAppear(bool animated) { originalStatusBarStyle = UIApplication.SharedApplication.StatusBarStyle; if (UIDevice.CurrentDevice.CheckSystemVersion(7, 0)) { UIApplication.SharedApplication.StatusBarStyle = UIStatusBarStyle.Default; SetNeedsStatusBarAppearanceUpdate(); } else { UIApplication.SharedApplication.SetStatusBarStyle(UIStatusBarStyle.BlackTranslucent, false); } Console.WriteLine("Starting to scan..."); scannerView.StartScanning(result => { if (!ContinuousScanning) { Console.WriteLine("Stopping scan..."); scannerView.StopScanning(); } var evt = this.OnScannedResult; if (evt != null) { evt(result); } }, ScanningOptions); }
public override void ViewDidAppear(bool animated) { _scannerView.OnScannerSetupComplete += HandleOnScannerSetupComplete; _originalStatusBarStyle = UIApplication.SharedApplication.StatusBarStyle; if (UIDevice.CurrentDevice.CheckSystemVersion(7, 0)) { UIApplication.SharedApplication.StatusBarStyle = UIStatusBarStyle.Default; SetNeedsStatusBarAppearanceUpdate(); } else { UIApplication.SharedApplication.SetStatusBarStyle(UIStatusBarStyle.BlackTranslucent, false); } Task.Factory.StartNew(() => { BeginInvokeOnMainThread(() => _scannerView.StartScanning(result => { Console.WriteLine(result); if (!ContinuousScanning) { _scannerView.StopScanning(); } var evt = OnScannedResult; evt?.Invoke(result); }, ScanningOptions)); }); }
public override void ViewDidAppear(bool animated) { scannerView.OnScannerSetupComplete += HandleOnScannerSetupComplete; originalStatusBarStyle = UIApplication.SharedApplication.StatusBarStyle; if (UIDevice.CurrentDevice.CheckSystemVersion(7, 0)) { UIApplication.SharedApplication.StatusBarStyle = UIStatusBarStyle.Default; SetNeedsStatusBarAppearanceUpdate(); } else { UIApplication.SharedApplication.SetStatusBarStyle(UIStatusBarStyle.BlackTranslucent, false); } Console.WriteLine("Starting to scan..."); Task.Factory.StartNew(() => { BeginInvokeOnMainThread(() => scannerView.StartScanning(this.ScanningOptions, result => { Console.WriteLine("Stopping scan..."); scannerView.StopScanning(); var evt = this.OnScannedResult; if (evt != null) { evt(result); } })); }); }
public override void ViewDidAppear(bool animated) { scannerView.OnScannerSetupComplete += HandleOnScannerSetupComplete; originalStatusBarStyle = UIApplication.SharedApplication.StatusBarStyle; if (UIDevice.CurrentDevice.CheckSystemVersion(7, 0)) { UIApplication.SharedApplication.StatusBarStyle = UIStatusBarStyle.Default; SetNeedsStatusBarAppearanceUpdate(); } else { UIApplication.SharedApplication.SetStatusBarStyle(UIStatusBarStyle.LightContent, false); } // Start scanning Task.Factory.StartNew(() => { BeginInvokeOnMainThread(() => scannerView.StartScanning(result => { // If scanner stop the scanning if (!ContinuousScanning) { scannerView.StopScanning(); } this.OnScannedResult?.Invoke(result); }, this.ScanningOptions)); }); }
public AuthenticationAgentUINavigationController(string url, string callback, AuthenticationAgentUIViewController.ReturnCodeCallback callbackMethod, UIStatusBarStyle preferredStatusBarStyle) { this.url = url; this.callback = callback; this.callbackMethod = callbackMethod; this.preferredStatusBarStyle = preferredStatusBarStyle; }
public void SetStatusBarColor(System.Drawing.Color color, bool darkStatusBarTint) { UIStatusBarStyle style = darkStatusBarTint ? UIStatusBarStyle.DarkContent : UIStatusBarStyle.LightContent; UIApplication.SharedApplication.SetStatusBarStyle(style, false); Platform.GetCurrentUIViewController()?.SetNeedsStatusBarAppearanceUpdate(); }
public MsalAuthenticationAgentUINavigationController(string url, string callback, MsalAuthenticationAgentUIViewController.ReturnCodeCallback callbackMethod, UIStatusBarStyle preferredStatusBarStyle) { _url = url; _callback = callback; _callbackMethod = callbackMethod; _preferredStatusBarStyle = preferredStatusBarStyle; }
public override void ViewDidAppear(bool animated) { originalStatusBarStyle = UIApplication.SharedApplication.StatusBarStyle; UIApplication.SharedApplication.SetStatusBarStyle(UIStatusBarStyle.BlackTranslucent, false); Console.WriteLine("Starting to scan..."); _scannerView.StartScanning(_controller.ScanningOptions, OnScanCompletion); }
/// <summary> /// Sets the visual style for the status bar. /// </summary> /// <param name="statusBarStyle">The status bar style.</param> public void SetStatusBarStyle(StatusBarStyle statusBarStyle) { UIStatusBarStyle status = UIStatusBarStyle.Default; if (statusBarStyle == StatusBarStyle.Light) { status = UIStatusBarStyle.LightContent; } UIApplication.SharedApplication.SetStatusBarStyle(status, true); }
private void UpdateStatusBar(bool animated = false) { _previousStyle = UIKit.UIApplication.SharedApplication.StatusBarStyle; // https://stackoverflow.com/questions/2509443/check-if-uicolor-is-dark-or-bright BackgroundPromptColor.GetRGBA(out var r, out var g, out var b, out var a); var luminosityThingo = ((r * 255 * 299) + (g * 255 * 587) + (b * 255 * 114)) / 1000.0; //below 125 = use white UIKit.UIApplication.SharedApplication.SetStatusBarStyle( luminosityThingo < 125 ? UIKit.UIStatusBarStyle.LightContent : UIKit.UIStatusBarStyle.Default, animated); }
static Media() { Thread.UI.Run(() => { try { StatusBarStyle = UIApplication.SharedApplication.StatusBarStyle; } catch { StatusBarStyle = UIStatusBarStyle.Default; } }); }
/// <summary> /// Implementation /// </summary> public MediaImplementation() { StatusBarStyle = UIApplication.SharedApplication.StatusBarStyle; IsCameraAvailable = UIImagePickerController.IsSourceTypeAvailable(UIImagePickerControllerSourceType.Camera); var availableCameraMedia = UIImagePickerController.AvailableMediaTypes(UIImagePickerControllerSourceType.Camera) ?? new string[0]; var avaialbleLibraryMedia = UIImagePickerController.AvailableMediaTypes(UIImagePickerControllerSourceType.PhotoLibrary) ?? new string[0]; foreach (string type in availableCameraMedia.Concat(avaialbleLibraryMedia)) { if (type == TypeMovie) IsTakeVideoSupported = IsPickVideoSupported = true; else if (type == TypeImage) IsTakePhotoSupported = IsPickPhotoSupported = true; } }
public override void ViewWillAppear(bool animated) { base.ViewWillAppear(animated); _statusBarStyle = UIApplication.SharedApplication.StatusBarStyle; UIApplication.SharedApplication.SetStatusBarStyle(UIStatusBarStyle.Default, animated); if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Phone) { if (UIApplication.SharedApplication.StatusBarOrientation == UIInterfaceOrientation.LandscapeLeft || UIApplication.SharedApplication.StatusBarOrientation == UIInterfaceOrientation.LandscapeRight) { UIApplication.SharedApplication.SetStatusBarHidden(true, UIStatusBarAnimation.Slide); } } }
public override UIStatusBarStyle PreferredStatusBarStyle() { UIStatusBarStyle statusBarStyle = UIStatusBarStyle.Default; if (_ios7) { statusBarStyle = Visible ? base.PreferredStatusBarStyle() : _contentViewController.PreferredStatusBarStyle(); if (_contentViewContainer.Frame.Location.Y > 10) { statusBarStyle = base.PreferredStatusBarStyle(); } else { statusBarStyle = _contentViewController.PreferredStatusBarStyle(); } } return(statusBarStyle); }
/// <summary> /// Implementation /// </summary> public MediaImplementation() { StatusBarStyle = UIApplication.SharedApplication.StatusBarStyle; IsCameraAvailable = UIImagePickerController.IsSourceTypeAvailable(UIImagePickerControllerSourceType.Camera); var availableCameraMedia = UIImagePickerController.AvailableMediaTypes(UIImagePickerControllerSourceType.Camera) ?? new string[0]; var avaialbleLibraryMedia = UIImagePickerController.AvailableMediaTypes(UIImagePickerControllerSourceType.PhotoLibrary) ?? new string[0]; foreach (string type in availableCameraMedia.Concat(avaialbleLibraryMedia)) { if (type == TypeMovie) { IsTakeVideoSupported = IsPickVideoSupported = true; } else if (type == TypeImage) { IsTakePhotoSupported = IsPickPhotoSupported = true; } } }
public override void ViewDidAppear(bool animated) { originalStatusBarStyle = UIApplication.SharedApplication.StatusBarStyle; UIApplication.SharedApplication.SetStatusBarStyle(UIStatusBarStyle.BlackTranslucent, false); Console.WriteLine("Starting to scan..."); scannerView.StartScanning(this.ScanningOptions, result => { Console.WriteLine("Stopping scan..."); scannerView.StopScanning(); var evt = this.OnScannedResult; if (evt != null) { evt(result); } }); }
public override void ViewDidAppear (bool animated) { originalStatusBarStyle = UIApplication.SharedApplication.StatusBarStyle; UIApplication.SharedApplication.SetStatusBarStyle(UIStatusBarStyle.BlackTranslucent, false); Console.WriteLine("Starting to scan..."); scannerView.StartScanning(this.ScanningOptions, result => { Console.WriteLine("Stopping scan..."); scannerView.StopScanning(); var evt = this.OnScannedResult; if (evt != null) evt(result); }); }
/// <summary> /// Implementation /// </summary> public Media() { StatusBarStyle = UIApplication.SharedApplication.StatusBarStyle; _IsCameraAvailable = UIImagePickerController.IsSourceTypeAvailable(UIImagePickerControllerSourceType.Camera); var availableCameraMedia = UIImagePickerController.AvailableMediaTypes(UIImagePickerControllerSourceType.Camera) ?? new string[0]; var avaialbleLibraryMedia = UIImagePickerController.AvailableMediaTypes(UIImagePickerControllerSourceType.PhotoLibrary) ?? new string[0]; foreach (var type in availableCameraMedia.Concat(avaialbleLibraryMedia)) { switch (type) { case TypeMovie: IsTakeVideoSupported = IsPickVideoSupported = true; break; case TypeImage: IsTakePhotoSupported = IsPickPhotoSupported = true; break; } } }
public void ResetToDefaults() { statusBarStyle = colorTheme.StatusBarStyle; screenTitleColor = colorTheme.ScreenTitleColor; mainGradientStartColor = colorTheme.MainGradientStartColor; mainGradientEndColor = colorTheme.MainGradientEndColor; mainSaturatedColor = colorTheme.MainSaturatedColor; disabledButtonColor = colorTheme.DisabledButtonColor; titleTextColor = colorTheme.TitleTextColor; descriptionDimmedColor = colorTheme.DescriptionDimmedColor; backgroundColor = colorTheme.BackgroundColor; navigationBarButtonColor = colorTheme.NavigationBarButtonColor; friendNameColor = colorTheme.FriendNameColor; lastMessageTextColor = colorTheme.LastMessageTextColor; dateMessageLabelColor = colorTheme.DateMessageLabelColor; conversationSelectedCellColor = colorTheme.ConversationSelectedCellColor; incomingBubbleStroke = colorTheme.IncomingBubbleStroke; incomingTextColor = colorTheme.IncomingTextColor; outgoingTextColor = colorTheme.OutgoingTextColor; outgoingBubbleColor = colorTheme.OutgoingBubbleColor; badgeTitleColor = colorTheme.BadgeTitleColor; screenTitleFont = fontTheme.ScreenTitleFont; navigationButtonTitleFont = fontTheme.NavigationButtonTitleFont; sausageContrinueButtonFont = fontTheme.SausageContrinueButtonFont; sausageSwitchIdentityButtonFont = fontTheme.SausageSwitchIdentityButtonFont; tabBarItemTitle = fontTheme.TabBarItemTitle; friendNameFont = fontTheme.FriendNameFont; lastMessageTextFont = fontTheme.LastMessageTextFont; dateMessageLabelFont = fontTheme.DateMessageLabelFont; messageFont = fontTheme.MessageFont; textTitleFont = fontTheme.TextTitleFont; badgeValueFont = fontTheme.BadgeValueFont; IsDirty = false; RaiseThemeChanged(this); }
/* * public override void ViewDidUnload () * { * base.ViewDidUnload (); * * // Clear any references to subviews of the main view in order to * // allow the Garbage Collector to collect them sooner. * // * // e.g. myOutlet.Dispose (); myOutlet = null; * * ReleaseDesignerOutlets (); * } */ public override UIStatusBarStyle PreferredStatusBarStyle() { UIStatusBarStyle statusBarStyle = UIStatusBarStyle.Default; try { var myStatusBarStyle = NSBundle.MainBundle.ObjectForInfoDictionary("Appverse_StatusBarStyle"); NSString myStatusBarStyleNSString = new NSString("dark"); if (myStatusBarStyle != null) { if (myStatusBarStyle is NSString) { myStatusBarStyleNSString = (NSString)myStatusBarStyle; #if DEBUG log("Preferred StatusBar Style: " + myStatusBarStyleNSString); #endif } if (myStatusBarStyleNSString != null && myStatusBarStyleNSString.Equals(new NSString("light"))) { #if DEBUG log("Preferred StatusBar Style: " + myStatusBarStyleNSString + ", applying light content status bar style"); #endif statusBarStyle = UIStatusBarStyle.LightContent; // Content in the status bar is drawn with light values. Preferable for use wth darker-colored content views. } else { #if DEBUG log("Preferred StatusBar Style: " + myStatusBarStyleNSString + ", applying default status bar style (dark)"); #endif } } } catch (Exception ex) { #if DEBUG log("Exception getting 'Appverse_StatusBarStyle' from application preferences: " + ex.Message); #endif } return(statusBarStyle); }
Task <FileData> TakeMedia(bool p_isPhoto, CapturePhotoOptions p_options) { StatusBarStyle = UIApplication.SharedApplication.StatusBarStyle; var viewController = GetHostViewController(); var ndelegate = new CaptureDelegate(); var od = Interlocked.CompareExchange(ref _pickerDelegate, ndelegate, null); if (od != null) { throw new InvalidOperationException("同一时间只可激活一次"); } var view = new CaptureController(ndelegate); view.MediaTypes = new[] { p_isPhoto ? "public.image" : "public.movie" }; view.SourceType = UIImagePickerControllerSourceType.Camera; view.CameraDevice = p_options.UseFrontCamera ? UIImagePickerControllerCameraDevice.Front : UIImagePickerControllerCameraDevice.Rear; view.AllowsEditing = p_options.AllowCropping; if (p_isPhoto) { view.CameraCaptureMode = UIImagePickerControllerCameraCaptureMode.Photo; } else if (p_options is CaptureVideoOptions voptions) { view.CameraCaptureMode = UIImagePickerControllerCameraCaptureMode.Video; view.VideoQuality = (voptions.VideoQuality == 0) ? UIImagePickerControllerQualityType.Low : UIImagePickerControllerQualityType.High; view.VideoMaximumDuration = voptions.DesiredLength.TotalSeconds; } viewController.PresentViewController(view, true, null); return(ndelegate.Task.ContinueWith(t => { Dismiss(view); return t.Result; })); }
protected override void DisplayLoginPage(Uri uri) { Assert.State(_controller).IsNull("Login page still displaying another page"); _controller = new SFSafariViewController(uri, false); var loginPageDelegate = new LoginPageDelgate(this); loginPageDelegate.OnFinish = ResetStatusBarStyle; _controller.Delegate = loginPageDelegate; UIViewController root = _root; if (root == null) { root = UIApplication.SharedApplication.KeyWindow.RootViewController; } if (root == null) { throw new InvalidOperationException("Cannot display login page - " + "no root view controller specified and " + "there is no displayed window or " + "displayed window does not have root view controller"); } //Find topmost modal dialog to present login page while (root.PresentedViewController != null && root != root.PresentedViewController && !root.PresentedViewController.IsBeingDismissed) { root = root.PresentedViewController; } _lastStatusBarStyle = UIApplication.SharedApplication.StatusBarStyle; _controller.ModalPresentationStyle = UIModalPresentationStyle.Popover; root.PresentViewController(_controller, true, null); UIApplication.SharedApplication.StatusBarStyle = UIStatusBarStyle.Default; }
public override void ViewWillAppear(bool animated) { base.ViewWillAppear(animated); _previousStatusbarStyle = UIApplication.SharedApplication.StatusBarStyle; UIApplication.SharedApplication.SetStatusBarStyle(UIStatusBarStyle.Default, false); }
public override void ViewDidAppear (bool animated) { scannerView.OnScannerSetupComplete += HandleOnScannerSetupComplete; originalStatusBarStyle = UIApplication.SharedApplication.StatusBarStyle; if (UIDevice.CurrentDevice.CheckSystemVersion (7, 0)) { UIApplication.SharedApplication.StatusBarStyle = UIStatusBarStyle.Default; SetNeedsStatusBarAppearanceUpdate (); } else UIApplication.SharedApplication.SetStatusBarStyle(UIStatusBarStyle.BlackTranslucent, false); Console.WriteLine("Starting to scan..."); Task.Factory.StartNew (() => { BeginInvokeOnMainThread(() => scannerView.StartScanning (this.ScanningOptions, result => { Console.WriteLine ("Stopping scan..."); scannerView.StopScanning (); var evt = this.OnScannedResult; if (evt != null) evt (result); })); }); }
protected override void OnElementChanged(VisualElementChangedEventArgs e) { _barStyle = ((CustomContentPage)e.NewElement).IsUseDefaultBarStyle ? UIStatusBarStyle.Default : UIStatusBarStyle.LightContent; _barColor = ((CustomContentPage)e.NewElement).NavigationBarColor; }
public ViewClient(WKWebView webView) { _statusBarStyle = UIStatusBarStyle.Default; _webView = webView; }
public void HideSplashScreen() { _statusBarStyle = UIStatusBarStyle.LightContent; _webView.Hidden = false; SetNeedsStatusBarAppearanceUpdate(); }
public void SetColorSchemeForStatusBarStyle(UIStatusBarStyle style, MessageType messageType) { // gray status bar? // on iPad the Default Status Bar Style is black too if (style == UIStatusBarStyle.Default && !IsIPad && !_isIPhoneEmulationMode) { // set color of labels depending on messageType switch (messageType) { case MessageType.Finish: StatusLabel1.TextColor = _lightThemeFinishedMessageTextColor; StatusLabel2.TextColor = _lightThemeFinishedMessageTextColor; FinishedLabel.TextColor = _lightThemeFinishedMessageTextColor; StatusLabel1.ShadowColor = _lightThemeFinishedMessageShadowColor; StatusLabel2.ShadowColor = _lightThemeFinishedMessageShadowColor; FinishedLabel.ShadowColor = _lightThemeFinishedMessageShadowColor; break; case MessageType.Error: StatusLabel1.TextColor = _lightThemeErrorMessageTextColor; StatusLabel2.TextColor = _lightThemeErrorMessageTextColor; FinishedLabel.TextColor = _lightThemeErrorMessageTextColor; StatusLabel1.ShadowColor = _lightThemeErrorMessageShadowColor; StatusLabel2.ShadowColor = _lightThemeErrorMessageShadowColor; FinishedLabel.ShadowColor = _lightThemeErrorMessageShadowColor; break; default: StatusLabel1.TextColor = _lightThemeTextColor; StatusLabel2.TextColor = _lightThemeTextColor; FinishedLabel.TextColor = _lightThemeTextColor; StatusLabel1.ShadowColor = _lightThemeShadowColor; StatusLabel2.ShadowColor = _lightThemeShadowColor; FinishedLabel.ShadowColor = _lightThemeShadowColor; break; } ActivityIndicator.ActivityIndicatorViewStyle = LightThemeActivityIndicatorViewStyle; if (ActivityIndicator.RespondsToSelector(new Selector("setColor:"))) { ActivityIndicator.Color = _lightThemeTextColor; } DetailView.BackgroundColor = _lightThemeDetailViewBackgroundColor; DetailView.Layer.BorderColor = _lightThemeDetailViewBorderColor.CGColor; HistoryTableView.SeparatorColor = _lightThemeDetailViewBorderColor; DetailTextView.TextColor = _lightThemeHistoryTextColor; ProgressView.BackgroundColor = UIColor.Clear; //) clearColor]; ProgressView.Image = DefaultStatusBarImageShrinked.StretchableImage(2, 0); } else { // set color of labels depending on messageType switch (messageType) { case MessageType.Finish: StatusLabel1.TextColor = _darkThemeFinishedMessageTextColor; StatusLabel2.TextColor = _darkThemeFinishedMessageTextColor; FinishedLabel.TextColor = _darkThemeFinishedMessageTextColor; break; case MessageType.Error: StatusLabel1.TextColor = _darkThemeErrorMessageTextColor; StatusLabel2.TextColor = _darkThemeErrorMessageTextColor; FinishedLabel.TextColor = _darkThemeErrorMessageTextColor; break; default: StatusLabel1.TextColor = _darkThemeTextColor; StatusLabel2.TextColor = _darkThemeTextColor; FinishedLabel.TextColor = _darkThemeTextColor; break; } /* StatusLabel1.ShadowColor = null; StatusLabel2.ShadowColor = null; FinishedLabel.ShadowColor = null; */ ActivityIndicator.ActivityIndicatorViewStyle = DarkThemeActivityIndicatorViewStyle; if (ActivityIndicator.RespondsToSelector(new Selector("setColor:"))) { ActivityIndicator.Color = null; } DetailView.BackgroundColor = _darkThemeDetailViewBackgroundColor; DetailView.Layer.BorderColor = _darkThemeDetailViewBorderColor.CGColor; HistoryTableView.SeparatorColor = _darkThemeDetailViewBorderColor; DetailTextView.TextColor = _darkThemeHistoryTextColor; ProgressView.BackgroundColor = ProgressViewBackgroundColor; ProgressView.Image = null; } }
public void ResetToDefaults() { statusBarStyle = colorTheme.StatusBarStyle; screenTitleColor = colorTheme.ScreenTitleColor; mainGradientStartColor = colorTheme.MainGradientStartColor; mainGradientEndColor = colorTheme.MainGradientEndColor; mainSaturatedColor = colorTheme.MainSaturatedColor; disabledButtonColor = colorTheme.DisabledButtonColor; titleTextColor = colorTheme.TitleTextColor; descriptionDimmedColor = colorTheme.DescriptionDimmedColor; backgroundColor = colorTheme.BackgroundColor; navigationBarButtonColor = colorTheme.NavigationBarButtonColor; friendNameColor = colorTheme.FriendNameColor; lastMessageTextColor = colorTheme.LastMessageTextColor; dateMessageLabelColor = colorTheme.DateMessageLabelColor; conversationSelectedCellColor = colorTheme.ConversationSelectedCellColor; incomingBubbleStroke = colorTheme.IncomingBubbleStroke; incomingTextColor = colorTheme.IncomingTextColor; outgoingTextColor = colorTheme.OutgoingTextColor; outgoingBubbleColor = colorTheme.OutgoingBubbleColor; badgeTitleColor = colorTheme.BadgeTitleColor; screenTitleFont = fontTheme.ScreenTitleFont; navigationButtonTitleFont = fontTheme.NavigationButtonTitleFont; sausageContrinueButtonFont = fontTheme.SausageContrinueButtonFont; sausageSwitchIdentityButtonFont = fontTheme.SausageSwitchIdentityButtonFont; tabBarItemTitle = fontTheme.TabBarItemTitle; friendNameFont = fontTheme.FriendNameFont; lastMessageTextFont = fontTheme.LastMessageTextFont; dateMessageLabelFont = fontTheme.DateMessageLabelFont; messageFont = fontTheme.MessageFont; textTitleFont = fontTheme.TextTitleFont; badgeValueFont = fontTheme.BadgeValueFont; IsDirty = false; RaiseThemeChanged (this); }
public virtual void SetStatusBarStyle(UIStatusBarStyle statusBarStyle, bool animated) { }
public override void ViewDidAppear (bool animated) { originalStatusBarStyle = UIApplication.SharedApplication.StatusBarStyle; if (UIDevice.CurrentDevice.CheckSystemVersion (7, 0)) { UIApplication.SharedApplication.StatusBarStyle = UIStatusBarStyle.Default; SetNeedsStatusBarAppearanceUpdate (); } else UIApplication.SharedApplication.SetStatusBarStyle(UIStatusBarStyle.BlackTranslucent, false); Console.WriteLine("Starting to scan..."); scannerView.StartScanning(this.ScanningOptions, result => { if (!ContinuousScanning) { Console.WriteLine("Stopping scan..."); scannerView.StopScanning(); } var evt = this.OnScannedResult; if (evt != null) evt(result); }); }
public static void SetStatusBarStyle(this UINavigationController This, UIStatusBarStyle statusBarStyle) { This.SetStatusBarStyle((StatusBarStyle)statusBarStyle); }
public static void SetStatusBarStyle(UINavigationController navigationController, UIStatusBarStyle value) { Device.StatusBarStyle = value; }
//////////////////////////////////////////////////////////////////////// // Private Methods //////////////////////////////////////////////////////////////////////// public void SetStatusBarBackgroundForStyle(UIStatusBarStyle style) { // gray status bar? // on iPad the Default Status Bar Style is black too if (style == UIStatusBarStyle.Default && !IsIPad && !_isIPhoneEmulationMode) { // choose image depending on size StatusBarBackgroundImageView.Image = Shrinked ? DefaultStatusBarImageShrinked.StretchableImage(2, 0) : DefaultStatusBarImage.StretchableImage(2, 0); StatusBarBackgroundImageView.BackgroundColor = UIColor.Clear; } // black status bar? -> no image else { StatusBarBackgroundImageView.Image = null; StatusBarBackgroundImageView.BackgroundColor = UIColor.Black; } }