how to make settings buttion visible?

4 posts, 0 answers
  1. Ye
    Ye avatar
    25 posts
    Member since:
    Aug 2012

    Posted 13 May 2013 Link to this post

    hi,

    i have a toolsettingspanel which will connect to radImageEditor.

    <
    telerik:ToolSettingsPanel x:Name="defaultSettingsPanel" Visibility="Collapsed" />


    after i create RadImageEditor instance, i assigned the defaultSettingsPanel to SettingsContainer.






    this.CurrentEditUI.ImageEditor.ApplyTemplate();
                        this.CurrentEditUI.ImageEditor.ToolSettingsContainer = this.defaultSettingsPanel;



    and the settingspanel should be have three buttons, now it just show reset button.


    the ok and cancel button never show.
    i notice that telerik's demo site also did not show that two buttons.

    how can i make them visible and work as they should.


  2. Ye
    Ye avatar
    25 posts
    Member since:
    Aug 2012

    Posted 15 May 2013 Link to this post

    can anyone help?


    telerik support team ? 


    waiting online eagely.
  3. DevCraft banner
  4. Petya
    Admin
    Petya avatar
    975 posts

    Posted 16 May 2013 Link to this post

    Hello,

    I am afraid I am having a hard time understanding you.

    The ToolSettingsPanel that is part of RadImageEditor's template has OK and Cancel buttons, however they are collapsed in the template of the panel itself. Basically, in order to add fully functional OK and Cancel buttons to the default tools you only have to modify the template by removing the highlighted parts below:
    <Style TargetType="toolsUI:ToolSettingsPanel"
        x:Key="ToolSettingsPanelStyle">
        <Setter Property="VerticalAlignment" Value="Top" />
        <Setter Property="HorizontalAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Top" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="Margin" Value="0" />
        <Setter Property="MinWidth" Value="210" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="toolsUI:ToolSettingsPanel">
                    <Grid Background="{TemplateBinding Background}">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" telerik:StyleManager.Theme="{StaticResource Theme}">
                            <ContentPresenter Margin="{TemplateBinding Margin}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        </ScrollViewer>
                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="1" Margin="10">
                            <telerik:RadButton Name="ButtonOK" Visibility="Collapsed" MinWidth="58" Height="22" Margin="0 0 8 0"
                                               telerik:StyleManager.Theme="{StaticResource Theme}" telerik:LocalizationManager.ResourceKey="Ok"/>
                            <telerik:RadButton Name="ButtonCancel" Visibility="Collapsed" MinWidth="58" Height="22" Margin="0 0 8 0"
                                               telerik:StyleManager.Theme="{StaticResource Theme}" telerik:LocalizationManager.ResourceKey="Cancel"/>
                            <telerik:RadButton Name="ButtonReset" MinWidth="58" Height="22"
                                               telerik:StyleManager.Theme="{StaticResource Theme}" telerik:LocalizationManager.ResourceKey="Reset"/>
                        </StackPanel>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    If this does not help, please explain in detail your setup and the desired result.

    Kind regards,
    Petya
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  5. Ye
    Ye avatar
    25 posts
    Member since:
    Aug 2012

    Posted 16 May 2013 Link to this post

    yes. this really helps.

    thank you very much.

Back to Top