Beispiel #1
0
        internal Element_ToastActions ConvertToElement()
        {
            if (Buttons.Count + ContextMenuItems.Count > 5)
            {
                throw new InvalidOperationException("You have too many buttons/context menu items. You can only have up to 5 total.");
            }

            var el = new Element_ToastActions();

            foreach (var input in Inputs)
            {
                el.Children.Add(ConvertToInputElement(input));
            }

            foreach (var button in Buttons)
            {
                el.Children.Add(ConvertToActionElement(button));
            }

            foreach (var item in ContextMenuItems)
            {
                el.Children.Add(item.ConvertToElement());
            }

            return(el);
        }
        internal Element_ToastActions ConvertToElement()
        {
            var el = new Element_ToastActions();

            foreach (var input in Inputs)
                el.Children.Add(ConvertToInputElement(input));

            foreach (var button in Buttons)
                el.Children.Add(ConvertToActionElement(button));

            return el;
        }
Beispiel #3
0
        internal Element_ToastActions ConvertToElement()
        {
            var el = new Element_ToastActions();

            foreach (var input in Inputs)
            {
                el.Children.Add(ConvertToInputElement(input));
            }

            foreach (var button in Buttons)
            {
                el.Children.Add(ConvertToActionElement(button));
            }

            return(el);
        }
Beispiel #4
0
        internal Element_ToastActions ConvertToElement()
        {
            if (ContextMenuItems.Count > 5)
            {
                throw new InvalidOperationException("You have too many context menu items. You can only have up to 5.");
            }

            var el = new Element_ToastActions()
            {
                SystemCommands = ToastSystemCommand.SnoozeAndDismiss
            };

            foreach (var item in ContextMenuItems)
            {
                el.Children.Add(item.ConvertToElement());
            }

            return(el);
        }
        internal Element_ToastActions ConvertToElement()
        {
            if (Buttons.Count + ContextMenuItems.Count > 5)
                throw new InvalidOperationException("You have too many buttons/context menu items. You can only have up to 5 total.");

            var el = new Element_ToastActions();

            foreach (var input in Inputs)
                el.Children.Add(ConvertToInputElement(input));

            foreach (var button in Buttons)
                el.Children.Add(ConvertToActionElement(button));

            foreach (var item in ContextMenuItems)
                el.Children.Add(item.ConvertToElement());

            return el;
        }