Ejemplo n.º 1
0
        private void SetColorTheme(ColorThemeEnum colorTheme)
        {
            SetSettingsColor();

            string navViewTextBlockID      = "TextBlock" + colorTheme.ToString() + "Style";
            Style  navViewTextBlockIDStyle = (Style)Application.Current.Resources[navViewTextBlockID];

            string pageID = "Page" + colorTheme.ToString() + "Style";

            MainPagePage.Style = (Style)Application.Current.Resources[pageID];

            foreach (var item in MainPageNavView.MenuItems.OfType <NavigationViewItem>())
            {
                TextBlock contentBlock = (TextBlock)item.Content;
                contentBlock.Style = navViewTextBlockIDStyle;
            }

            /*string navViewSepID = "NavigationViewItemSeparator" + colorTheme.ToString() + "Style";
             * Style navViewSepIDStyle = (Style)Application.Current.Resources[navViewSepID];
             * foreach (var item in MainPageNavView.MenuItems.OfType<NavigationViewItemSeparator>())
             * {
             *  NavigationViewItemSeparator separator = (NavigationViewItemSeparator)item;
             *  //separator.Style = navViewSepIDStyle;
             *  separator.Foreground = new SolidColorBrush(Colors.Red);
             * }*/
            /*string iconElementID = "IconElement" + colorTheme.ToString() + "Style";
             * Style iconElementIDStyle = (Style)Application.Current.Resources[iconElementID];
             * NavigationViewItem navSettingsItem = (NavigationViewItem)MainPageNavView.SettingsItem;
             *
             * navSettingsItem.Icon.Style = iconElementIDStyle;*/

            string       navViewBrushID = colorTheme.ToString() + "Acrylic";
            AcrylicBrush acrylicBrush   = (AcrylicBrush)Application.Current.Resources[navViewBrushID];

            NavViewBackgroundBrush.TintColor = acrylicBrush.TintColor;

            string          appColorBrushID = "AltLow" + colorTheme.ToString();
            SolidColorBrush solidBrush      = (SolidColorBrush)Application.Current.Resources[appColorBrushID];

            Color appColor = solidBrush.Color;

            PointerOverNavViewBrush.Color = appColor;

            Windows.UI.ViewManagement.ApplicationView appView = Windows.UI.ViewManagement.ApplicationView.GetForCurrentView();
            appView.TitleBar.BackgroundColor               = appColor; // or {a: 255, r: 0, g: 0, b: 0}
            appView.TitleBar.InactiveBackgroundColor       = appColor;
            appView.TitleBar.ButtonBackgroundColor         = appColor;
            appView.TitleBar.ButtonHoverBackgroundColor    = appColor;
            appView.TitleBar.ButtonPressedBackgroundColor  = appColor;
            appView.TitleBar.ButtonInactiveBackgroundColor = appColor;
        }
        private void SetColorTheme(ColorThemeEnum colorTheme)
        {
            string textBlockID    = "TextBlock" + colorTheme.ToString() + "Style";
            Style  textBlockStyle = (Style)Application.Current.Resources[textBlockID];

            WaitingTextBlock.Style      = textBlockStyle;
            TradesFormatTextBlock.Style = textBlockStyle;

            string buttonID    = "Button" + colorTheme.ToString() + "Style";
            Style  buttonStyle = (Style)Application.Current.Resources[buttonID];

            BrowseCsvButton.Style      = buttonStyle;
            GenerateRandomButton.Style = buttonStyle;
        }
        private void SetColorTheme(ColorThemeEnum colorTheme)
        {
            string dataGridID    = "DataGrid" + colorTheme.ToString() + "Style";
            Style  dataGridStyle = (Style)Application.Current.Resources[dataGridID];

            AllPositionsDataGrid.Style = dataGridStyle;
        }
Ejemplo n.º 4
0
        private void SetColorTheme(ColorThemeEnum colorTheme)
        {
            string textBlockID    = "TextBlock" + colorTheme.ToString() + "Style";
            Style  textBlockStyle = (Style)Application.Current.Resources[textBlockID];

            LoadingTextBlock.Style = textBlockStyle;
        }
        private void SetColorTheme(ColorThemeEnum colorTheme)
        {
            string sfChartID    = "SfChart" + colorTheme.ToString() + "Style";
            Style  sfChartStyle = (Style)Application.Current.Resources[sfChartID];

            AccountPerformanceChart.Style = sfChartStyle;

            string sfCatAxisID    = "DateAxis" + colorTheme.ToString() + "Style";
            Style  sfCatAxisStyle = (Style)Application.Current.Resources[sfCatAxisID];

            XAxisDateTime.Style = sfCatAxisStyle;

            string sfNumAxisID    = "NumAxis" + colorTheme.ToString() + "Style";
            Style  sfNumAxisStyle = (Style)Application.Current.Resources[sfNumAxisID];

            YAxisNumerical.Style = sfNumAxisStyle;
        }
Ejemplo n.º 6
0
        private void SetColorTheme(ColorThemeEnum colorTheme)
        {
            string textBlockID    = "TextBlock" + colorTheme.ToString() + "Style";
            Style  textBlockStyle = (Style)Application.Current.Resources[textBlockID];

            CurrentPortolioTextBlock.Style  = textBlockStyle;
            MarketValueTextBlock.Style      = textBlockStyle;
            MarketValueLabelTextBlock.Style = textBlockStyle;
            CostBasisTextBlock.Style        = textBlockStyle;
            CostBasisLabelTextBlock.Style   = textBlockStyle;
            PLLabelTextBlock.Style          = textBlockStyle;
            PLTextBlock.Style = textBlockStyle;
            UPLPercentLabelTextBlock.Style = textBlockStyle;
            UPLPercentTextBlock.Style      = textBlockStyle;
            //PriceColumnTextBox.Style = textBlockStyle;
            PricesTextBoxStyle = textBlockStyle;

            /*string textBoxID = "TextBox" + colorTheme.ToString() + "Style";
             * Style textBoxStyle = (Style)Application.Current.Resources[textBoxID];
             * CurrentPositionsDataGrid.Columns[1].CellStyle = textBoxStyle;*/

            string dataGridID    = "DataGrid" + colorTheme.ToString() + "Style";
            Style  dataGridStyle = (Style)Application.Current.Resources[dataGridID];

            CurrentPositionsDataGrid.Style = dataGridStyle;
            AllPositionsDataGrid.Style     = dataGridStyle;

            string sfChartID    = "SfChart" + colorTheme.ToString() + "Style";
            Style  sfChartStyle = (Style)Application.Current.Resources[sfChartID];

            AccountPerformanceChart.Style = sfChartStyle;

            string sfCatAxisID    = "DateAxis" + colorTheme.ToString() + "Style";
            Style  sfCatAxisStyle = (Style)Application.Current.Resources[sfCatAxisID];

            XAxisDateTime.Style = sfCatAxisStyle;

            string sfNumAxisID    = "NumAxis" + colorTheme.ToString() + "Style";
            Style  sfNumAxisStyle = (Style)Application.Current.Resources[sfNumAxisID];

            YAxisNumerical.Style = sfNumAxisStyle;

            string buttonID    = "Button" + colorTheme.ToString() + "Style";
            Style  buttonStyle = (Style)Application.Current.Resources[buttonID];

            BrowseCsvButton.Style = buttonStyle;
        }