{"id":1248,"date":"2013-08-30T07:44:15","date_gmt":"2013-08-30T06:44:15","guid":{"rendered":"http:\/\/www.minddriven.de\/?p=1248"},"modified":"2013-10-28T15:46:24","modified_gmt":"2013-10-28T14:46:24","slug":"winrt-xaml-validation-getting-started","status":"publish","type":"post","link":"https:\/\/www.minddriven.de\/index.php\/technology\/windows-8\/winrt\/winrt-xaml-validation-getting-started","title":{"rendered":"WinRT XAML Validation library: Getting Started"},"content":{"rendered":"<p>This little blog posts describes how you can include the WinRT XAML Validation library in your project and get it to work.<\/p>\n<h3>Download<\/h3>\n<p>First go to the <a href=\"winrtxamlvalidation.codeplex.com\">WinRT XAML Validation Codeplex project page<\/a> and download the latest bits. The download package includes the sources of the library as well as a demo project (Windows Store App), which showcases many of the concepts and features of the library:<\/p>\n<p><a href=\"http:\/\/www.minddriven.de\/wp-content\/uploads\/2013\/08\/Validation_Library_Structure.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-1265\" style=\"margin-right: 20px;\" title=\"WinRT XAML Validation structure\" src=\"http:\/\/www.minddriven.de\/wp-content\/uploads\/2013\/08\/Validation_Library_Structure1.png\" alt=\"\" width=\"255\" height=\"300\" \/><\/a><a href=\"http:\/\/www.minddriven.de\/wp-content\/uploads\/2013\/08\/Validation_Demo.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-thumbnail wp-image-1258\" title=\"Validation Example\" src=\"http:\/\/www.minddriven.de\/wp-content\/uploads\/2013\/08\/Validation_Demo_21-450x300.png\" alt=\"\" width=\"450\" height=\"300\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h3>Usage by Source<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-1260\" style=\"margin-right: 20px; margin-bottom: 10px;\" title=\"Structure for Usage by Source\" src=\"http:\/\/www.minddriven.de\/wp-content\/uploads\/2013\/08\/Validation_Include_Sources.png\" alt=\"\" width=\"289\" height=\"298\" \/>To use the WinRT XAML Validation library, you have two possibilities. The first one is to include the library sources. To do this, copy the <code>WinRTXAMLValidation.Library<\/code> project to your app&#8217;s solution folder and add the existing <code>WinRTXAMLValidation.Library.csproj<\/code> project to your solution.<\/p>\n<p>Add a reference to the library project everywhere you want to use the validation functionality. To get the UI control to work properly, you have to include the <code>ValidationStyles.xaml<\/code> file from the <code>Styles<\/code> folder of the library in your project. There are two different ways to do this:<\/p>\n<div style=\"margin-left: 300px;\">\n<ul>\n<li>Copy the <code>ValidationStyles.xaml<\/code> file to your Windows Store App project and reference it as <code>ResourceDictionary<\/code> in your <code>App.xaml<\/code>.<\/li>\n<li>Add the <code>ValidationStyles.xaml<\/code> file as link in your Windows Store App project and reference it as <code>ResourceDictionary<\/code> in your <code>App.xaml<\/code>.<\/li>\n<\/ul>\n<\/div>\n<p>You&#8217;re free to choose from these approaches. Go the &#8222;copy way&#8220; if you want to adapt the validation styles to your needs. Go the &#8222;add as link&#8220; way if you simply want to use the UI controls as they are.<\/p>\n<p><div style=\"clear:both;\"><\/div>\n<\/p>\n<h3>Usage by Assembly<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-1263\" style=\"margin-right: 20px; margin-bottom: 10px;\" title=\"Structure for Usage by Assembly\" src=\"http:\/\/www.minddriven.de\/wp-content\/uploads\/2013\/08\/Validation_Include_Assembly1.png\" alt=\"\" width=\"290\" height=\"316\" \/>If you don&#8217;t want to include the library&#8217;s sources to your solution, you can just add the compiled assembly as reference. To do this, first compile the WinRT XAML Validation library as Debug or Release. Copy the output assembly to your solution and reference it in every project where you want to use the validation functionality.<\/p>\n<p>Copy the <code>ValidationStyles.xaml<\/code> file from the <code>Styles<\/code> folder of the library to your Windows Store App project and reference it as <code>ResourceDictionary<\/code> in your <code>App.xaml<\/code>.<\/p>\n<p><div style=\"clear:both;\"><\/div><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This little blog posts describes how you can include the WinRT XAML Validation library in your project and get it to work. Download First go to the WinRT XAML Validation Codeplex project page and download the latest bits. The download package includes the sources of the library as well as a demo project (Windows Store &hellip; <a href=\"https:\/\/www.minddriven.de\/index.php\/technology\/windows-8\/winrt\/winrt-xaml-validation-getting-started\" class=\"more-link\"><span class=\"screen-reader-text\">WinRT XAML Validation library: Getting Started<\/span> weiterlesen<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[302,300],"tags":[309,310,308,143,322,76],"class_list":["post-1248","post","type-post","status-publish","format-standard","hentry","category-windows-8","category-winrt","tag-dot-net","tag-c-sharp","tag-user-input","tag-validation","tag-winrt","tag-xaml"],"_links":{"self":[{"href":"https:\/\/www.minddriven.de\/index.php\/wp-json\/wp\/v2\/posts\/1248","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.minddriven.de\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.minddriven.de\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.minddriven.de\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.minddriven.de\/index.php\/wp-json\/wp\/v2\/comments?post=1248"}],"version-history":[{"count":23,"href":"https:\/\/www.minddriven.de\/index.php\/wp-json\/wp\/v2\/posts\/1248\/revisions"}],"predecessor-version":[{"id":1331,"href":"https:\/\/www.minddriven.de\/index.php\/wp-json\/wp\/v2\/posts\/1248\/revisions\/1331"}],"wp:attachment":[{"href":"https:\/\/www.minddriven.de\/index.php\/wp-json\/wp\/v2\/media?parent=1248"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.minddriven.de\/index.php\/wp-json\/wp\/v2\/categories?post=1248"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.minddriven.de\/index.php\/wp-json\/wp\/v2\/tags?post=1248"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}