Ejemplo n.º 1
0
        private Brush FindForeground()
        {
            Brush foreground = HighlightForeground;

            if (foreground == null)
            {
                foreground = Foreground;
            }

            if (foreground == null)
            {
                ChatMessageCallout callout = this.FindParent <ChatMessageCallout>();
                if (callout != null)
                {
                    foreground = callout.Foreground;
                }
            }

            if (foreground == null)
            {
                foreground = TryFindResource("ForegroundBrush") as SolidColorBrush;
            }
            return(foreground);
        }
Ejemplo n.º 2
0
        private Brush FindBackground()
        {
            Brush background = HighlightBackground;

            if (background == null)
            {
                background = Background;
            }

            if (background == null)
            {
                ChatMessageCallout callout = this.FindParent <ChatMessageCallout>();
                if (callout != null)
                {
                    background = callout.Background;
                }
            }

            if (background == null)
            {
                background = TryFindResource("ChatMessageCalloutNormalBackgroundBrush") as SolidColorBrush;
            }
            return(background);
        }