本文整理汇总了C#中IBitmap.ToNative方法的典型用法代码示例。如果您正苦于以下问题:C# IBitmap.ToNative方法的具体用法?C# IBitmap.ToNative怎么用?C# IBitmap.ToNative使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IBitmap
的用法示例。
在下文中一共展示了IBitmap.ToNative方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ShowImage
public override void ShowImage(IBitmap image, string message, int timeoutMillis)
{
UIApplication.SharedApplication.InvokeOnMainThread(() =>
BTProgressHUD.ShowImage(image.ToNative(), message, timeoutMillis)
);
}
示例2: Transform
public IBitmap Transform(IBitmap source)
{
return new BitmapHolder(Transform(source.ToNative()));
}
示例3: ShowImage
public override void ShowImage(IBitmap image, string message, int timeoutMillis)
{
BTProgressHUD.ShowImage(image.ToNative(), message, timeoutMillis);
//this.ShowWithOverlay(timeoutMillis, () => BTProgressHUD.ShowImage(image.ToNative(), message, timeoutMillis));
}
示例4: Transform
public IBitmap Transform(IBitmap source)
{
return Transform(source.ToNative());
}
示例5: GetBitMapFromMemoryStream
static BitmapSource GetBitMapFromMemoryStream(IBitmap bitMap) => bitMap.ToNative();
示例6: Show
protected virtual void Show(IBitmap image, string message, Color bgColor, int timeoutMillis)
{
var stack = new StackPanel
{
HorizontalAlignment = HorizontalAlignment.Center,
VerticalAlignment = VerticalAlignment.Center,
Opacity = 0.7
};
if (image != null)
{
var source = image.ToNative();
stack.Children.Add(new Image { Source = source });
}
stack.Children.Add(new TextBlock
{
Text = message,
FontSize = 24f,
TextAlignment = TextAlignment.Center,
FontWeight = FontWeights.Bold
});
var cd = new ContentDialog
{
Background = new SolidColorBrush(bgColor.ToNative()),
BorderBrush = new SolidColorBrush(bgColor.ToNative()),
Content = stack
};
stack.Tapped += (sender, args) => cd.Hide();
this.Dispatch(() => cd.ShowAsync());
Task.Delay(TimeSpan.FromMilliseconds(timeoutMillis))
.ContinueWith(x => this.Dispatch(cd.Hide));
}