This example shows how to use the ColorSpectrumShape property to configure the color picker to use a circular spectrum instead of the default square. When the user does need precise control, like in a graphic design app, you can show both sliders and text entry fields for each aspect of the color. You can hide the text entry fields and change the color spectrum to a circle. It provides a variety of options that let you configure the control to fit your needs.įor example, when the user doesn't need precise control, like picking a highlighter color in a note taking app, you can use a simplified UI. Not all fields are necessary to let a user pick a color, so the color picker is flexible. Private void cancelColor_Click( object sender, RoutedEventArgs e) Assign the selected color to a variable to use outside the popup. Private void confirmColor_Click( object sender, RoutedEventArgs e) When the user confirms their color choice, you save the selected color to use later in your app. In this example, you host a color picker in a Flyout with Confirm and Cancel buttons. You can also save the selected color value to use later. For example, when you host a color picker in a flyout, we recomend that you apply the selected color only after the user confirms the selection or closes the flyout. In some cases, you don't want to apply the color change immediately. See the Customize the color picker section for more info. When the color change can be seen and happens in real-time on the affected object, you don't need to show the color preview bar. This example uses a simplified color picker with just the circle and the slider, which is a common "casual" color picking experience. This example shows how to create a default color picker in XAML.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |