public VideoConceptPage()
        {
            InitializeComponent();

            var vm = new VideoConceptViewModel(DisplayAlert);

            BindingContext = vm;

            // Load the list of videos with any outstanding in the table
            vm.Initialize();
        }
예제 #2
0
        public VideoConceptPage()
        {
            InitializeComponent();

            var weakThis = new WeakReference <ContentPage>(this);
            Func <string, string, string, Task> displayAlert = (title, message, cancel) =>
            {
                ContentPage conceptPage = null;
                if (weakThis.TryGetTarget(out conceptPage))
                {
                    return(conceptPage.DisplayAlert(title, message, cancel));
                }
                return(Task.Run(() => { }));
            };

            BindingContext = new VideoConceptViewModel(Camera.Current, displayAlert);
        }