This is a migrated thread and some comments may be shown as answers.

how to make settings buttion visible?

3 Answers 58 Views
ImageEditor
This is a migrated thread and some comments may be shown as answers.
Ye
Top achievements
Rank 1
Ye asked on 13 May 2013, 01:38 PM
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.


3 Answers, 1 is accepted

Sort by
0
Ye
Top achievements
Rank 1
answered on 15 May 2013, 07:01 AM
can anyone help?


telerik support team ? 


waiting online eagely.
0
Petya
Telerik team
answered on 16 May 2013, 11:52 AM
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.

0
Ye
Top achievements
Rank 1
answered on 16 May 2013, 12:49 PM
yes. this really helps.

thank you very much.

Tags
ImageEditor
Asked by
Ye
Top achievements
Rank 1
Answers by
Ye
Top achievements
Rank 1
Petya
Telerik team
Share this question
or