Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > Scheduler > Export file from App.xaml.cs

Not answered Export file from App.xaml.cs

Feed from this thread
  • Maarten avatar

    Posted on Jul 18, 2011 (permalink)

    Hello Telerik Team,

    Here I am again.

    public partial class App : Application
        {
            private void Click_SaveBttn(object sender, RoutedEventArgs e)
            {
                string path = "C://Users//Maar//Desktop//iCal//radSchedulerTest.ics";
     
                if (File.Exists(path) || !File.Exists(path))
                {
                    try
                    {
                        using (TextWriter writer = new StreamWriter(path))
                        {
                            AppointmentCalendarExporter exporter = new AppointmentCalendarExporter();
                            exporter.Export(scheduler.Appointments, writer);
                        }
                    }
                    catch (CalendarParseException ex)
                    {
                        MessageBox.Show(ex.Message);
                    }
                }
            }
        }

    At the line where it says:exporter.Export(scheduler.Appointments, writer);

    there's an error on it, it says: The name 'scheduler' does not exist in the current context.

    The scheduler is my scheduler on my MainWindow. How can I get this error go away?

    Thanks in advance!
    Maarten

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > Scheduler > Export file from App.xaml.cs
Related resources for "Export file from App.xaml.cs"

WPF Scheduler Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]