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 } }
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); }
public void ApplyToMain(MainTitleBar control) { control.BackColor = darkColor; control.ForeColor = foreColor; }