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
215
Persistence issue
posted

Dear infragistics team

 

I'm new to infragistics Silverlight controls and would like to use them in my project but have issue with persisting XamTileManager layout with PersistenceManager,  the main issue is that "layout is not being persisted.

Below is example to reproduce it, also notice that if I remove TileLayoutOrder="UseExplicitRowColumnOnTile" attribute declaration then the   XamTileManager layout is persisted, but I need the persistence to work with that attribute

 

Xaml :

 

 <ig:XamTileManager x:Name="tileManager" ItemsSource="{Binding Panels}">            

      <ig:XamTileManager.NormalModeSettings>

                <ig:NormalModeSettings  TileLayoutOrder="UseExplicitRowColumnOnTile"/> 

            </ig:XamTileManager.NormalModeSettings>

</ig:XamTileManager>

 

Code behind:

 

 void MainPage_Loaded(object sender, RoutedEventArgs e)

 {

            this.DataContext = new ViewModel();

 }

 

 

private void btnSave_Click(object sender, System.Windows.RoutedEventArgs e)

        {

            var memStream = PersistenceManager.Save(tileManager);

            FileStream fs = new FileStream(@"D:\LayoutState.dat", FileMode.Create);

            fs.Write(memStream.ToArray(), 0, (int)memStream.Length);

            fs.Close();                                       

        }

 

private void btnLoad_Click(object sender, System.Windows.RoutedEventArgs e)

 {

            if (File.Exists(@"D:\manState.dat"))

            {

                FileStream fs = new FileStream(@"D:\ LayoutState.dat", FileMode.Open);

                PersistenceManager.Load(tileManager, fs);

            }        

 }

 

 

 

ViewModel class:

 

 public class ViewModel

    {

        public ViewModel()

        {

            this.Panels = new ObservableCollection<PanelModel>();

            this.Panels.Add(new PanelModel() { Title = "Tile Item 1" });

        }

        public ObservableCollection<PanelModel> Panels {get;set;}

 

}

 

 

Thanks in advance

Xusan

Parents
No Data
Reply Children
No Data