public FeedbackPage()
        {
            ApplicationBar = new ApplicationBar();
            ApplicationBar.Mode = ApplicationBarMode.Default;
            ApplicationBar.StateChanged += (sender, e) =>
            {
                var bar = (sender as ApplicationBar);
                if (CurrentViewState.Equals(FeedbackViewState.ImageShow) || CurrentViewState.Equals(FeedbackViewState.ImageEdit)) {
                    if (e.IsMenuVisible)
                    {
                        bar.Opacity = 0.75;
                    }
                    else
                    {
                        bar.Opacity = 0;
                    }
                } 
            };

            Action<FeedbackViewState> switchViewStateAction = (newViewState) =>
            {
                SwitchToViewState(newViewState);
            };
            this.VM = new FeedbackPageVM(switchViewStateAction);

            this.formControl = new FeedbackMessageFormControl(this);
            this.listControl = new FeedbackMessageListControl(this);
            this.imageControl = new FeedbackImageControl(this);

            initializeAppBarIcons();
            
            InitializeComponent();
        }
 public FeedbackMessageReadOnlyVM(IFeedbackMessage msg, FeedbackPageVM parentVM)
 {
     this.msg    = msg;
     this.images = this.msg.Attachments.Select(fbImg => new FeedbackImageVM(parentVM)
     {
         IsEditable = false, FeedbackImage = fbImg
     }).ToList();
 }
 public FeedbackMessageFormVM(FeedbackPageVM parentVM, FeedbackMessageFormControl view)
 {
     this.ParentVM = parentVM;
     this.view = view;
     isLightTheme = Visibility.Visible.Equals(Application.Current.Resources["PhoneLightThemeVisibility"]);
     SetFormFieldDefaults();
     lightTextBoxStyle = view.Resources["inputDark"] as Style;
     darkTextBoxStyle = view.Resources["inputLight"] as Style;
 }
 public FeedbackMessageFormVM(FeedbackPageVM parentVM, FeedbackMessageFormControl view)
 {
     this.ParentVM = parentVM;
     this.view     = view;
     isLightTheme  = Visibility.Visible.Equals(Application.Current.Resources["PhoneLightThemeVisibility"]);
     SetFormFieldDefaults();
     lightTextBoxStyle = view.Resources["inputDark"] as Style;
     darkTextBoxStyle  = view.Resources["inputLight"] as Style;
 }
Пример #5
0
 public FeedbackImageVM(FeedbackPageVM parentVM)
 {
     this.ParentVM = parentVM;
     EditCommand = new DelegateCommand((obj) => { this.ParentVM.SwitchToImageEditor(this); });
     ShowCommand = new DelegateCommand((obj) => { this.ParentVM.SwitchToImageEditor(this); });
 }
 public FeedbackMessageReadOnlyVM(IFeedbackMessage msg, FeedbackPageVM parentVM)
 {
     this.msg = msg;
     this.images = this.msg.Attachments.Select(fbImg => new FeedbackImageVM(parentVM) { IsEditable = false, FeedbackImage = fbImg }).ToList();
 }
Пример #7
0
 public FeedbackImageVM(FeedbackPageVM parentVM)
 {
     this.ParentVM = parentVM;
     EditCommand   = new DelegateCommand((obj) => { this.ParentVM.SwitchToImageEditor(this); });
     ShowCommand   = new DelegateCommand((obj) => { this.ParentVM.SwitchToImageEditor(this); });
 }