我们目前正在测试桌面应用程序的Facebook功能.我们定义了一个Facebook应用程序,然后创建了开放图形操作,对象和聚合.
第一个问题:如果获取的(对象URL)和规范(og:url)URL不同,为什么标签是从规范URL而不是从提取的URL中获取的?首先有一个提取和规范的URL有什么用?
第二个问题:当一个动作被发布并且用户跟随Facebook聚合框中的相应链接时,我们看到其他参数在查询字符串中与我们的og:url组合在一起(例如?fb_action_ids = ##&fb_action_types = ...&fb_source = recent_activity).有没有办法让我们的og:url保存,而不是以这种方式扩展?
给定以下Image对象(它位于ListView对象的DataTemplate中):
<Image Source="{Binding ImgSource}" ImageOpened="img_ImageOpened" />
Run Code Online (Sandbox Code Playgroud)
我怎么能得到一个高质量的双三次插值图像?(在屏幕上,此图像的大小小于源PNG,但默认大小调整似乎是使用质量差的"最近邻居"插值执行的).
由于我想单独依赖数据绑定(每当关联数据项的ImgSource发生变化时,图像内容应该更改),我试图设置一个ImageOpened处理程序并将刚刚加载的图像更改为质量更好的图像.
不幸的是,下面的代码似乎不起作用(我只是得到空图像):
async void LoadImage(Image imgControl, string source)
{
try
{
StorageFile file = await StorageFile.GetFileFromPathAsync(source);
IRandomAccessStream fileStream = await file.OpenAsync(FileAccessMode.Read);
BitmapDecoder decoder = await BitmapDecoder.CreateAsync(fileStream);
InMemoryRandomAccessStream ras = new InMemoryRandomAccessStream();
BitmapEncoder enc = await BitmapEncoder.CreateForTranscodingAsync(ras, decoder);
enc.BitmapTransform.InterpolationMode = BitmapInterpolationMode.Cubic;
enc.BitmapTransform.ScaledHeight = Convert.ToUInt32(imgControl.ActualHeight);
enc.BitmapTransform.ScaledWidth = Convert.ToUInt32(imgControl.ActualWidth);
await enc.FlushAsync();
Windows.UI.Xaml.Media.Imaging.BitmapImage bImg = new Windows.UI.Xaml.Media.Imaging.BitmapImage();
bImg.SetSource(ras);
imgControl.Source = bImg;
}
catch (Exception e)
{
return;
}
}
void img_ImageOpened(object sender, RoutedEventArgs e)
{
Image imgControl …Run Code Online (Sandbox Code Playgroud)