This HTML5 document contains 38 embedded RDF statements represented using HTML+Microdata notation.

The embedded RDF content will be recognized by any processor of HTML5 Microdata.

PrefixNamespace IRI
n21http://vos.openlinksw.com/wiki/main/VOS/VirtSPASQLSilverLightApp/browser.
n24http://vos.openlinksw.com/dataspace/owiki/wiki/VOS/VirtSPASQLSilverLightApp/sioc.
dctermshttp://purl.org/dc/terms/
atomhttp://atomowl.org/ontologies/atomrdf#
foafhttp://xmlns.com/foaf/0.1/
n12http://vos.openlinksw.com/dataspace/services/wiki/
oplhttp://www.openlinksw.com/schema/attribution#
n2http://vos.openlinksw.com/dataspace/owiki/wiki/VOS/
dchttp://purl.org/dc/elements/1.1/
n25http://vos.openlinksw.com/dataspace/dav#
n17http://vos.openlinksw.com:80/wiki/main/VOS/VirtSPASQLSilverLightApp/.DS_Store.
rdfshttp://www.w3.org/2000/01/rdf-schema#
n19http://vos.openlinksw.com:80/wiki/main/VOS/VirtSPASQLSilverLightApp/.
n11http://rdfs.org/sioc/services#
n10http://vos.openlinksw.com/wiki/main/VOS/VirtSPASQLSilverLightApp/SilverlightApp.
siocthttp://rdfs.org/sioc/types#
n4http://vos.openlinksw.com/dataspace/person/dav#
n14http://vos.openlinksw.com/wiki/main/VOS/VirtSPASQLSilverLightApp/AddSilverlightApp.
n9http://vos.openlinksw.com/wiki/main/VOS/VirtSPASQLSilverLightApp/Description.
n13http://vos.openlinksw.com/wiki/main/VOS/VirtSPASQLSilverLightApp/.
n7http://vos.openlinksw.com/dataspace/owiki/wiki/
rdfhttp://www.w3.org/1999/02/22-rdf-syntax-ns#
n18http://www.microsoft.com/downloads/details.aspx?FamilyId=c22d6a7b-546f-4407-8ef6-d60c8ee221ed&displaylang=
n22http://vos.openlinksw.com/dataspace/owiki#
xsdhhttp://www.w3.org/2001/XMLSchema#
n20http://vos.openlinksw.com/dataspace/person/owiki#
siochttp://rdfs.org/sioc/ns#
Subject Item
n4:this
foaf:made
n2:VirtSPASQLSilverLightApp
Subject Item
n25:this
sioc:creator_of
n2:VirtSPASQLSilverLightApp
Subject Item
n12:item
n11:services_of
n2:VirtSPASQLSilverLightApp
Subject Item
n22:this
sioc:creator_of
n2:VirtSPASQLSilverLightApp
Subject Item
n7:VOS
sioc:container_of
n2:VirtSPASQLSilverLightApp
atom:entry
n2:VirtSPASQLSilverLightApp
atom:contains
n2:VirtSPASQLSilverLightApp
Subject Item
n2:VirtSPASQLSilverLightApp
rdf:type
atom:Entry sioct:Comment
dcterms:created
2017-06-13T05:37:03.974849
dcterms:modified
2017-06-29T07:40:20.987188
rdfs:label
VirtSPASQLSilverLightApp
foaf:maker
n4:this n20:this
dc:title
VirtSPASQLSilverLightApp
opl:isDescribedUsing
n24:rdf
sioc:has_creator
n22:this n25:this
sioc:attachment
n9:png n10:png n13:DS_Store n14:png n17:xWogJW n19:DS_Store n21:png
sioc:content
%META:TOPICPARENT{name="VirtSPASQLWebDataServiceApp"}% ---+ Creating a Silverlight Application to consume the service %TOC% ---++ Introduction This document will guide you through creating an application for Silverlight that will consume the ADO.NET Data Service created in [[VirtSPASQLWebDataServiceApp][Creating a Web Browser Application to Access RDF Data using the Virtuoso ADO.NET Provider]]. ---++ Prerequisites 1 The [[http://www.microsoft.com/downloads/details.aspx?FamilyId=c22d6a7b-546f-4407-8ef6-d60c8ee221ed&displaylang=en][Microsoft Silverlight 2 Tools for Visual Studio 2008 SP1]] 1 The ADO.NET Data Service created in [[VirtSPASQLWebDataServiceApp][Creating a Web Browser Application to Access RDF Data Using The Virtuoso ADO.NET Provider]] 1 The Visual Studio project used to create the ADO.NET Data Service ---++ Creating the Application for Silverlight 1 Open the ADO.NET Data Service project in <b>Visual Studio</b>. 1 In the <b>Solution Explorer</b> right click on the <nowiki>RDFWebDemo</nowiki> solution and add a new Project. 1 In the <b>Add New Project</b> dialog select <b>Silverlight Application</b> and click <b>OK</b>. This will open the <b>Add Silverlight Application</b> dialog. %BR%%BR%<img src="%ATTACHURLPATH%/SilverlightApp.png" style="wikiautogen"/>%BR%%BR% 1 Select <b>Link this Silverlight Control into an existing Web Site</b> and make sure the Web Site selected is <nowiki>RDFWebDemo</nowiki>. Select <b>Add a test page that references the application</b> and <b>Make it the start page</b>. %BR%%BR%<img src="%ATTACHURLPATH%/AddSilverlightApp.png" style="wikiautogen"/>%BR%%BR% 1 In <b>Solution Explorer</b>, select <b><nowiki>RDFWebDemo</nowiki></b>, open the <b>Project</b> menu and select <b>Properties</b>. 1 Select the <b>Web</b> tab, and select <b>Specific Page</b> in the <b>Start Action</b> section. Click on the ellipsis ("<b>?</b>") and select <b><nowiki>SilverlightApplication1TestPage.html</nowiki></b> as the start page. 1 Add a reference to the data service. In the <b>Solution Explorer</b> right click on <b><nowiki>SilverlightApplication1</nowiki></b> and select <b>Add Service Reference</b>. 1 In the <b>Add Service Reference</b> dialog click the <b>Discover</b> button. Your ADO.NET Data Service should appear in the Address box and the Services box. 1 Select the service and click <b>OK</b>. <b><nowiki>ServiceReference1</nowiki></b> will now be added to the <b><nowiki>ServiceReferences</nowiki></b>. 1 Open <b>page.xaml.cs</b> and add references to the service and to the <b>System.Data.Services.Client</b> assembly by adding the following using statements at the top of the file: <verbatim> using System.Data.Services.Client; using SilverlightApplication1.ServiceReference1; </verbatim> 1 We need to create a data service context to reference the data from the service and to load data from the view, <code>sparqlview</code>, exposed by the service. Add the following lines to the page constructor after <b><nowiki>InitializeComponent()</nowiki></b> &mdash; <verbatim> DataServiceContext svcCtx = new DataServiceContext(new Uri("WebDataService1.svc", UriKind.Relative)); svcCtx.BeginExecute<sparqlview>(new Uri("sparqlview", UriKind.Relative), loadSCallback, svcCtx); </verbatim> 1 Add the <b><nowiki>loadSCallback</nowiki></b> method to the page class. The method loads the data from sparqlview and puts it in a List. This List populates a list box on the page. <verbatim> private void loadSCallback(IAsyncResult asyncResult) { List<Uri> uList = new List<Uri>(); DataServiceContext ctx = asyncResult.AsyncState as DataServiceContext; foreach (sparqlview sv in ctx.EndExecute<sparqlview>(asyncResult)) uList.Add(new Uri(sv.s)); listBox1.DataContext = uList; } </verbatim> 1 Add the list box to the page. In the <b>Solution Explorer</b> double click on <b>page.xaml</b> to open it in the editor. Add the following code between the &lt;grid&gt; and &lt;/grid&gt; tags. <verbatim> <ListBox x:Name="listBox1" HorizontalAlignment="Stretch" Margin="25,8,26,-78" Grid.RowSpan="1" Grid.Row="0" VerticalAlignment="Stretch" ItemsSource="{Binding Mode=OneWay}" > <ListBox.ItemTemplate> <DataTemplate> <StackPanel x:Name="DisplayListData" Orientation="Horizontal" VerticalAlignment="Bottom" Margin="5" > <HyperlinkButton Content ="{Binding}" NavigateUri="{Binding}" Margin="5,0,0,0" VerticalAlignment="Bottom" HorizontalAlignment="Left" FontSize="12"> </HyperlinkButton> </StackPanel> </DataTemplate> </ListBox.ItemTemplate> </ListBox> </verbatim> 1 Build the Silverlight application and launch without debugging using <b>Ctrl-F5</b>. This will launch the browser and open <code>SilverlightApplication1TestPage.aspx</code>. %BR%%BR%<img src="%ATTACHURLPATH%/browser.png" style="wikiautogen"/>%BR%%BR% Clicking on one of the IRIs will open the page using <code>description.vsp</code>. %BR%%BR%<img src="%ATTACHURLPATH%/Description.png" style="wikiautogen"/>%BR%%BR% ---++ Related * [[VirtAdoNetDataGridApp][Using Visual Studio 2008 to Build a Data Grid Form Application]] * [[VirtEntityFrameworkSchoolDbWinFormApp][Using Visual Studio 2008 to Build an Entity Frameworks-based Windows Form Application]] * [[VirtUsingMsAdoNetDataServicesWithVirtuoso][Using Visual Studio 2008 to Build an ADO.NET Data Services-based Application]] * [[VirtSPASQLWinFormApp][Windows Form Application for accessing Virtuoso RDF data via SPASQL using the Virtuoso ADO.NET Provider]] * [[VirtSPASQLWebDataServiceApp][Web Data Service Application for accessing Virtuoso RDF data via SPASQL using the Virtuoso ADO.NET Provider]]
sioc:id
ce2197840abe15bfe7998aa6035dc57c
sioc:link
n2:VirtSPASQLSilverLightApp
sioc:has_container
n7:VOS
n11:has_services
n12:item
atom:title
VirtSPASQLSilverLightApp
sioc:links_to
n18:en n2:VirtAdoNetDataGridApp
atom:source
n7:VOS
atom:author
n4:this
atom:published
2017-06-13T05:37:03Z
atom:updated
2017-06-29T07:40:20Z
sioc:topic
n7:VOS