void AttachMarquee(SigMarquee Amarquee = null) { if(Amarquee==null) Amarquee= new SigMarquee(); Marquee = Amarquee; //TextBanner.FontFamily = Marquee.font.Family; TextBanner.FontSize = Marquee.Font.Size; //TextBanner.Foreground = new SolidColorBrush(Marquee.font.ForeColor); TextBanner.FontWeight = Marquee.Font.Weight; //TextBanner.FontStyle = Marquee.font.Style; TextBanner.Text = Marquee.Message; TextBanner.Width = Marquee.IsVerticalFlow ? Marquee.Font.Size : double.NaN; Background = new SolidColorBrush(Marquee.Font.BackColor); if (Marquee.Font.IsGradient) { bkgPlane.Visibility = Visibility.Visible; if (marquee_.IsVerticalFlow) bkgPlane.OpacityMask = Resources["brVBar"] as Brush; else bkgPlane.OpacityMask = Resources["brHBar"] as Brush; } else { // bkgPlane.Visibility = Visibility.Hidden; // bkgPlane.OpacityMask = null; } if (Marquee.IsRemote) { OnLoopUpdate(null, null); } }
public MarqueeStrip(SigMarquee amarquee) { InitializeComponent(); AttachMarquee(amarquee == null ? new SigMarquee() : amarquee); CompositionTarget.Rendering += Animating; //logFile_ = new System.IO.StreamWriter(string.Format("marquee{0}.log", this.GetHashCode())); }
void AttachMarquee(SigMarquee Amarquee = null) { if (Amarquee == null) { Amarquee = new SigMarquee(); } Marquee = Amarquee; //TextBanner.FontFamily = Marquee.font.Family; TextBanner.FontSize = Marquee.Font.Size; //TextBanner.Foreground = new SolidColorBrush(Marquee.font.ForeColor); TextBanner.FontWeight = Marquee.Font.Weight; //TextBanner.FontStyle = Marquee.font.Style; TextBanner.Text = Marquee.Message; TextBanner.Width = Marquee.IsVerticalFlow ? Marquee.Font.Size : double.NaN; Background = new SolidColorBrush(Marquee.Font.BackColor); if (Marquee.Font.IsGradient) { bkgPlane.Visibility = Visibility.Visible; if (marquee_.IsVerticalFlow) { bkgPlane.OpacityMask = Resources["brVBar"] as Brush; } else { bkgPlane.OpacityMask = Resources["brHBar"] as Brush; } } else { // bkgPlane.Visibility = Visibility.Hidden; // bkgPlane.OpacityMask = null; } if (Marquee.IsRemote) { OnLoopUpdate(null, null); } }