public class CustomPickerRenderer : PickerRenderer
{
protected override void OnElementChanged(ElementChangedEventArgs<Xamarin.Forms.Picker> e)
{
base.OnElementChanged(e);
if (this.Control != null)
{
var downarrow = UIImage.FromBundle("your image");
var textField = this.Control;
textField.RightViewMode = UITextFieldViewMode.Always;
textField.RightView = new UIImageView(downarrow);
}
}
}
Run Code Online (Sandbox Code Playgroud)
我在 IOS 上使用了 PickerRenderer,我想从右侧留出一些空间。如何从右侧留出填充空间?这里是图片,请检查
我在C#中遇到了有趣的Math.Sqrt问题.我在Math.Sqrt中的一个应用程序(应用程序中的不同位置)获得不同的输出.
我有大项目和应用程序有很多数学计算.
故事
动画Irrlich dll用于应用程序代码:
private void Win_Load(object sender, EventArgs e)
{
double myOutput = Math.Sqrt(2.0); //1.4142135623730951
IrrlichtCreationParameters creationParameter = new IrrlichtCreationParameters();
creationParameter.DriverType = IrrlichtLime.Video.DriverType.Direct3D9;
IrrlichtDevice.CreateDevice(creationParameter);
myOutput = Math.Sqrt(2.0);//1.4142135381698608
}
Run Code Online (Sandbox Code Playgroud)
我想每次输出1.4142135623730951.
任何人都有任何想法,为什么在使用IrrlichtLime.Video.DriverType.Direct3D9后得到不同的输出?
在哪些情况下,我们得到的输出与Math.sqrt不同?