How would I change the Button text color on a Xamarin Forms DisplayAlert dialog?
相关问题
- How to implement only emoji keyboard for Entry?
- Error:Xamarin.Forms targets have been imported mul
- change button color on-click and remains same for
- HttpClient not accepting Authorization headers (40
- React Native onStartShouldSetResponder and onRespo
相关文章
- Xamarin form MessagingCenter Unsubscribe is not wo
- How to change the Back Button Text on Xamarin.Form
- Android add image to button
- How to close form
- Create a button with an image in Flutter?
- Android Button needs two click for action
- jquery toggle with buttons two images?
- Get control's dimensions in CustomRenderer (Xa
FWIW, I opted to create a new ContentPage in XAML and show it with Navigation.PushModalAsync. In my case, it was the easiest way to simulate an alert and maintain control of all the styles.
XAML:
C#:
Implementation:
Screenshot:
i have created custom displayalert you can use task call back TaskCompletionSource as xamarin build DisplayAlert from it
in my method i added actions to implement the call back ,, method signature you can add your own design
Possible to change color with the help of custom renderers for each platform. You have access to native api inside custom renderer. But need to be sure that is needed, because it is not recommended (for iOS sure).
The UIAlertView class is intended to be used as-is and does not support subclassing. The view hierarchy for this class is private and must not be modified.
Relative topic for iOS here.