Exemple #1
0
        public override FrameworkElement getFrameworkElementFromItem(FormItem item, PhoneApplicationPage sender)
        {
            FormPage = (EditPage)sender;
            try
            {
                FormItemType type = EnumerationMatcher.StringToFormItemType(item.ControlType);

                switch (type)
                {
                case FormItemType.Subheader:
                    return(giveMeATextBlock(item));

                case FormItemType.TextBox:
                    return(giveMeATextBoxOrTextBlock(item));

                case FormItemType.ListPicker:
                    return(giveMeAListPicker(item));

                case FormItemType.Photo:
                    return(giveMeAPhotoButton(item));

                case FormItemType.CheckBox:
                    return(giveMeACheckBox(item));

                case FormItemType.PageLink:
                    return(giveMeAPageLink(item));

                case FormItemType.Listing:
                    return(giveMeAList(item));
                }
                return(null);
            }
            catch
            {
                return(null);
            }
        }
        public override FrameworkElement getFrameworkElementFromItem(FormItem item, PhoneApplicationPage sender)
        {
            SignPage = (SignPages)sender;
            try
            {
                FormItemType type = EnumerationMatcher.StringToFormItemType(item.ControlType);

                switch (type)
                {
                case FormItemType.Header:
                    return(giveMeAHeader(item));

                case FormItemType.Subheader:
                    return(giveMeASubheader(item));

                case FormItemType.TextBox:
                    return(giveMeATextBoxAsTextBlock(item));

                case FormItemType.ListPicker:
                    return(giveMeATextBoxAsTextBlock(item));

                case FormItemType.Photo:
                    return(giveMeAPhoto(item));

                case FormItemType.CheckBox:
                    return(giveMeACheckedCheckBox(item));

                case FormItemType.Listing:
                    return(giveMeASignableList(item));
                }
                return(null);
            }
            catch
            {
                return(null);
            }
        }