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

Question on Application level

17 Answers 209 Views
PersistenceFramework
This is a migrated thread and some comments may be shown as answers.
Vivek
Top achievements
Rank 1
Vivek asked on 09 Aug 2011, 10:31 PM
Hi Team,

I am wondering,Could you please help me on this?

I have one silverlight window application and Inside that I have added Two RadControlsScenario.xaml window with all checkbox and drop down to do the needful job.

 When user opens these RadControlsScenario window first time they will change the controls like dropdown, check box.  and now user will close the window as well the application.

Now if user again open the same RadControlsScenario page, user should see the changes like if user has selected some dropdown list, it should show the dropdown list selected.

Please note user is closing the window and application both, So this should be application level save and load without any click of load and save  button.

Please guide me with some sample codes.

Thanks,
Vivek.

17 Answers, 1 is accepted

Sort by
0
Alex Fidanov
Telerik team
answered on 10 Aug 2011, 07:55 AM
Hello Vivek,

You can hook up to the Window's closing event and save the needed controls in the Isolated Storage of the application. You can see an example of IsolatedStorage integration here. In the Loaded event of the window, you can re-load the saved information. Please let me know if you need further assistance on this matter.

Best wishes,
Alex Fidanov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

0
Vivek
Top achievements
Rank 1
answered on 10 Aug 2011, 01:52 PM
Hi Alex,

I think I have a problem with this.

Please see the screenshot for the reference.

On rad window close I am trying to save window state. but its not passing the first line itself.

Please help with some sample code ASAP.


0
Alex Fidanov
Telerik team
answered on 10 Aug 2011, 01:59 PM
Hi Vivek,

I believe this happens because of mismatch in the dll versions or a missing assembly.
Can you please check that all of the Telerik dlls are the same version / build and you have cleaned and rebuilt the project? If the problem still exists, is it possible to send us an isolated sample that we can run and reproduce the exception?

Thank you.

All the best,
Alex Fidanov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

0
Vivek
Top achievements
Rank 1
answered on 10 Aug 2011, 02:39 PM
 Hi Alex,

Please see the attached  screenshot.

Thanks,
vivek
0
Alex Fidanov
Telerik team
answered on 10 Aug 2011, 03:00 PM
Hello Vivek,

I have attached a small sample demonstrating how to save and load settings respectively on Application's Exit and on Load events. Please let me know if you have questions on this matter.

Greetings,
Alex Fidanov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

0
Vivek
Top achievements
Rank 1
answered on 10 Aug 2011, 03:40 PM
Hi Alex Fidanov,

thanks for the wonderful solutions.

But in my case its saves first time data, but when I opened second time and tried to add some more controls checked and closed the application I am getting following error.

Please  see the screenshot below.



Thanks,
Vivek
0
Alex Fidanov
Telerik team
answered on 11 Aug 2011, 08:52 AM
Hi Vivek,

We are aware of this issue. For now, I would recommend increasing the quota manually. Please note that this has be done through a user initiated action (i.e. Button's Click).

Another option is to actually reduce the size of what you are saving. It seems that you saving too many data. You can choose which properties to save or not on a control leve, for example :

<CheckBox telerik:PersistenceManager.StorageId="checkBox">
    <telerik:PersistenceManager.SerializationOptions>
        <telerik:SerializationMetadataCollection>
            <telerik:PropertyNameMetadata Condition="Only" Expression="IsChecked" SearchType="PropertyName" />
        </telerik:SerializationMetadataCollection>
    </telerik:PersistenceManager.SerializationOptions>
</CheckBox>
You can find more information on serialization options here.

All the best,
Alex Fidanov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

0
Vivek
Top achievements
Rank 1
answered on 11 Aug 2011, 10:28 AM

Hi  Alex Fidanov,

I have Radwindow with with three tabs items and I need to save all three tab items.

As you can see I am taking telerik:PersistenceManager.StorageId="OptionsControlId1", telerik:PersistenceManager.StorageId="OptionsControlI2",telerik:PersistenceManager.StorageId="OptionsControlId3" for all three tabs items that I want to save but still it showing the same error.

Here is the Radwindow with three tab items That I need to save on application exit as well as close of the window.

<telerik:RadWindow x:Class="Rasterex.SilverlightViewer.RadControlsScenario1"
        Header="Print Option" Height="500" Width="525" ResizeMode="NoResize" WindowStartupLocation="CenterOwner" CanClose="False" >
    <Grid>
        <telerik:RadTabControl>
            <telerik:RadTabItem Header="Print" telerik:PersistenceManager.StorageId="OptionsControlId1">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="200"/>
                        <RowDefinition Height="100"/>
                        <RowDefinition Height="100"/>
                        <RowDefinition />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="72" />
                        <ColumnDefinition Width="184" />
                        <ColumnDefinition Width="63" />
                        <ColumnDefinition Width="192" />
                    </Grid.ColumnDefinitions>
                    <telerik:Label Content="Print Portion" Height="28" Margin="0,0,0,172" Grid.ColumnSpan="2" Name="lbl_print_portion"></telerik:Label>
                    <RadioButton Margin="16,83,94,88" Width="145" Height="29" Content="Limits" Grid.ColumnSpan="2" Name="rdb_limit" GroupName="ABC"></RadioButton>
                    <RadioButton Margin="16,55,70,0" Width="169" Height="22" VerticalAlignment="Top"  Content="Displayed Portion" GroupName="ABC" Grid.ColumnSpan="2" Name="rdb_disp_portion"></RadioButton>
                    <RadioButton Margin="18,26,82,151" Width="156" Height="23" IsChecked="True" Content="Entire Page Image" Grid.ColumnSpan="2" GroupName="ABC" Name="rdb_Entire_page_img"></RadioButton>
                    <RadioButton Margin="16,110,114,58" Height="32" Width="125" Content="Selected Area" Grid.ColumnSpan="2" GroupName="ABC" Name="rdb_Selected_area"></RadioButton>
                    <Button Height="30" Width="70" Margin="10,151,104,19" Content="Pick" Grid.Column="1" Name="btn_pick"></Button>
                    <telerik:Label  Grid.Column="2" Content="Print Control" Height="28" Margin="0,0,0,172" Name="lbl_print_control" Grid.ColumnSpan="2"></telerik:Label>
                    <CheckBox  Grid.Column="2" Height="23" Margin="20,46,24,131" Width="210" Content="Poster" Name="chk_poster" Checked="chk_poster_Checked" Unchecked="chk_poster_Unchecked" Grid.ColumnSpan="2"></CheckBox>
                    <TextBox  Grid.Column="3" Height="22" Width="45" Margin="41,47,0,131" Text="5" Name="txt_poster1" IsEnabled="False" HorizontalAlignment="Left"></TextBox>
                    <telerik:Label  Content="x" Height="22" Margin="92,47,80,131" Width="20" Grid.Column="3" Name="lbl_poster" Foreground="Gray"></telerik:Label>
                    <TextBox  Grid.Column="3" Height="23" Width="45" Margin="118,46,29,131" Text="5" Name="txt_poster2" IsEnabled="False"></TextBox>
                    <!--<CheckBox Grid.Column="2" Height="27" Margin="16,85,18,0" Width="212" Content="Invert Raster" VerticalAlignment="Top" Name="chk_invert_raster"></CheckBox>
                    <CheckBox Grid.Column="2" Height="37" Margin="16,105,18,58" Width="212" Content="Markup Only" Name="chk_markup_only"></CheckBox>-->
                    <telerik:Label Grid.Column="2" Content="Rotation" Margin="21,75,0,92" Height="33" Width="57" Name="lbl_rotation" HorizontalAlignment="Left" Grid.ColumnSpan="2"></telerik:Label>
                    <ComboBox Grid.Column="3" Height="25" Width="80" Margin="21,79,91,96" Name="cmbx_rotation">
                        <ComboBoxItem Content="0" IsSelected="True"></ComboBoxItem>
                        <ComboBoxItem Content="90"></ComboBoxItem>
                        <ComboBoxItem Content="180"></ComboBoxItem>
                        <ComboBoxItem Content="270"></ComboBoxItem>
                    </ComboBox>
                    <telerik:Label Grid.Row="1"  Content="Print Scale" Margin="4,0,140,81" Width="111" Height="19" Grid.ColumnSpan="2" Name="lbl_print_scale">
                    </telerik:Label>
                    <RadioButton Width="110" Grid.Row="1" Height="22" Margin="18,25,128,53"  GroupName="XYZ" Content="Standard" Grid.ColumnSpan="2" Name="rdb_standard_print_scale" Checked="rdb_standard_print_scale_Checked" Unchecked="rdb_standard_print_scale_Unchecked"></RadioButton>
                    <telerik:RadComboBox IsEnabled="False" Width="200" Grid.Row="1" Height="22" Margin="128,25,111,53"  Grid.ColumnSpan="3" Grid.Column="1" Name="cmbx_standard_print_scale" >
                        <telerik:RadComboBoxItem Content="Scaled to fit the paper" Name="cmbx_scale_fit" IsSelected="True"></telerik:RadComboBoxItem>
                        <telerik:RadComboBoxItem Content="Unscaled(1:1)" Name="cmbx_unscaled"></telerik:RadComboBoxItem>
                        <telerik:RadComboBoxItem Content="1:2" Name="cmbx_1by2"></telerik:RadComboBoxItem>
                        <telerik:RadComboBoxItem Content="1:4" Name="cmbx_1by4"></telerik:RadComboBoxItem>
                        <telerik:RadComboBoxItem Content="1:8" Name="cmbx_1by8"></telerik:RadComboBoxItem>
                        <telerik:RadComboBoxItem Content="1:10" Name="cmbx_1by10"></telerik:RadComboBoxItem>
                        <telerik:RadComboBoxItem Content="1:16" Name="cmbx_1by16"></telerik:RadComboBoxItem>
                        <telerik:RadComboBoxItem Content="1:20" Name="cmbx_1by20"></telerik:RadComboBoxItem>
                        <telerik:RadComboBoxItem Content="1:30" Name="cmbx_1by30"></telerik:RadComboBoxItem>
                        <telerik:RadComboBoxItem Content="1:40" Name="cmbx_1by40"></telerik:RadComboBoxItem>
                        <telerik:RadComboBoxItem Content="1:50" Name="cmbx_1by50"></telerik:RadComboBoxItem>
                        <telerik:RadComboBoxItem Content="1:100" Name="cmbx_1by100"></telerik:RadComboBoxItem>
                        <telerik:RadComboBoxItem Content="2:1" Name="cmbx_2by1"></telerik:RadComboBoxItem>
                        <telerik:RadComboBoxItem Content="4:1" Name="cmbx_4by1"></telerik:RadComboBoxItem>
                        <telerik:RadComboBoxItem Content="8:1" Name="cmbx_8by1"></telerik:RadComboBoxItem>
                        <telerik:RadComboBoxItem Content="10:1" Name="cmbx_10by1"></telerik:RadComboBoxItem>
                        <telerik:RadComboBoxItem Content="100:1" Name="cmbx_100by1"></telerik:RadComboBoxItem>
                    </telerik:RadComboBox>
                    <RadioButton Grid.Row="1" Margin="18,65,128,12" Height="23" Width="110" GroupName="XYZ" Content="Scaled from" Grid.ColumnSpan="2" Name="rdbt_scaled_from" Checked="rdbt_scaled_from_Checked" Unchecked="rdbt_scaled_from_Unchecked"></RadioButton>
                    <TextBox Grid.Row="1" Height="20" Width="60" Margin="42,65,0,15" Text="1"  Grid.Column="1" Name="txt_scaled_from1" IsEnabled="False" HorizontalAlignment="Left"></TextBox>
                    <telerik:Label Content="to" Height="20" Margin="0,65,54,15" Width="26" Grid.Row="1" HorizontalAlignment="Right" Foreground="Gray" Grid.Column="1" Name="lbl_scaled_from"></telerik:Label>
                    <TextBox Grid.Row="1" Height="20" Width="60" Margin="124,64,0,16" Text="1" Grid.Column="1" Name="txt_scaled_from2" IsEnabled="False"></TextBox>
                    <telerik:Label Grid.Row="2"  Content="Print Offset" Margin="4,0,140,81" Width="111" Height="19" Grid.ColumnSpan="2" Name="lbl_print_offset"></telerik:Label>
                    <RadioButton Width="110" Grid.Row="2" Height="22" Margin="18,25,128,53"  GroupName="QWE" Content="Standard" Grid.ColumnSpan="2" Name="rdbt_standard_print_offset" Checked="rdbt_standard_print_offset_Checked" Unchecked="rdbt_standard_print_offset_Unchecked"></RadioButton>
                    <telerik:RadComboBox IsEnabled="False" Width="200" Grid.Row="2" Height="22" Margin="128,25,111,53" Grid.ColumnSpan="3" Grid.Column="1" Name="cmbx_standard_print_offset" >
                        <telerik:RadComboBoxItem Content="Align to page top left corner "></telerik:RadComboBoxItem>
                        <telerik:RadComboBoxItem Content="Align to page top right corner"></telerik:RadComboBoxItem>
                        <telerik:RadComboBoxItem Content="Align to page bottom right corner"></telerik:RadComboBoxItem>
                        <telerik:RadComboBoxItem Content="Align to page bottom left corner"></telerik:RadComboBoxItem>
                        <telerik:RadComboBoxItem Content="Center horizontaly to page top"></telerik:RadComboBoxItem>
                        <telerik:RadComboBoxItem Content="Center vertically to page left"></telerik:RadComboBoxItem>
                        <telerik:RadComboBoxItem Content="Center the printout" IsSelected="True"></telerik:RadComboBoxItem>
                        <telerik:RadComboBoxItem Content="Center horizontaly to page bottom"></telerik:RadComboBoxItem>
                        <telerik:RadComboBoxItem Content="Center vertically to page right"></telerik:RadComboBoxItem>                     
                    </telerik:RadComboBox>
                    <RadioButton Grid.Row="2" Margin="18,65,128,12" Height="23" Width="110" GroupName="QWE" Content="Custom" Grid.ColumnSpan="2" Name="cmbx_custom_print_offset" Checked="cmbx_custom_print_offset_Checked" Unchecked="cmbx_custom_print_offset_Unchecked" ></RadioButton>
                    <telerik:Label Content="X" Height="28" Margin="10,60,0,12" Width="24" Grid.Row="2" HorizontalAlignment="Left" Foreground="Gray" Grid.Column="1" Name="lbl_x_custom_print_offset"></telerik:Label>
                    <TextBox Grid.Row="2" Height="20" Width="60" Margin="42,65,82,15" Text="1" Grid.Column="1" Name="txt_custom_print_offset1" IsEnabled="False"></TextBox>
                    <telerik:Label Content="MM" Height="29" Margin="108,59,43,12" Width="33" Grid.Row="2" Grid.Column="1" Name="lbl_mm_custom_print_offset1"></telerik:Label>
                    <telerik:Label Content="Y" Height="28"  Width="24" Grid.Row="2" HorizontalAlignment="Left" Margin="160,60,0,12" Foreground="Gray" Grid.Column="1" Name="lbl_y_custom_print_offset"></telerik:Label>
                    <TextBox Grid.Row="2" Height="20" Width="60" Grid.Column="2" Text="1" Margin="4,65,191,15" Name="txt_custom_print_offset2" IsEnabled="False" Grid.ColumnSpan="2"></TextBox>
                    <telerik:Label Content="MM" Height="29" Width="33" Grid.Row="2" Grid.Column="3" Margin="7,60,152,12" Name="lbl_mm_custom_print_offset2"></telerik:Label>
                    <Button Grid.Row="3" Content="Ok" Height="25" Width="70" Grid.Column="1" Margin="114,0,0,14" Name="btn_ok_print" Click="btn_ok_print_Click"></Button>
                    <Button Grid.Row="3" Content="Cancel" Height="25" Width="70" Margin="8,0,177,14" Grid.Column="2" Name="btn_cancle_print" Click="btn_cancle_print_Click" Grid.ColumnSpan="2"></Button>
                    <Button Grid.Row="3" Content="Apply" Height="25" Width="70" Margin="0,0,101,14" Grid.Column="3" HorizontalAlignment="Right" Name="btn_apply_print"></Button>
                </Grid>
            </telerik:RadTabItem>
            <telerik:RadTabItem Header="Watermark" telerik:PersistenceManager.StorageId="OptionsControlId2">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="73"/>
                        <RowDefinition Height="231"/>
                        <RowDefinition Height="85"/>
                        <RowDefinition Height="39" />
                        <RowDefinition Height="11*" />
                    </Grid.RowDefinitions>
                    <telerik:Label Content="General Option" Height="21" Margin="7,6,388,46" Width="98" Name="lbl_watermark_general_option"/>
                    <CheckBox Margin="7,33,0,19" Width="138" Height="21" Content="Enable Watermarking" HorizontalAlignment="Left" Name="chkbx_enb_watermarking" Checked="chkbx_enb_watermarking_Checked" Unchecked="chkbx_enb_watermarking_Unchecked"></CheckBox>
                    <telerik:Label Content="Watermark as:" Height="26" Margin="160,28,243,19" Width="90" Name="lbl_watermark_as" Foreground="Gray"/>
                    <ComboBox Height="20" Margin="292,33,43,20" Width="158" Name="drpbx_watermark_general_option" IsEnabled="False">
                        <ComboBoxItem Content="Top layer" IsSelected="True"></ComboBoxItem>
                        <ComboBoxItem Content="Bottom layer"></ComboBoxItem>
                    </ComboBox>
                    <telerik:Label Content="Text Option" Grid.Row="1" Height="26" Margin="7,0,406,214" Width="80" Name="lbl_watermark_text_option" Foreground="Gray"/>
                    <CheckBox Margin="17,32,405,178" Grid.Row="1" Width="89" Height="21" Content="File Name" Name="chkbx_file_name" IsEnabled="False"></CheckBox>
                    <CheckBox Margin="140,32,0,178" Grid.Row="1" Width="79" Height="21" Content="Date" HorizontalAlignment="Left" Name="chkbx_date" IsEnabled="False"></CheckBox>
                    <CheckBox Margin="258,32,175,178" Grid.Row="1" Content="Time" Height="21" Name="chkbx_time" IsEnabled="False" Width="78"></CheckBox>
                    <CheckBox Margin="8,59,370,145" Grid.Row="1" Width="115" Height="27" Content="Custom Text" Name="chkbx_custom_text" Checked="chkbx_custom_text_Checked" Unchecked="chkbx_custom_text_Unchecked" IsEnabled="False"></CheckBox>
                    <TextBox Height="30" Margin="128,56,131,145" Grid.Row="1" Width="234" Name="txtbx_custom_text" IsEnabled="False"></TextBox>
                    <telerik:Label Margin="8,97,418,103" Grid.Row="1" Content="Alignment:" Width="67" Height="31" Name="lbl_alignment" Foreground="Gray"/>
                    <ComboBox Height="26" Margin="128,96,230,109" Width="135" Grid.Row="1" Name="cmbx_alignment" IsEnabled="False">
                        <ComboBoxItem Content="Left" Visibility="Visible" IsSelected="True"></ComboBoxItem>
                        <ComboBoxItem Content="Right" Visibility="Visible"></ComboBoxItem>
                        <ComboBoxItem Content="Center" Visibility="Visible"></ComboBoxItem>
                    </ComboBox>
                    <CheckBox Height="26" Margin="292,102,80,112" Grid.Row="1" Width="121" Content="Multiple Lines" Name="chkbx_multiple_lines" IsEnabled="False" ></CheckBox>
                    <telerik:Label Content="Vertical Position:" Margin="8,128,393,76" Grid.Row="1" Width="106" Height="27" Name="lbl_vertical_position" Foreground="Gray"/>
                    <ComboBox Height="27" Margin="129,128,229,76" Grid.Row="1" Width="135" Name="cmbx_vertical_position" IsEnabled="False">
                        <ComboBoxItem Content="Page Top" IsSelected="True"></ComboBoxItem>
                        <ComboBoxItem Content="Page Middle"></ComboBoxItem>
                        <ComboBoxItem Content="Page Bottom"></ComboBoxItem>
                    </ComboBox>
                    <telerik:Label Content="Orientation:" Margin="15,163,406,41" Grid.Row="1" Height="27" Width="90" Name="lbl_orientation" Foreground="Gray" />
                    <ComboBox Height="24" Margin="129,0,230,44" Grid.Row="1" Width="134" VerticalAlignment="Bottom" Name="cmbx_orientation" IsEnabled="False">
                        <ComboBoxItem Content="0" IsSelected="True"></ComboBoxItem>
                        <ComboBoxItem Content="45"></ComboBoxItem>
                        <ComboBoxItem Content="90"></ComboBoxItem>
                        <ComboBoxItem Content="135"></ComboBoxItem>
                        <ComboBoxItem Content="180"></ComboBoxItem>
                        <ComboBoxItem Content="225"></ComboBoxItem>
                        <ComboBoxItem Content="270"></ComboBoxItem>
                        <ComboBoxItem Content="315"></ComboBoxItem>
                    </ComboBox>
                    <telerik:Label Content="Degree" Margin="278,163,166,41" Grid.Row="1" Width="49" Height="27" Name="lbl_degree" Foreground="Gray"/>
                    <telerik:Label Margin="17,0,414,57" Grid.Row="2" Content="Font Option" Height="28" Width="80" Name="lbl_watermark_font_option" Foreground="Gray"/>
                    <Button Margin="7,0,0,24" Width="99" Height="27" Grid.Row="2" Content="Font" HorizontalAlignment="Left" VerticalAlignment="Bottom" Name="btn_watermark_font" Click="btn_watermark_font_Click" IsEnabled="False"></Button>
                    <TextBox Margin="138,25,73,15" Text="Arial" Grid.Row="2" IsReadOnly="True" Width="300" Height="45" Name="txtbx_watermark_font" IsEnabled="False"></TextBox>
                    <Button Grid.Row="3" Content="Ok" Width="62" Height="27" Margin="190,2,259,0" x:Name="btn_watermark_ok" Click="btn_watermark_ok_Click"></Button>
                    <Button Height="27" Margin="258,0,0,2" Width="63" Grid.Row="3" Content="Cancel" x:Name="btn_watermark_cancel" Click="btn_watermark_cancel_Click" HorizontalAlignment="Left"></Button>
                    <Button Height="27" Margin="327,0,109,2" Width="75" Grid.Row="3" Content="Apply" x:Name="btn_watermark_apply" ></Button>
                </Grid>
            </telerik:RadTabItem>
            <telerik:RadTabItem Header="Header and Footer"  telerik:PersistenceManager.StorageId="OptionsControlId3">               
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="150"></RowDefinition>
                        <RowDefinition Height="243"></RowDefinition>
                        <RowDefinition Height="5"></RowDefinition>
                        <RowDefinition Height="41" />
                        <RowDefinition Height="8*" />
                    </Grid.RowDefinitions>
                    <telerik:Label Content="Header" Height="28" Margin="0,0,435,122" Width="58" Name="lbl_header"/>
                    <CheckBox Margin="5,34,366,94" Height="22" Width="122" Content="Enable Header" Name="chkbx_enable_header"></CheckBox>
                    <telerik:Label Content="Font" Margin="133,28,327,94" Width="33" Height="28" Name="lbl_font_header"/>
                    <TextBox Height="28" Text="Arial" Margin="190,28,79,94" Width="224" Name="txt_font_header" IsReadOnly="True"></TextBox>
                    <Button Height="28" Margin="434,28,29,94" Width="30" Content="..." Click="Btn_Font_Click" Name="btn_font_header"></Button>
                    <TextBox Height="28" Margin="50,72,29,50" Width="414" Name="txt_font_header_detail" IsEnabled="False"></TextBox>
                    <telerik:Label Content="From edge:" Height="27" Margin="5,106,417,18" Width="86" Name="lbl_fromedge_header"/>
                    <telerik:RadNumericUpDown Minimum="0" SmallChange="0.10" Maximum="10" Height="27"  Margin="106,106,0,17" Width="60" Name="numupdown_fromedge_header" HorizontalAlignment="Left" />
                    <telerik:Label Content="Inches" Margin="173,106,290,17" Height="27" Width="48" Name="lbl_inches_fromedge_header"/>
                    <telerik:Label Content="Footer" Margin="5,0,435,168" Grid.Row="1" Height="32" Width="53" Name="lbl_footer"/>
                    <CheckBox Margin="6,38,365,140" Height="22" Width="122" Content="Enable Footer" Grid.Row="1" Name="chkbx_enable_footer"></CheckBox>
                    <telerik:Label Content="Font" Margin="133,32,327,140" Width="33" Height="28" Grid.Row="1" Name="lbl_font_footer"/>
                    <TextBox Height="28" Text="Arial" Margin="190,32,79,140" Width="224" Grid.Row="1" IsReadOnly="True" Name="txtbx_footer_font"></TextBox>
                    <Button Height="28" Margin="434,32,29,140" Width="30" Content="..." Grid.Row="1" Name="btn_footer_font" Click="btn_footer_font_Click" ></Button>
                    <TextBox Height="28" Margin="50,72,29,50" Width="414" Grid.Row="1" Name="txtbx_footer_detail" IsEnabled="False"></TextBox>
                    <telerik:Label Content="From edge:" Height="27" Margin="5,106,415,18" Width="86" Grid.Row="1" Name="lbl_fromedge_footer"/>
                    <telerik:RadNumericUpDown Minimum="0" SmallChange="0.10" Maximum="10" Height="27" Margin="106,153,0,63"  Width="60" Grid.Row="1" Name="numupdown_fromedge_Footer" HorizontalAlignment="Left" />
                    <telerik:Label Content="Inches" Margin="173,152,290,65" Height="27" Width="48" Grid.Row="1" Name="lbl_inches_fromedge"/>
                    <Button Grid.Row="3" Content="Ok" Width="62" Height="27" Margin="197,8,252,6" x:Name="btn_header_footer_ok" Click="btn_header_footer_OK_Click"></Button>
                    <Button Height="27" Margin="265,7,183,7" Width="63" Grid.Row="3" Content="Cancel" x:Name="btn_header_footer_cancel" Click="btn_header_footer_cancel_Click"></Button>
                    <Button Height="27" Margin="0,6,100,8" Width="75" Grid.Row="3" Content="Apply" HorizontalAlignment="Right" x:Name="btn_header_footer_apply"></Button>
                </Grid>
            </telerik:RadTabItem>
        </telerik:RadTabControl>
    </Grid>
</telerik:RadWindow>



And In main page.xaml.cs  I am just calling your code in initialize component just like you.

public MainPage()
    {
 
        //StyleManager.ApplicationTheme = new Expression_DarkTheme();
        InitializeComponent();
        DisableAllButtons();
        RadGridView1.ItemsSource = layerList;
        RadGridView1.Rebind();
        //callk reload page view to make sure it draws the canvas again with corret state on/off
        viewport.ReloadPageView();
 
 
        //   viewport.MouseWheel += new MouseWheelEventHandler(viewport_MouseWheel);
        ServerUrl = "http://terjevista:80/ngvs/cs2/cs?FormRequest";
        //HtmlPage.RegisterScriptableObject(
 
        this.Loaded += (_, __) =>
        {
            // load existing settings for registered objects
            IsolatedStorageProvider provider = new IsolatedStorageProvider();
            provider.LoadFromStorage();
        };
 
        Application.Current.Exit += (_, __) =>
        {
            // save settings if any registered
            IsolatedStorageProvider provider = new IsolatedStorageProvider();
            provider.SaveToStorage();
        };
 
    }


Please let me know What I can do.

Thanks for the help.
Vivek.



0
Vivek
Top achievements
Rank 1
answered on 12 Aug 2011, 12:15 PM
Hi Team,

I tried saving the first tab when I am clicking the OK button and closing the rad window but still its showing same error.
Could you please let me know what else I can do to fix this. 

Thanks,
Vivek.
0
Vivek
Top achievements
Rank 1
answered on 15 Aug 2011, 12:12 PM
Hi Alex Fidanov,

Please let me know any work around. This is  very important for us.

Thanks,
Vivek.
0
Vivek
Top achievements
Rank 1
answered on 15 Aug 2011, 01:04 PM
Hi Team,

RadWindow is not getting saved by saving manually also(Button Click).

I have radwindow with multiple controls inside, I want to save them all and reload them if you close the silverlight window application.Please see my last post for the Radwindow controls.

Please let me know if telerik Persistence Framework will work for this case or not, coz I have given enough try and time on this

If no Please let me know.

Thanks for the response.
Vivek.

0
Alex Fidanov
Telerik team
answered on 15 Aug 2011, 01:41 PM
Hi Vivek,

I would not recommend saving the whole TabItem's content, but rather only the elements that the user can change, like ComboBoxes, checkBoxes, RadioButtons, etc. This would avoid the unnecessary overhead of saving the properties of Buttons, TextBlocks and other framework elements (like panels, etc) that are unrelated. Setting storage ids to the user-related controls and/or creating serialization metadata (as show in my previous reply) would dramatically decrease the size of the saved data and increase performance.

Regarding the exception, this would be resolved with this or next week's internal build.

Best wishes,
Alex Fidanov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

0
Vivek
Top achievements
Rank 1
answered on 15 Aug 2011, 01:50 PM
Hi Team,

Please let me know a sample project, So that I can integrate in my application can check it.

Please do the needful coz I am checking it for the last time or else I have to leave  telerik persistence :(

Thanks for the help.



0
Vivek
Top achievements
Rank 1
answered on 16 Aug 2011, 09:42 AM
Hi Alex Fidanov,

Please provide me any sample application which will  save only the  TextBlocks checkbox  as said below in last post and  only if you have. it would be very helpful for us.

Thanks,
Vivek.
0
Alex Fidanov
Telerik team
answered on 16 Aug 2011, 09:54 AM
Hi Vivek,

Actually, my suggestion was to avoid persisting TextBlocks, as they cannot be editted by the end user. What I had in mind is to set separate StorageId's only to the elements that can be editted, similar to what you have already done with the separate TabItems: telerik:PersistenceManager.StorageId="OptionsControlId1".

Kind regards,
Alex Fidanov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

0
Vivek
Top achievements
Rank 1
answered on 16 Aug 2011, 10:11 AM
Hi Alex,

I tired adding this to telerik:PersistenceManager.StorageId="OptionsTab1"  all controls which user can edit. and on click of Ok button I am saving all states.
//On Button click
 // save settings if any registered
 
  IsolatedStorageProvider provider = new IsolatedStorageProvider();
 
  provider.SaveToStorage();

As you know I have three RadTab items so so I have three Tabs with all filled controls. so for the second tab also I am saving stsates on click of ok button by doing telerik:PersistenceManager.StorageId="OptionsTab2" to all controls which user can edit. and adding save button click as the I have three ok for all three tabs items.

And for third Tab also I am doing same thing but telerik:PersistenceManager.StorageId="OptionsTab3" and on click of Ok button Saving the value as above.

Problems
1. On click of Ok buttons the process is very slow means its taking time to save it I can see its taking around 50 sec to complete the save process then I have a commond to close the Radwindow, so its closing after 50 sec.

2. On load of this Radwindow I am loading the save value by doing this.

//Loading saved value on Window load
// load existing settings for registered objects
 
  IsolatedStorageProvider provider = new IsolatedStorageProvider();
 
  provider.LoadFromStorage();

its behaving strange sometimes its showing old value sometimes not.

Please let me know what else I can do.

Thanks for the reply and please help us to solve this problem.

Thanks,
Vivek.
0
Alex Fidanov
Telerik team
answered on 17 Aug 2011, 09:42 AM
Hello Vivek,

In this case, I would recommend increasing the quota of the application to an appropriate size before saving the user's preferences. You can see how to increase the quota manually here.
Moreover, as of the latest internal build, we have exposed such method on the IsolatedStorageProvider as well.

Kind regards,
Alex Fidanov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Tags
PersistenceFramework
Asked by
Vivek
Top achievements
Rank 1
Answers by
Alex Fidanov
Telerik team
Vivek
Top achievements
Rank 1
Share this question
or