Entry がフォーカスされているときにすべてのテキストを選択するようにしようとしています。Android でこれを行うためのカスタム レンダラーがありますが、Windows 8 でも動作するようにしたいと考えています。Xamarin Forms で Windows 用のカスタム レンダリングを作成するにはどうすればよいですか? ここに私が持っているものがあります:
[アセンブリ: ExportRenderer(typeof(Xamarin.Forms.Entry), typeof(DrivingLog.Windows.MyEntryRenderer))] 名前空間 DrivingLog.Windows{ public class MyEntryRenderer : EntryRenderer { 保護されたオーバーライド void OnElementChanged(ElementChangedEventArgs e) { base.OnElementChanged(e); if (e.OldElement == null) { var nativeEditText = (global::Windows.UI.Xaml.Controls.TextBox)Control; nativeEditText.ManipulationStarted += (オブジェクト送信者、ManipulationStartedRoutedEventArgs args) => { nativeEditText.SelectAll(); }; } } } }