зеркало из https://github.com/telerik/xaml-sdk.git
New version of Telerik SDK examples.
This commit is contained in:
Родитель
a462de8586
Коммит
08008671fd
|
@ -1,9 +1,9 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.31112.23
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.7.34031.279
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OData4Consumption", "OData4Consumption\OData4Consumption.csproj", "{DCAD10B8-6C6E-4BB4-AB1F-D23AA90E03A3}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OData4Consumption", "OData4ConsumptionNetCore\OData4Consumption.csproj", "{60274A79-55AC-4171-82E2-AA98C9EC586E}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
@ -11,10 +11,10 @@ Global
|
|||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{DCAD10B8-6C6E-4BB4-AB1F-D23AA90E03A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DCAD10B8-6C6E-4BB4-AB1F-D23AA90E03A3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DCAD10B8-6C6E-4BB4-AB1F-D23AA90E03A3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DCAD10B8-6C6E-4BB4-AB1F-D23AA90E03A3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{60274A79-55AC-4171-82E2-AA98C9EC586E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{60274A79-55AC-4171-82E2-AA98C9EC586E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{60274A79-55AC-4171-82E2-AA98C9EC586E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{60274A79-55AC-4171-82E2-AA98C9EC586E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@ -22,13 +22,4 @@ Global
|
|||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {08EB110B-CCE8-4FA8-B8F5-63628E2B7EA3}
|
||||
EndGlobalSection
|
||||
GlobalSection(TeamFoundationVersionControl) = preSolution
|
||||
SccNumberOfProjects = 2
|
||||
SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
|
||||
SccTeamFoundationServer = https://tfsemea.progress.com/defaultcollection
|
||||
SccProjectUniqueName0 = OData4Consumption\\OData4Consumption.csproj
|
||||
SccProjectName0 = OData4Consumption
|
||||
SccLocalPath0 = OData4Consumption
|
||||
SccLocalPath1 = .
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<Application x:Class="OData4Consumption.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
StartupUri="MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
|
||||
</Application.Resources>
|
||||
</Application>
|
|
@ -0,0 +1,8 @@
|
|||
using System.Windows;
|
||||
|
||||
namespace OData4Consumption
|
||||
{
|
||||
public partial class App : Application
|
||||
{
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"ProviderId": "Microsoft.OData.ConnectedService",
|
||||
"Version": "0.2.0",
|
||||
"GettingStartedDocument": {
|
||||
"Uri": "http://odata.github.io/odata.net/"
|
||||
},
|
||||
"ExtendedData": {
|
||||
"EnableNamingAlias": false,
|
||||
"IgnoreUnexpectedElementsAndAttributes": false,
|
||||
"IncludeT4File": false,
|
||||
"ServiceName": "OData Service",
|
||||
"Endpoint": "http://services.odata.org/V4/Northwind/Northwind.svc/$metadata",
|
||||
"EdmxVersion": {
|
||||
"Major": 4,
|
||||
"Minor": 0,
|
||||
"Build": 0,
|
||||
"Revision": 0,
|
||||
"MajorRevision": 0,
|
||||
"MinorRevision": 0
|
||||
},
|
||||
"GeneratedFileNamePrefix": "NorthwindEntities",
|
||||
"UseNameSpacePrefix": false,
|
||||
"NamespacePrefix": null,
|
||||
"UseDataServiceCollection": true
|
||||
}
|
||||
}
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,23 @@
|
|||
<Window x:Class="OData4Consumption.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
|
||||
xmlns:local="clr-namespace:OData4Consumption"
|
||||
mc:Ignorable="d"
|
||||
Title="MainWindow" Height="700" Width="800">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<telerik:RadDataServiceDataSource Name="customersDataSource" QueryName="Customers" AutoLoad="True">
|
||||
<telerik:RadDataServiceDataSource.DataServiceContext>
|
||||
<local:MyNorthwindContext />
|
||||
</telerik:RadDataServiceDataSource.DataServiceContext>
|
||||
</telerik:RadDataServiceDataSource>
|
||||
<telerik:RadGridView Grid.Row="0" ItemsSource="{Binding DataView, ElementName=customersDataSource}" IsReadOnly="True" IsBusy="{Binding IsBusy, ElementName=customersDataSource}" ShowGroupPanel="False"/>
|
||||
<telerik:RadDataPager Grid.Row="1" Source="{Binding DataView, ElementName=customersDataSource}" PageSize="20" />
|
||||
</Grid>
|
||||
</Window>
|
|
@ -0,0 +1,12 @@
|
|||
using System.Windows;
|
||||
|
||||
namespace OData4Consumption
|
||||
{
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
using ODataWebExperimental.Northwind.Model;
|
||||
using System;
|
||||
|
||||
namespace OData4Consumption
|
||||
{
|
||||
public class MyNorthwindContext : NorthwindEntities
|
||||
{
|
||||
public MyNorthwindContext() :
|
||||
base(new Uri("http://services.odata.org/V4/Northwind/Northwind.svc/", UriKind.Absolute))
|
||||
{ }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<UseWPF>true</UseWPF>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.OData.Client" Version="7.8.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="Telerik.Windows.Controls">
|
||||
<HintPath>$(TELERIKWPFDIR)\Binaries\NetCore\Telerik.Windows.Controls.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Telerik.Windows.Controls.Data">
|
||||
<HintPath>$(TELERIKWPFDIR)\Binaries\NetCore\Telerik.Windows.Controls.Data.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Telerik.Windows.Controls.DataServices">
|
||||
<HintPath>$(TELERIKWPFDIR)\Binaries\NetCore\Telerik.Windows.Controls.DataServices.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Telerik.Windows.Controls.GridView">
|
||||
<HintPath>$(TELERIKWPFDIR)\Binaries\NetCore\Telerik.Windows.Controls.GridView.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Telerik.Windows.Controls.Input">
|
||||
<HintPath>$(TELERIKWPFDIR)\Binaries\NetCore\Telerik.Windows.Controls.Input.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Telerik.Windows.Data">
|
||||
<HintPath>$(TELERIKWPFDIR)\Binaries\NetCore\Telerik.Windows.Data.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -0,0 +1,4 @@
|
|||
## Consume OData 4 Service
|
||||
This example demonstrates how to consume a OData 4 service with RadDataServiceDataSource and display the loaded data with RadGridView and RadDataPager.
|
||||
|
||||
[//]: <keywords: odata, raddataservicedatasource, radgridview, raddatapager>
|
Загрузка…
Ссылка в новой задаче