Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
780
how to put the color pallete to a style so it can be applied to all xamcolorpicker
posted

In the link

http://help.infragistics.com/Help/NetAdvantage/WPF/2012.2/CLR4.0/html/xamColorPicker_Create_a_Custom_Palette.html

How can i put it into a style and apply it to all xamcolorpickers?

  • 28407
    Verified Answer
    posted

    Hi Joan,

    Here a style

      <Grid.Resources>     

            <ig:ColorPalette x:Key="xcp">       

              <ig:ColorPalette.Colors>

                        <ig:ColorPatch Color="red"/>

                        <ig:ColorPatch Color="AliceBlue"/>

                        <ig:ColorPatch Color="Green"/>   

                  </ig:ColorPalette.Colors>

                </ig:ColorPalette>

                    <Style TargetType="{x:Type ig:XamColorPicker}">      

               <Setter Property="CurrentPalette" Value="{StaticResource xcp}"/>

                 </Style>

     Sincerely,
     Matt
    Developer Support Engineer