Skip to content

Commit 433aa59

Browse files
sample files are added.
1 parent 887e9bc commit 433aa59

15 files changed

+917
-0
lines changed

App.ico

4.19 KB
Binary file not shown.

App.xaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<Application
2+
x:Class="DataBinding.App"
3+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5+
StartupUri="MainWindow.xaml">
6+
</Application>

App.xaml.cs

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
using System.IO;
2+
using System.Reflection;
3+
using System.Text;
4+
using System.Windows;
5+
6+
namespace DataBinding
7+
{
8+
/// <summary>
9+
/// Interaction logic for App.xaml
10+
/// </summary>
11+
public partial class App : Application
12+
{
13+
public App()
14+
{
15+
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense(FindLicenseKey());
16+
}
17+
18+
/// <summary>
19+
/// Helper method to find a syncfusion license key from the Common folder
20+
/// </summary>
21+
/// <returns></returns>
22+
public static string FindLicenseKey()
23+
{
24+
int levelsToCheck = 12;
25+
string filePath = @"Common\SyncfusionLicense.txt";
26+
27+
string rootPath = System.IO.Path.GetDirectoryName(Assembly.GetEntryAssembly().CodeBase.Replace(@"file:///", ""));
28+
29+
for (int n = 0; n < levelsToCheck; n++)
30+
{
31+
string fileDataPath = System.IO.Path.Combine(rootPath, filePath);
32+
if (System.IO.File.Exists(fileDataPath))
33+
return File.ReadAllText(fileDataPath, Encoding.UTF8);
34+
DirectoryInfo rootDirectory = Directory.GetParent(rootPath);
35+
if (rootDirectory == null)
36+
break;
37+
rootPath = rootDirectory.FullName;
38+
39+
}
40+
return string.Empty;
41+
}
42+
}
43+
}

DataBinding_2010.csproj

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{20D883D2-4420-4477-B706-ABCAF9AA6BCB}</ProjectGuid>
8+
<OutputType>WinExe</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>DataBinding</RootNamespace>
11+
<AssemblyName>DataBindingDemo</AssemblyName>
12+
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
15+
<WarningLevel>4</WarningLevel>
16+
<TargetFrameworkProfile />
17+
</PropertyGroup>
18+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
19+
<PlatformTarget>AnyCPU</PlatformTarget>
20+
<DebugSymbols>true</DebugSymbols>
21+
<DebugType>full</DebugType>
22+
<Optimize>false</Optimize>
23+
<OutputPath>bin\Debug\</OutputPath>
24+
<DefineConstants>DEBUG;TRACE</DefineConstants>
25+
<ErrorReport>prompt</ErrorReport>
26+
<WarningLevel>4</WarningLevel>
27+
</PropertyGroup>
28+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
29+
<PlatformTarget>AnyCPU</PlatformTarget>
30+
<DebugType>pdbonly</DebugType>
31+
<Optimize>true</Optimize>
32+
<OutputPath>bin\Release\</OutputPath>
33+
<DefineConstants>TRACE</DefineConstants>
34+
<ErrorReport>prompt</ErrorReport>
35+
<WarningLevel>4</WarningLevel>
36+
</PropertyGroup>
37+
<PropertyGroup>
38+
<StartupObject>DataBinding.App</StartupObject>
39+
</PropertyGroup>
40+
<ItemGroup>
41+
<Reference Include="Syncfusion.Licensing" />
42+
<Reference Include="Syncfusion.SfInput.WPF"/>
43+
<Reference Include="Syncfusion.SfShared.WPF"/>
44+
<Reference Include="Syncfusion.Shared.WPF" />
45+
<Reference Include="Syncfusion.SfScheduler.WPF" />
46+
<Reference Include="Syncfusion.SfSkinManager.WPF" />
47+
<Reference Include="Syncfusion.Themes.MaterialLight.WPF">
48+
<private>True</private>
49+
</Reference>
50+
<Reference Include="System" />
51+
<Reference Include="System.Data" />
52+
<Reference Include="System.Xml" />
53+
<Reference Include="Microsoft.CSharp" />
54+
<Reference Include="System.Core" />
55+
<Reference Include="System.Xml.Linq" />
56+
<Reference Include="System.Data.DataSetExtensions" />
57+
<Reference Include="System.Xaml">
58+
<RequiredTargetFramework>4.0</RequiredTargetFramework>
59+
</Reference>
60+
<Reference Include="WindowsBase" />
61+
<Reference Include="PresentationCore" />
62+
<Reference Include="PresentationFramework" />
63+
</ItemGroup>
64+
<ItemGroup>
65+
<ApplicationDefinition Include="App.xaml">
66+
<Generator>MSBuild:Compile</Generator>
67+
<SubType>Designer</SubType>
68+
</ApplicationDefinition>
69+
<Compile Include="Model\Meeting.cs" />
70+
<Compile Include="ViewModel\ScheduleViewModel.cs" />
71+
<Page Include="MainWindow.xaml">
72+
<Generator>MSBuild:Compile</Generator>
73+
<SubType>Designer</SubType>
74+
</Page>
75+
<Compile Include="App.xaml.cs">
76+
<DependentUpon>App.xaml</DependentUpon>
77+
<SubType>Code</SubType>
78+
</Compile>
79+
<Compile Include="MainWindow.xaml.cs">
80+
<DependentUpon>MainWindow.xaml</DependentUpon>
81+
<SubType>Code</SubType>
82+
</Compile>
83+
</ItemGroup>
84+
<ItemGroup>
85+
<Compile Include="Properties\AssemblyInfo.cs">
86+
<SubType>Code</SubType>
87+
</Compile>
88+
<Compile Include="Properties\Resources.Designer.cs">
89+
<AutoGen>True</AutoGen>
90+
<DesignTime>True</DesignTime>
91+
<DependentUpon>Resources.resx</DependentUpon>
92+
</Compile>
93+
<Compile Include="Properties\Settings.Designer.cs">
94+
<AutoGen>True</AutoGen>
95+
<DependentUpon>Settings.settings</DependentUpon>
96+
<DesignTimeSharedInput>True</DesignTimeSharedInput>
97+
</Compile>
98+
<EmbeddedResource Include="Properties\Resources.resx">
99+
<Generator>ResXFileCodeGenerator</Generator>
100+
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
101+
</EmbeddedResource>
102+
<None Include="Properties\Settings.settings">
103+
<Generator>SettingsSingleFileGenerator</Generator>
104+
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
105+
</None>
106+
<AppDesigner Include="Properties\" />
107+
</ItemGroup>
108+
<ItemGroup>
109+
<Resource Include="App.ico" />
110+
</ItemGroup>
111+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
112+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
113+
Other similar extension points exist, see Microsoft.Common.targets.
114+
<Target Name="BeforeBuild">
115+
</Target>
116+
<Target Name="AfterBuild">
117+
</Target>
118+
-->
119+
</Project>

DataBinding_2010.sln

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 11.00
3+
# Visual Studio 2010
4+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataBinding_2010", "DataBinding_2010.csproj", "{20D883D2-4420-4477-B706-ABCAF9AA6BCB}"
5+
EndProject
6+
Global
7+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
8+
Debug|Any CPU = Debug|Any CPU
9+
Release|Any CPU = Release|Any CPU
10+
Release-Xml|Any CPU = Release-Xml|Any CPU
11+
EndGlobalSection
12+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
13+
{20D883D2-4420-4477-B706-ABCAF9AA6BCB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
14+
{20D883D2-4420-4477-B706-ABCAF9AA6BCB}.Debug|Any CPU.Build.0 = Debug|Any CPU
15+
{20D883D2-4420-4477-B706-ABCAF9AA6BCB}.Release|Any CPU.ActiveCfg = Release|Any CPU
16+
{20D883D2-4420-4477-B706-ABCAF9AA6BCB}.Release|Any CPU.Build.0 = Release|Any CPU
17+
{20D883D2-4420-4477-B706-ABCAF9AA6BCB}.Release-Xml|Any CPU.ActiveCfg = Release|Any CPU
18+
{20D883D2-4420-4477-B706-ABCAF9AA6BCB}.Release-Xml|Any CPU.Build.0 = Release|Any CPU
19+
EndGlobalSection
20+
GlobalSection(SolutionProperties) = preSolution
21+
HideSolutionNode = FALSE
22+
EndGlobalSection
23+
GlobalSection(ExtensibilityGlobals) = postSolution
24+
SolutionGuid = {D32E4403-13B1-4370-9EBD-2386D407003C}
25+
EndGlobalSection
26+
EndGlobal

MainWindow.xaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<Window
2+
x:Class="DataBinding.MainWindow"
3+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5+
xmlns:local="clr-namespace:DataBinding"
6+
xmlns:system="clr-namespace:System;assembly=mscorlib"
7+
xmlns:skinmanager ="clr-namespace:Syncfusion.SfSkinManager;assembly=Syncfusion.SfSkinManager.WPF"
8+
xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
9+
skinmanager:SfSkinManager.VisualStyle="MaterialLight"
10+
Title="Data Binding"
11+
Icon="App.ico"
12+
WindowStartupLocation="CenterScreen">
13+
14+
<Window.DataContext>
15+
<local:ScheduleViewModel/>
16+
</Window.DataContext>
17+
18+
<Grid>
19+
<syncfusion:SfScheduler x:Name="Schedule"
20+
ItemsSource="{Binding Events}"
21+
ViewType="Month">
22+
<syncfusion:SfScheduler.AppointmentMapping>
23+
<syncfusion:AppointmentMapping
24+
Subject="EventName"
25+
StartTime="From"
26+
EndTime="To"
27+
AppointmentBackground="Color"
28+
IsAllDay="IsAllDay"
29+
StartTimeZone="StartTimeZone"
30+
EndTimeZone="EndTimeZone"/>
31+
</syncfusion:SfScheduler.AppointmentMapping>
32+
</syncfusion:SfScheduler>
33+
</Grid>
34+
</Window>

MainWindow.xaml.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using System.Windows;
2+
3+
namespace DataBinding
4+
{
5+
/// <summary>
6+
/// Interaction logic for MainWindow.xaml
7+
/// </summary>
8+
public partial class MainWindow : Window
9+
{
10+
public MainWindow()
11+
{
12+
this.InitializeComponent();
13+
}
14+
}
15+
}
16+

Model/Meeting.cs

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
using Syncfusion.Windows.Shared;
2+
using System;
3+
using System.Collections.Generic;
4+
using System.ComponentModel;
5+
using System.Linq;
6+
using System.Text;
7+
using System.Threading.Tasks;
8+
using System.Windows.Media;
9+
10+
namespace DataBinding
11+
{
12+
public class Meeting : INotifyPropertyChanged
13+
{
14+
DateTime from, to;
15+
string eventName;
16+
bool isAllDay;
17+
string startTimeZone, endTimeZone;
18+
Brush color;
19+
public Meeting()
20+
{
21+
}
22+
23+
public DateTime From
24+
{
25+
get { return from; }
26+
set
27+
{
28+
from = value;
29+
RaisePropertyChanged("From");
30+
}
31+
}
32+
33+
public DateTime To
34+
{
35+
get { return to; }
36+
set
37+
{
38+
to = value;
39+
RaisePropertyChanged("To");
40+
}
41+
}
42+
43+
public bool IsAllDay
44+
{
45+
get { return isAllDay; }
46+
set
47+
{
48+
isAllDay = value;
49+
RaisePropertyChanged("IsAllDay");
50+
}
51+
}
52+
public string EventName
53+
{
54+
get { return eventName; }
55+
set
56+
{
57+
eventName = value;
58+
RaisePropertyChanged("EventName");
59+
}
60+
}
61+
public string StartTimeZone
62+
{
63+
get { return startTimeZone; }
64+
set
65+
{
66+
startTimeZone = value;
67+
RaisePropertyChanged("StartTimeZone");
68+
}
69+
}
70+
public string EndTimeZone
71+
{
72+
get { return endTimeZone; }
73+
set
74+
{
75+
endTimeZone = value;
76+
RaisePropertyChanged("EndTimeZone");
77+
}
78+
}
79+
80+
public Brush Color
81+
{
82+
get { return color; }
83+
set
84+
{
85+
color = value;
86+
RaisePropertyChanged("Color");
87+
}
88+
}
89+
90+
public event PropertyChangedEventHandler PropertyChanged;
91+
protected virtual void RaisePropertyChanged(string propertyName, object oldValue = null)
92+
{
93+
this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
94+
}
95+
96+
}
97+
}

0 commit comments

Comments
 (0)