static void OnFontBrushChanged(object sender, DependencyPropertyChangedEventArgs args)
        {
            FlowerLoadingControl source = (FlowerLoadingControl)sender;
            Brush newBrush = (Brush)args.NewValue;

            source.caption.Foreground = newBrush;
            //TODO: PAPA - huh? Why do I need to do this? The DP should be working!!!
        }
        static void OnCaptionChanged(object sender, DependencyPropertyChangedEventArgs args)
        {
            FlowerLoadingControl source = (FlowerLoadingControl)sender;
            string newCaption           = (string)args.NewValue;

            source.caption.Text = newCaption;
            //TODO: PAPA - huh? Why do I need to do this? The DP should be working!!!
        }
コード例 #3
0
        public BusyService(IRegionManager regionManager)
        {
            this.RegionManager = regionManager;
            this.IsBusy        = false;

            Color color = new Color {
                A = 255, R = 255, B = 0, G = 255
            };                                                            // yellow

            //Color color = new Color { A = 255, R = 0, B = 0, G = 255 }; // green
            //Color color = new Color { A = 255, R = 16, B = 128, G = 80}; // blue shade
            BusyControl = new FlowerLoadingControl {
                Visibility = Visibility.Collapsed, PetalBrush = new SolidColorBrush(color), Caption = "Loading, please wait ..."
            };

            ShowInRegion();
        }
        static void OnPetalBrushChanged(object sender, DependencyPropertyChangedEventArgs args)
        {
            FlowerLoadingControl source = (FlowerLoadingControl)sender;
            Brush newBrush = (Brush)args.NewValue;

            source.centerCircle.Fill = newBrush;
            source.ellipse0.Fill     = newBrush;
            source.ellipse1.Fill     = newBrush;
            source.ellipse2.Fill     = newBrush;
            source.ellipse3.Fill     = newBrush;
            source.ellipse4.Fill     = newBrush;
            source.ellipse5.Fill     = newBrush;
            source.ellipse6.Fill     = newBrush;
            source.ellipse7.Fill     = newBrush;
            source.ellipse8.Fill     = newBrush;
            source.ellipse9.Fill     = newBrush;
            source.ellipse10.Fill    = newBrush;
            source.ellipse11.Fill    = newBrush;
            source.ellipse12.Fill    = newBrush;
            source.ellipse13.Fill    = newBrush;
            source.ellipse14.Fill    = newBrush;
            source.ellipse15.Fill    = newBrush;
            //TODO: PAPA - huh? Why do I need to do this? The DP should be working!!!
        }