Beispiel #1
0
        public override void UpdateTitleBar(TitleBarData data)
        {
            // title-bar background
            if (MainTitleBar != null)
            {
                {
                    System.Reflection.PropertyInfo property = MainTitleBar.GetType().GetProperty("Background");
                    property.SetValue(MainTitleBar, data.TitleBarBackgroundColor ?? defaultMainTitleBarBackground, null);
                }

                // title-bar foreground
                {
                    //System.Reflection.PropertyInfo property = MainTitleBar.GetType().GetProperty("Foreground");
                    //property.SetValue(MainTitleBar, data.TitleBarForegroundColor ?? defaultMainTitleBarForeground, null);
                }
            }

            // title-bar text
            {
                var title = data.TitleBarText ?? defaultMainTitleBarText;
                if (Window.Title != title)
                {
                    Window.Title = title;
                }
            }

            var k = PrimeTitleInfoBlock;

            // title-bar-infos for visual studio 2019
            {
                // something something
            }
        }
Beispiel #2
0
        protected object ModifyTitleBarInfoGrid()
        {
            if (cachedTitleBarInfoGridModified)
            {
                return(null);
            }

            MainTitleBar
            ?.GetElement <ContentControl>("PART_SolutionInfoControlHost")
            ?.GetElement <Grid>()
            ?.WithNotNull(x =>
            {
                x.ColumnDefinitions[1].Width = GridLength.Auto;
                x.ColumnDefinitions.Add(new ColumnDefinition {
                    Width = GridLength.Auto
                });

                cachedTitleBarInfoGridModified = true;
            });

            return(null);
        }
Beispiel #3
0
 public void ApplyToMain(MainTitleBar control)
 {
     control.BackColor = darkColor;
     control.ForeColor = foreColor;
 }