protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { ListBox_News.SelectedIndex = -1; SystemTray.SetBackgroundColor(this, Color.FromArgb(255, 24, 22, 22)); SystemTray.SetForegroundColor(this, Color.FromArgb(255, 255, 255, 254)); base.OnNavigatedTo(e); }
private void SetSystemComponentColors(PhoneApplicationPage page, Color background, Color foreground, Color chrome) { if (page != null) { // Corrects the issue where white foreground text and the // light theme on the phone will then have invisible // progress indicator text. Color systemTrayForeground = foreground; if (Colors.White == foreground && _themeAtStartup == Theme.Light) { systemTrayForeground = AlmostWhite; } SystemTray.SetBackgroundColor(page, background); SystemTray.SetForegroundColor(page, systemTrayForeground); if (OverrideOptions == ThemeManagerOverrideOptions.SystemTrayAndApplicationBars) { var appBar = page.ApplicationBar as IApplicationBar; if (appBar != null) { appBar.MatchOverriddenTheme(); } } } }
public SettingsPage() { InitializeComponent(); prog = new ProgressIndicator(); prog.IsVisible = true; SystemTray.SetProgressIndicator(this, prog); SystemTray.SetForegroundColor(this, App.Foreground_Color); SystemTray.SetBackgroundColor(this, Color.FromArgb(255, 101, 159, 130)); }
public static void Show(string msj, bool showProgress = true) { Progress.Text = msj; Progress.IsIndeterminate = showProgress; SystemTray.SetIsVisible(UIElement, true); SystemTray.SetProgressIndicator(UIElement, Progress); SystemTray.SetBackgroundColor(UIElement, ColorTranslator.FromHtml("#10283a")); SystemTray.SetForegroundColor(UIElement, ColorTranslator.FromHtml("#FFFFFF")); }
public Register() { InitializeComponent(); prog = new ProgressIndicator(); prog.IsVisible = true; SystemTray.SetProgressIndicator(this, prog); SystemTray.SetBackgroundColor(this, Color.FromArgb(225, 220, 84, 82)); SystemTray.SetForegroundColor(this, Colors.White); }
/// <summary> /// Fancy UI to show progress of downloading map /// </summary> private void InitializeProgressIndicator() { SystemTray.SetIsVisible(this, true); SystemTray.SetOpacity(this, 0.5); SystemTray.SetBackgroundColor(this, Colors.Black); SystemTray.SetForegroundColor(this, Colors.White); prog = new ProgressIndicator(); prog.IsIndeterminate = true; prog.IsVisible = true; SystemTray.SetProgressIndicator(this, prog); }
public ComposeEmail() { InitializeComponent(); prog = new ProgressIndicator(); prog.IsVisible = true; prog.Text = "Contacts"; SystemTray.SetForegroundColor(this, App.Foreground_Color); SystemTray.SetBackgroundColor(this, Color.FromArgb(255, 62, 186, 210)); SystemTray.SetProgressIndicator(this, prog); }
public UserPage() { InitializeComponent(); prog = new ProgressIndicator(); prog.IsVisible = true; SystemTray.SetProgressIndicator(this, prog); SystemTray.SetForegroundColor(this, Colors.White); SystemTray.SetBackgroundColor(this, Color.FromArgb(255, 50, 58, 69)); item = new ContactModel(); }
// Konstruktor public MainPage() { InitializeComponent(); String titel = "CWS Informant"; #if LEHRER titel += " Lehrer"; #endif #if DEBUG titel += " BETA"; #endif Pano.Title = titel; _pi = new ProgressIndicator { IsVisible = true, IsIndeterminate = true, Text = "Vertretungen werden aktualisiert" }; SystemTray.SetProgressIndicator(this, _pi); SystemTray.SetBackgroundColor(this, Color.FromArgb(225, 0, 31, 63)); SystemTray.SetForegroundColor(this, Color.FromArgb(225, 221, 221, 221)); _fetcher = new Fetcher(); _fetcher.RaiseErrorMessage += (sender, e) => { Alert(e.MessageHead, e.MessageBody, e.MessageButton); }; _fetcher.RaiseRetreivedScheduleItems += (sender, e) => { Refresh(e.Schedule); }; if (_settings.Read("oldDb1") != null) { _vertr1 = (ObservableCollection <Data>)_settings.Read("oldDb1"); } else { _vertr1.Add(new Data()); } if (_settings.Read("oldDb2") != null) { _vertr2 = (ObservableCollection <Data>)_settings.Read("oldDb2"); } if (_settings.Read("oldDb1Tit") != null) { Agenda1.Header = (String)_settings.Read("oldDb1Tit"); } if (_settings.Read("oldDb2Tit") != null) { Agenda2.Header = (String)_settings.Read("oldDb2Tit"); } SetPanoItems(); }
public SearchPage() { InitializeComponent(); ContactList.DataContext = App.ViewModel.ContactItems; settings = new AppSettings(); settings.SearchItem = "Full Name"; txtNarrower.WatermarkText = "Narrow your search for: " + settings.SearchItem; tmpCollection = new List <ContactModel>(); SystemTray.SetForegroundColor(this, App.Foreground_Color); SystemTray.SetBackgroundColor(this, App.Background_Color); }
private void OnRootFrameNavigated(object sender, NavigationEventArgs e) { // Use in Mango to share a single progress indicator instance. var ee = e.Content; _page = ee as PhoneApplicationPage; if (_page != null) { SystemTray.SetBackgroundColor(_page, Color.FromArgb(255, 240, 249, 255)); SystemTray.SetForegroundColor(_page, Color.FromArgb(255, 31, 117, 204)); _page.SetValue(SystemTray.OpacityProperty, 0.99); _page.SetValue(SystemTray.ProgressIndicatorProperty, _mangoIndicator); } }
public MainPage() { InitializeComponent(); // Set the data context of the LongListSelector control to the sample data DataContext = App.ViewModel; Color currentAccentColorHex = (Color)Application.Current.Resources["PhoneAccentColor"]; SystemTray.SetBackgroundColor(this, Color.FromArgb(255, 202, 98, 89)); SystemTray.SetForegroundColor(this, Colors.White); // Sample code to localize the ApplicationBar //BuildLocalizedApplicationBar(); }
public void Set(Color?bg, Color?fg, double?op) { if (bg.HasValue) { SystemTray.SetBackgroundColor(managedPage, bg.Value); } if (fg.HasValue) { SystemTray.SetForegroundColor(managedPage, fg.Value); } if (op.HasValue) { SystemTray.SetOpacity(managedPage, op.Value); } }
private void SetSystemComponentColors(PhoneApplicationPage page, Color background, Color foreground, Color chrome) { if (page != null) { SystemTray.SetBackgroundColor(page, background); SystemTray.SetForegroundColor(page, foreground); if (OverrideOptions == ThemeManagerOverrideOptions.SystemTrayAndApplicationBars) { var appBar = page.ApplicationBar as IApplicationBar; if (appBar != null) { appBar.MatchOverriddenTheme(); } } } }
public MainPage() { InitializeComponent(); App.FirstVisit = true; SetGlobalColors(); InitAppBars(); recentList.ItemsSource = App.RecentList; prog = new ProgressIndicator(); prog.IsVisible = true; SystemTray.SetForegroundColor(this, App.Foreground_Color); SystemTray.SetBackgroundColor(this, App.Background_Color); SystemTray.SetProgressIndicator(this, prog); settings = new AppSettings(); ModelView model = new ModelView(); App.ViewModel = model; }
void activateProgressIndicator() { // In theory, you should not need to use Dispatcher here with async/await. // But without a complete code example, it's impossible for me to // say for sure, so I've left it as-is. Deployment.Current.Dispatcher.BeginInvoke(() => { var currentPage = App.RootFrame.Content as PhoneApplicationPage; SystemTray.SetIsVisible(currentPage, true); SystemTray.SetOpacity(currentPage, 0.5); SystemTray.SetBackgroundColor(currentPage, Colors.White); SystemTray.SetForegroundColor(currentPage, Colors.Black); progressIndicator = new ProgressIndicator(); progressIndicator.IsVisible = true; progressIndicator.IsIndeterminate = true; progressIndicator.Text = message; SystemTray.SetProgressIndicator(currentPage, progressIndicator); }); }
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { SystemTray.SetBackgroundColor(this, Color.FromArgb(255, 24, 22, 22)); SystemTray.SetForegroundColor(this, Color.FromArgb(255, 255, 255, 254)); base.OnNavigatedTo(e); string id = ""; if (NavigationContext.QueryString.TryGetValue("id", out id)) { _vm = new NewsPageViewModel { News = App.MainViewModel.NewsPage.NewsList.Where(n => n.Model.Id == id).FirstOrDefault() }; if (_vm == null) { MessageBox.Show("Error", "Can't find news", MessageBoxButton.OK); NavigationService.GoBack(); } _vm.PropertyChanged += _vm_PropertyChanged; _vm.Load(id); } DataContext = _vm; }
public Login() { prog = new ProgressIndicator(); prog.IsVisible = true; InitializeComponent(); if (App.User == null) { //string result = ServiceManager.DecryptPasscode("Bread"); // if (result != null) //{ // prog.Text = "Signing In..."; // SignUserIn(null, null, result); // SignedIn = true; //} } #region SystemTray SystemTray.SetForegroundColor(this, Colors.White); SystemTray.SetBackgroundColor(this, Color.FromArgb(255, 49, 134, 179)); SystemTray.SetProgressIndicator(this, prog); #endregion }
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { base.OnNavigatedTo(e); SystemTray.SetForegroundColor(this, (Color)App.Current.Resources["PhoneForegroundColor"]); }
// Constructor public MainPage() { InitializeComponent(); #region trial Check if (App.IsTrial == true) { // enable ads adControl.Visibility = System.Windows.Visibility.Visible; //adControl.IsAutoRefreshEnabled = true; adControl.IsEnabled = true; adControl.IsAutoCollapseEnabled = false; } else { // disables ads adControl.Visibility = System.Windows.Visibility.Collapsed; //adControl.IsAutoRefreshEnabled = false; adControl.IsEnabled = false; adControl.IsAutoCollapseEnabled = false; } #endregion OrientationChanged += new EventHandler <OrientationChangedEventArgs>(MainPage_OrientationChanged); // initially check PageOrientation po = this.Orientation; if (po == PageOrientation.Portrait || po == PageOrientation.PortraitDown || po == PageOrientation.PortraitUp) { // return pivot to original position MapHeight = 800; MainPivot.Margin = new Thickness(0, 125, 0, 0); AllPivot.Header = "all"; FreewayPivot.Header = "highways"; RoadPivot.Header = "roads"; // this.ApplicationBar.IsVisible = this.ApplicationBar.IsVisible; } else if (po == PageOrientation.Landscape || po == PageOrientation.LandscapeLeft || po == PageOrientation.LandscapeRight) { // hiding pivot header in landscape mode MapHeight = 480; MainPivot.Margin = new Thickness(0, 30, 0, 0); AllPivot.Header = ""; FreewayPivot.Header = ""; RoadPivot.Header = ""; // this.ApplicationBar.IsVisible = !this.ApplicationBar.IsVisible; } isolatedStorageSettings = IsolatedStorageSettings.ApplicationSettings; // disable lock screen timer Microsoft.Phone.Shell.PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled; // References: // http://weblogs.asp.net/scottgu/archive/2010/03/18/building-a-windows-phone-7-twitter-application-using-silverlight.aspx // http://msdn.microsoft.com/en-us/library/hh441726.aspx // http://json.codeplex.com // Bing Maps REST Services API Reference: http://msdn.microsoft.com/en-us/library/ff701722.aspx // Adding Tile Layers (overlays) http://msdn.microsoft.com/en-us/library/ee681902.aspx wc = new WebClient(); wc.DownloadStringCompleted += new DownloadStringCompletedEventHandler(REST_traffic); //wc.DownloadStringAsync(new Uri("http://dev.virtualearth.net/REST/v1/Traffic/Incidents/37,-105,45,-94?key=" + Id)); // caching Current_Location.CacheMode = new BitmapCache(); mMap.ZoomLevel = 10; //mMap.ZoomBarVisibility = System.Windows.Visibility.Visible; Current_Location.Style = (Style)(Application.Current.Resources["PushpinStyle"]); Current_Location.PositionOrigin = PositionOrigin.Center; MyPreviousLocation.X = 0; MyPreviousLocation.Y = 0; #region Progress Indicator SystemTray.SetIsVisible(this, true); SystemTray.SetOpacity(this, 0.5); SystemTray.SetBackgroundColor(this, Colors.Black); SystemTray.SetForegroundColor(this, Colors.White); prog = new ProgressIndicator(); prog.IsIndeterminate = true; prog.IsVisible = true; SystemTray.SetProgressIndicator(this, prog); #endregion }
public async void Redraw() { if (!_isLoaded) { return; } using (await BusyOverlay.Create()) { await _event.WaitAsync(); _pageManipulationListener = InitializePageManipulationListener(); _textManipulationListener = InitializeTextManipulationListener(); ManipulationService.SetManipulationListener(PageCanvas, _pageManipulationListener); SystemTray.IsVisible = true; SystemTray.SetForegroundColor(this, AppSettings.Default.ColorScheme.SystemTrayForegroundColor); Background = AppSettings.Default.ColorScheme.BackgroundBrush; SupportedOrientations = AppSettings.Default.Orientation; PageCanvas.Clear(); PageCanvas.SetSize(ActualWidth, ActualHeight, ActualWidth, ActualHeight - AppBar.HeightInMinimizedState); PageCanvas.AddBookmark -= AddBookmark; PageCanvas.AddBookmark += AddBookmark; PageCanvas.Translate -= Translate; PageCanvas.Translate += Translate; PageCanvas.Copy -= Copy; PageCanvas.Copy += Copy; PageCanvas.Share -= ShareText; PageCanvas.Share += ShareText; PageCanvas.Manipulator = new ManipulatorFactory(PageCanvas).CreateManipulator(AppSettings.Default.FlippingStyle, AppSettings.Default.FlippingMode); AppBar.Visibility = Visibility.Visible; AppBar.ApplicationBarMinimizedStateView = AppSettings.Default.HideMenu ? ApplicationBarMinimizedState.Hidden : ApplicationBarMinimizedState.Minimized; AppBar.Background = AppSettings.Default.ColorScheme.ApplicationBarBackgroundBrush; AppBar.SliderForegroundBrush = AppSettings.Default.ColorScheme.ProgressBarBrush; AppBar.PageSelected -= AppBar_PageSelected; AppBar.PageSelected += AppBar_PageSelected; AppBar.PageSelectionCancelled -= AppBarOnPageSelectionCancelled; AppBar.PageSelectionCancelled += AppBarOnPageSelectionCancelled; AppBar.PageSelectionApplied -= AppBarOnPageSelectionApplied; AppBar.PageSelectionApplied += AppBarOnPageSelectionApplied; UpdateFontMenuItemAvailability(); _offsetX = AppSettings.Default.Margin.Left; _offsetY = AppSettings.Default.Margin.Top; Brightness.Opacity = 1 - AppSettings.Default.Brightness / 100f; PageCanvas.Manipulator.TurnForward += () => TurnPage(true); PageCanvas.Manipulator.TurnBackward += () => TurnPage(false); if (!string.IsNullOrEmpty(ViewModel.BookId)) { _data = new BookData(ViewModel.BookId); PageCanvas.Bookmarks = _bookmarkRepository.GetBookmarks(ViewModel.BookId); } await CreateController(); AppBar.IconButtons[1].IsEnabled = _data.HasTableOfContents; UpdateTrayVisibility(); _event.Release(); } }
public void Reset() { SystemTray.SetBackgroundColor(managedPage, background); SystemTray.SetForegroundColor(managedPage, foreground); SystemTray.SetOpacity(managedPage, opacity); }