internal Element_ToastAction ConvertToElement()
        {
            var el = new Element_ToastAction
            {
                Content        = Content,
                Arguments      = Arguments,
                ActivationType = Element_Toast.ConvertActivationType(ActivationType),
                Placement      = Element_ToastActionPlacement.ContextMenu
            };

            ActivationOptions?.PopulateElement(el);

            return(el);
        }
        internal Element_ToastAction ConvertToElement()
        {
            var el = new Element_ToastAction()
            {
                Content        = Content,
                Arguments      = Arguments,
                ActivationType = Element_Toast.ConvertActivationType(ActivationType),
                ImageUri       = ImageUri,
                InputId        = TextBoxId
            };

            ActivationOptions?.PopulateElement(el);

            return(el);
        }
Exemple #3
0
        internal Element_ToastAction ConvertToElement()
        {
            var el = new Element_ToastAction()
            {
                Content      = Content,
                ImageUri     = ImageUri,
                InputId      = TextBoxId,
                HintActionId = HintActionId
            };

            if (_usingSnoozeActivation)
            {
                el.ActivationType = Element_ToastActivationType.System;
                el.Arguments      = "snooze";

                if (_snoozeSelectionBoxId != null)
                {
                    el.InputId = _snoozeSelectionBoxId;
                }

                // Content needs to be specified as empty for auto-generated Snooze content
                if (el.Content == null)
                {
                    el.Content = string.Empty;
                }
            }
            else if (_usingDismissActivation)
            {
                el.ActivationType = Element_ToastActivationType.System;
                el.Arguments      = "dismiss";

                // Content needs to be specified as empty for auto-generated Dismiss content
                if (el.Content == null)
                {
                    el.Content = string.Empty;
                }
            }
            else
            {
                el.ActivationType = Element_Toast.ConvertActivationType(ActivationType);
                el.Arguments      = Arguments;
            }

            ActivationOptions?.PopulateElement(el);

            return(el);
        }