Пример #1
0
 private async Task OnPageSelected(PageSelected message)
 {
     try
     {
         await DoOnUiDispatcherAsync(() =>
         {
             Page = message.Page;
             Text = Page.Text;
             IsAnyPageSelected = true;
         });
     }
     catch (Exception ex)
     {
         Log.Msg(this, l => l.Error(ex));
     }
 }
Пример #2
0
        private async Task OnPageSelected(PageSelected message)
        {
            var directory = message.Page.ParentSection.Directory.FullName;
            var images = await _image.GetImages(directory);

            await DoOnUiDispatcherAsync(() =>
            {
                Images.Clear();
                images.ForEach(i =>
                {
                    var path = i.Path;
                    var fileName = i.FileName;
                    var scaled = resizeImage(path, fileName, 0, 150, (int) i.Width, (int) i.Height);
                    Images.Add(scaled);
                });
            });
        }