/// <summary> /// Create clone of me. /// </summary> /// <returns></returns> public ThemeProfile Clone() { return(new ThemeProfile { Name = Name, GlobalFont = this.GlobalFont.Clone(), BaseColor = BaseColor.Clone(), GlobalKeyColor = GlobalKeyColor, TitleBarColor = TitleBarColor.Clone(), BackstageColor = BackstageColor.Clone(), AccountSelectionFlipColor = AccountSelectionFlipColor.Clone(), SearchFlipColor = SearchFlipColor.Clone(), UserFlipColor = UserFlipColor.Clone(), TabColor = this.TabColor.Clone(), TweetDefaultColor = this.TweetDefaultColor.Clone(), TweetMyselfColor = this.TweetMyselfColor.Clone(), TweetMentionColor = this.TweetMentionColor.Clone(), TweetRetweetColor = this.TweetRetweetColor.Clone(), TweetDirectMessageColor = this.TweetDirectMessageColor.Clone() }); }
/// <summary> /// Create theme resource dictionary for adding WPF Theme System /// </summary> /// <returns>configured resource dictionary</returns> public ResourceDictionary CreateResourceDictionary() { var dict = new ResourceDictionary(); // Font resource GlobalFont.ConfigureResourceDictionary(dict, "Font"); BaseColor.ConfigureResourceDictionary(dict, "BaseColor"); GlobalKeyColor.ConfigureResourceDictionary(dict, "GlobalKey"); TitleBarColor.ConfigureResourceDictionary(dict, "TitleBar"); BackstageColor.ConfigureResourceDictionary(dict, "Backstage"); AccountSelectionFlipColor.ConfigureResourceDictionary(dict, "AccountSelectionFlip"); SearchFlipColor.ConfigureResourceDictionary(dict, "SearchFlip"); UserFlipColor.ConfigureResourceDictionary(dict, "UserFlip"); TabColor.ConfigureResourceDictionary(dict, "Tab"); TweetDefaultColor.ConfigureResourceDictionary(dict, "TweetDefault"); TweetMyselfColor.ConfigureResourceDictionary(dict, "TweetMyself"); TweetMentionColor.ConfigureResourceDictionary(dict, "TweetMention"); TweetRetweetColor.ConfigureResourceDictionary(dict, "TweetRetweet"); TweetDirectMessageColor.ConfigureResourceDictionary(dict, "TweetMessage"); return(dict); }
private void Draw(SpriteBatch s) { if (Visible && Enabled) { if (ShowTitleBar) { s.Draw(TitleTexture, new Rectangle(Location.X, Location.Y, Size.Width, TitleBarHeight), TitleBarColor.ToXnaColor()); s.Draw(BackgroundTexture, new Rectangle(Location.X, Location.Y + TitleBarHeight, Size.Width, Size.Height - TitleBarHeight), BackColor.ToXnaColor()); } else { s.Draw(BackgroundTexture, new Rectangle(Location.X, Location.Y, Size.Width, Size.Height), BackColor.ToXnaColor()); } foreach (var c in Controls) { var drawableControl = c as IDrawableControl; if (drawableControl == null) { continue; } if (ShowTitleBar) { drawableControl.Draw(s, new EFD.Point(Location.X, Location.Y + TitleBarHeight)); } else { drawableControl.Draw(s, Location); } } } }