Custom template

4 posts, 0 answers
  1. Anton Khramov
    Anton Khramov avatar
    15 posts
    Member since:
    Sep 2008

    Posted 30 Jun 2009 Link to this post

    Hi.
    I want to create custom control template for colorpicker. In detail, i need to remove ColorButton and create my own template for expander button.
    I've try ColorButtonStyle and ExpanderButtonStyle but it didn't help me.
    Please help.
  2. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 01 Jul 2009 Link to this post

    Hi Anton Khramov,

    Please check this example:
    http://demos.telerik.com/silverlight/#ColorPicker/ColorPicker

    check this style:
    <Style x:Key="ColorButtonStyle" TargetType="Button"> ...

    and how it is applied:
    <telerik:RadColorPicker ColorButtonStyle="{StaticResource ColorButtonStyle}"  ...

    If you still can't figure it out - please let us know.

    Sincerely yours,
    Valentin.Stoychev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. DevCraft banner
  4. Anton Khramov
    Anton Khramov avatar
    15 posts
    Member since:
    Sep 2008

    Posted 01 Jul 2009 Link to this post

    Hi, Valentin.

    I've try to make empty color button template using following style.
    <Style x:Key="ColorButtonStyle" TargetType="Button"
          <Setter Property="Template"
                 <Setter.Value> 
                       <ControlTemplate TargetType="Button"
                            <Grid Height="0" Width="0"
                             </Grid> 
                        </ControlTemplate> 
                   </Setter.Value> 
            </Setter> 
     </Style> 
     it makes color button empty, but space where button have placed still visible. Can i change style of container in which colorbutton placed.
  5. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 01 Jul 2009 Link to this post

    Hi Anton Khramov,

    If you want to hide the empty color use the "NoColorVisibility" property. Check - out this example:
    http://demos.telerik.com/silverlight/#ColorPicker/ColorSelector

    Best wishes,
    Valentin.Stoychev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top