The following quick start guide is intended to get you up and running with Scheduler for WPF. In this quick start you'll create a new Expression Blend project, add Scheduler to your application, bind to a data source, and customize the schedule.
or
Add the NuGet packages by following these steps:
XAML |
コードのコピー
|
---|---|
<c1:C1Scheduler x:Name="scheduler"></c1:C1Scheduler> |
C# |
コードのコピー
|
---|---|
using C1.C1Schedule; using System.Windows.Controls; using ProjectNAME.C1NWindDataSetTableAdapters; |
Note that the using statement should contain the name of your project in order to work correctly. It will be used to set up the table adapter for your data set. The Imports statement should be used for Visual Basic projects.
C# |
コードのコピー
|
---|---|
public partial class MainWindow : Window { private AppointmentsTableAdapter _appointmentsTableAdapter; private AppointeesTableAdapter _appointeesTableAdapter; private C1NwindDataSet _dataSet; public C1NwindDataSet DataSet => _dataSet; public MainWindow() { InitializeComponent(); _dataSet = new C1NwindDataSet(); _appointeesTableAdapter = new AppointeesTableAdapter(); _appointmentsTableAdapter = new AppointmentsTableAdapter(); _appointmentsTableAdapter.Fill(_dataSet.Appointments); _appointeesTableAdapter.Fill(_dataSet.Appointees); } } |
Map the database to the Appointment Storage by adding the following XAML code between the <c1:C1Scheduler>
</c1:C1Scheduler>
tag or adding the following C# code in the MainWindow() constructor:
これで、スケジュールアプリケーションを作成し、スケジュールをデータソースに連結できたので、最後にアプリケーションを実行してみます。
スケジュールアプリケーションを実行して、Scheduler for WPF の実行時の動作を確認するには