Наследование: Windows.UI.Xaml.Controls.UserControl
Пример #1
0
        private static void BackgroundFillPropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args)
        {
            PopupView ctl = (PopupView)obj;

            ctl.recBackground.Fill = (Brush)args.NewValue;
            ctl.pthCallout.Fill    = (Brush)args.NewValue;
        }
Пример #2
0
        private static void CountdownBackgroundColorPropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args)
        {
            PopupView ctl = (PopupView)obj;

            ctl.recTimeLeft.Fill   = (Brush)args.NewValue;
            ctl.recTimeLeft.Stroke = (Brush)args.NewValue;
        }
Пример #3
0
        public async static void Show(
            UserControl viewToShow, 
            UserControl toolbar,
            Brush accentPrimary,
            Brush accentSecondary,
            Brush foregroundTextBrush, 
            Brush countdownBackgroundBrush, 
            double timeToLive,
            Thickness margin,
            HorizontalAlignment horizontalAlignment = HorizontalAlignment.Center,
            VerticalAlignment verticalAlignment = VerticalAlignment.Center,
            bool autoHide = false, 
            double width = 300, 
            double height = 180, 
            string button1ClickContent = "",
            string button1ClickIdentifier = "", 
            string button2ClickContent = "",
            string button2ClickIdentifier = "", 
            SumoNinjaMonkey.Framework.Controls.PopupView.eCalloutAlign calloutAlign = PopupView.eCalloutAlign.None,
            string button1MetroIcon = "",
            double button1Rotation = 0,
            string button2MetroIcon = "",
            double button2Rotation = 0,
            bool showPopupInnerBorder = true
            )
        {
            if (PopupService._rootControl != null)
            {
                DispatchedHandler invokedHandler = new DispatchedHandler(() =>
                {
                    if (PopupService._rootControl == null )//|| PopupService._rootControl.Visibility == Visibility.Visible)
                    {
                        //Move(viewToShow, margin, calloutAlign);

                        return;
                    }
                    PopupService._rootControl.Visibility = Visibility.Visible;
                    PopupView view = new PopupView(
                        viewToShow,
                        accentPrimary,
                        accentSecondary,
                        autoHide, 
                        timeToLive, 
                        button1ClickContent,
                        button1ClickIdentifier,
                        button2ClickContent,
                        button2ClickIdentifier,
                        width: width, 
                        height: height, 
                        button1MetroIcon: button1MetroIcon, 
                        button1Rotation: button1Rotation,
                        button2MetroIcon: button2MetroIcon,
                        button2Rotation: button2Rotation,
                        toolbar : toolbar,
                        showInnerBorder: showPopupInnerBorder
                        );
                    view.ContentThickness = new Thickness(0, 0, 0, 0);
                    view.HorizontalAlignment = horizontalAlignment;
                    view.VerticalAlignment = verticalAlignment;
                    //view.Margin = margin;
                    view.BackgroundFill = accentPrimary;
                    view.MessageTextForegroundColor = foregroundTextBrush;
                    view.CountdownBackgroundColor = countdownBackgroundBrush;
                    view.Show(margin.Left, margin.Top);
                    view.CalloutAlign = calloutAlign;
                    view.OnClosing += new EventHandler(PopupService.view_OnClosing);

                    
                    PopupService._rootControl.Children.Add(view);
                    
                });
                await PopupService._rootControl.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, invokedHandler);
            }
        }
Пример #4
0
        private static void InnerBorderColorPropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args)
        {
            PopupView ctl = (PopupView)obj;

            ctl.recInnerBorder.Fill = (Brush)args.NewValue;
        }
Пример #5
0
        private static void ContentThicknessPropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args)
        {
            PopupView pv = (PopupView)obj;

            pv.grdCustomControl.Margin = (Thickness)args.NewValue;
        }
Пример #6
0
 private static void MessageTextForegroundColorPropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args)
 {
     PopupView ctl = (PopupView)obj;
 }