Wpf Path Geometry

Using Reflector JustDecompile (eff Red Gate), I looked at the definition of Geometry for its TypeConverterAttribute (which the xaml serializer uses to convert values of type string to Geometry). As I sayd before, in this article I would speack about the XAML Path syntax. 外边框和笔刷均由Path提供,Geometry只负责绘制形状. Windows Presentation Foundation (WPF) provides developers with a unified programming model for building rich Windows smart client user experiences that incorporate UI, media, and documents. The properties "Stroke" and "StrokeThickness" of the path element are bound to dependency properties of the user control. removePoint(pathIndex, pointIndex) Point: Remove a point from the polyline at the given pointIndex within the path identified by the. After pressing "Transform" the output textbox shows the translated geometry string. The following code draws a path. Repository for WPF related samples. Simply set up your shape's path data and then set the Stretch property to Fill and your shape will resize itself to fit the space available. What is that Path anyway? Property paths in WPF as we all know from Binding allow us to place a string value as key which will WPF system use later to find and return certain property's value. The XAML tab contains settings to export to WPF/E-compliant XAML and to control its formatting. net forums thread I implemented a value converter that clones path geometry. Этот объект задает фигуру или совукупность фигур для отрисовки. < Path x:. For the basic idea behind compound lines and a technique that lets you draw symmetric compound lines relatively easily, see the post Draw symmetric compound lines in WPF and C#. Since the RadGeometryButton only accept a geometry and not a path I still can't control the size like that. exe, in the attached zip file) which functions like the pen tool in Expression Blend, but dumps out the path markup for the path with no margins to interfere. Combining Path. The result. Posted on November 26, Jasema - The XAMLPadX plugin for building Path Geometry WPF Date Time Picker. I wrote a quick tool in Windows Forms (PathMaker. the radius of a cylinder or something). Again we have very verbose XAML because we can't use the Path mini language:. Anyone know a good way to create this object from Xaml? It also has to work at. C# / C Sharp Forums on Bytes. Parse(path. Simply paste the geometry string into the input textbox and specify the transform parameters. The path's data property is set to a path geometry figure, which consists of a path segment collection. Here M represents MoveTo command and C represents the absolute path. How to add a path inside of a border using c# and wpf. WPF circle and line drawer solution. This post covers how to re-use a collection of WPF shapes by combining them into a resource. The picture is a projection of the object to a planar surface. If both large and small images are assigned, the bar item's links displays an image that matches the settings provided by bar objects (a bar item, bar, menu, and bar manager). [xaml] (Note that this attribute syntax actually creates a StreamGeometry, a lighter-weight version of a PathGeometry. but calculus, statistics, numerical methods, number theory, differential equations, proofs i like all those. To update the path, we create a new Binding , assign the Data as a string to its Source , and use SetBinding to hook it to the controls’ Data dependency property. Shapes and Path. This article demonstrates how to create and use paths in WPF and XAML. Right attached properties. Instead of typing lots of tags to describe visual elements in your GUI, you can just fill out the property Data of path element with special textual value. Utilizzare un Lettore di codice XAML Il Percorso, PathGeometry e PathFigure codice mi e stata molto utile, grazie. As you learn now to simply work with Geometry Mini-Language in my previous article, now in this article we discuss about the Commands for the Geometry Mini-Language. The All-In-One WPF code samples demonstrate the typical programming topics about WPF. net forums thread I implemented a value converter that clones path geometry. I find myself digging through XAML files all the time looking for path data for triangles! Blend doesn’t provide a drawing tool for triangles (as it does for rectangles and ellipses) that I know of, so I find myself drawing it with the pen then simplifying the geometry. Using Reflector JustDecompile (eff Red Gate), I looked at the definition of Geometry for its TypeConverterAttribute (which the xaml serializer uses to convert values of type string to Geometry). The result. It isn't necessary if the path is closed. The latest update does more than rectangles: it supports shapes. After working with it for some time you may wish to include vector-based graphics in your WPF application, where in the past you might have used icons or a bitmaps. The following is a XAML page that allows the user to draw on it. The coordinates can be specified relative to any side of the panel usind the Canvas. The documentation explaining the syntax is quite verbose, which is a good thing, but i wrote this post to provide an at-a-glance summary of the various components:. That is equivalent to using SvgImageSource, as follo. Working with 2D graphics or 2D images in WPF Working with 2D graphics or 2D images. ActualHeight, 96, 96, PixelFormats. 23) What is the Path animation in WPF? Path animation is a different type of animation. [xaml] (Note that this attribute syntax actually creates a StreamGeometry, a lighter-weight version of a PathGeometry. The Shape Tool is one of the tools, which come out-of-the-box with the RadImageEditor and allow you to draw different shapes over an image. The element of XAML is used to draw and fill a path. WPF circle and line drawer solution. Optionally convert text into Path. After pressing "Transform" the output textbox shows the translated geometry string. Этот объект задает фигуру или совукупность фигур для отрисовки. Canvas Panel Introduction. Silverlight offers a subset of the complete XAML features found in WPF, but structured correctly, many applications can be built and deployed to both XAML platforms from a single code base. My confidence in ViewerSvg is so good because it not only can accurately convert svg files into XAML but also has the following additional great features:. Most of the techniques needed to draw an outlined path are included in those you need to draw compound lines. In this animation, the animated objects follow a path set by the path geometry. #wpdev_jp パスの表現には パスマークアップがある。これを階層表現にすると複雑になる。さらに、オブジェクト表現にする. 1 Solution Xamarin designer not working 2 Solution Intellisense for C++: Values for enum variables/arguments prediction. Each layer creates a canvas in XAML. Here's how you can convert the contents of your SVG into XAML. To create a WPF version of spatial data, we read the WKT format and use it to initialize a SqlGeometry instance. Or, view source and export each example to a Visual Studio project from the SciChart WPF Examples suite. Name the WPF. Create a StreamGeometry object and paste the content between the opening and closing tag. 外边框和笔刷均由Path提供,Geometry只负责绘制形状. By default, each SWF file will have its own subfolder created. All the preceding shapes are just special cases of a powerful shape called Path. I get the Data of the Path and put on the Geometry property of the GeometryDrawing and the color on the Brush property, this was enough to work. But I can't figure out how to dynamically set Path Data. This is a subclass of Geometry, so can be used directly within a Path object. but i dont know how to animate that. fill and Shape. basically creates a Path or Outline of the letter. Starting with a count of zero, the rule adds one each time a path segment crosses the ray from left to right and subtracts one each time a segment crosses from right to left. GitHub Gist: instantly share code, notes, and snippets. It will help the people who searches the internet using an image to find what they are looking for. Controls / RadImageEditor / Tools. 2 \$\begingroup\$ I've created a WPF program which can draw lines and circles on a canvas. wpfのPathはさまざまな線を描けるようになっています。 その分扱うデータも複雑です。 前の投稿でもPolyBezierSegment、PathFigure、PathSegmentCollection、PathGeometryなどを組み合わせてやっと一連のベジェ曲線を描くことができました。. Introduction to WPF 3D 3D Graphic Basics. Did you know you can also view the source code from one of the following sources as well? Clone the SciChart. SpatialOperations. Shape Tool. Let's take a simple example to understand how to use 3D graphics. You can change the default Geometry of the default Path in the legend item. Fortunately there is a xaml plugin for illustrator, but I don't know how to apply this style since the exporter saves everything as a geometry. Contribute to microsoft/WPF-Samples development by creating an account on GitHub. Now that we have a little background, and we know what the differences between a Geometry and Shape are, we can create our shape based on one of these two types. Xaml used to create this graphic is as follows. The path's data property is set to a path geometry figure, which consists of a path segment collection. Canvas Panel Introduction. How to add a path inside of a border using c# and wpf. WPFMystify3D – A Screen Saver using WPF 3D Geometry,To set a. For a visualisation engine that I'm building I wanted to dynamically create polygons and animate them using WPF. This page describes the intelligent and well implemented Okino XAML file converter module which allows all varieties of 3D geometry, hierarchy, materials, textures and animation to be exported to native Microsoft. The WPF APIs provide a FormattedText object that allows you to export its contents as a Geometry, which in turn allows you to generate its contents in the XAML Path Mini Language. ActualHeight, 96, 96, PixelFormats. The geometry transformer is a simple tool I wrote to scale-, translate- and rotate-transform a geometry in the path mini language. In otherwords, you are not interested in interacting with segments of the path, just the final rendered geometry of the path. WPF provides multiple ways to convert vector drawings to bitmaps. It isn't necessary if the path is closed. It will help the people who searches the internet using an image to find what they are looking for. I guess Metro Studio should give us a XAML DrawingImage instead of a Path, sorry if I'm wrong. Contribute to GuOrg/Gu. Unfortunately Silverlight does not support path geometry cloning, unlike WPF, so based on a Silverlight. The MediaElement class works in a similar way as Image class. The first path clones the blue path's geometry and offsets it by a few pixels. The only solution I found was overriding the style, but then the standard dropshadow effect is lost. CombinedGeometry for Path. In this article, I'll show you how to create a very simple control to represent a small cross button - the sort that you see in the tabbed windows or certain controls. I find myself digging through XAML files all the time looking for path data for triangles! Blend doesn’t provide a drawing tool for triangles (as it does for rectangles and ellipses) that I know of, so I find myself drawing it with the pen then simplifying the geometry. Reading about WPF, I've found several examples of how to dynamically modify graphical data (typically as dependency properties, e. You can instantiate this control in both XAML and code behind (see Example 1 and 2). Or you could use a geometry element as the Data property of a element and, therefore, provide the layout of the path. What if we could draw a geometry in WPF with this drawing In plain xaml, it is something like that. As I sayd before, in this article I would speack about the XAML Path syntax. I decided to read a book before attempting WPF for the first time as I've heard others complain about the steep learning curve. Create a StreamGeometry object and paste the content between the opening and closing tag. The distance for each is shown. GetXaml method to get formatted and valid XAML of the read objects. Left, Canvas. You can instantiate this control in both XAML and code behind (see Example 1 and 2). Controls / RadImageEditor / Tools. Class to convert XAML Path Geometry into BitmapImage - IconMaker. This means it inherits all the features of the standard button. It's child elements are positioned by explicit coordinates. 为简化上面xaml,wpf提供了路径语法解析器,由 < Path Stroke ="Black" StrokeThickness ="1" Data ="M 10,100 L 100,100 100,50 Z M 10,10 100,10 100,40 Z" /> 孰能生巧而已,用多了就自然会了。 性能更好的StreamGeometry. The following code draws a path. Canvas Panel Introduction. This object knows convert WPF Visual into Bitmap and this is exactly what we need. The one hundred and twenty-seventh part of the Windows Presentation Foundation Fundamentals tutorial starts to look at path geometry. Avoiding CommandBinding in the XAML Code Behind files. Contribute to microsoft/WPF-Samples development by creating an account on GitHub. Currently, with Window Presentation Foundation (WPF), it is not easy to display a text string that will follow the path of any given geometry. Represents a class for connection definition that applies on the connections generated from the XamDiagram. Path back to the wpfGraphics class or another and generate the Drawing. As I only want 2 radiused corners I can't use a. The path's data property is set to a path geometry figure, which consists of a path segment collection. In this article, we discuss the Path Geometries in WPF. You can instantiate this control in both XAML and code behind (see Example 1 and 2). Render ZXing qrcodes into a geometry for a WPF path - Example. It is using the custom CappedLine element, whose source code is contained in the attached project. xaml tags list Saturday, September 4, 2010. Xamarin XAML intellisense broken since 15. Parse("M 100,200 C 100,25 400,350 400,175 H 280"); Path. The following code draws a path. Now it is time for you to put all of them together in a real-world WPF application. This method basically converts/strokes path lines to an approximate geometry. that you're pleased with WPF Diagrams. This post covers how to re-use a collection of WPF shapes by combining them into a resource. The following XAML code shows how to create a 2D object using in 3D geometry. Visual Studio 2008 is no longer supported. The element of XAML is used to draw and fill a path. That is equivalent to using SvgImageSource, as follo. Reading about WPF, I've found several examples of how to dynamically modify graphical data (typically as dependency properties, e. Each layer creates a canvas in XAML. Parse(path. WPF circle and line drawer solution. xaml or whatever name you want. Represents a class for connection definition that applies on the connections generated from the XamDiagram. GetWidenedPathGeometry(). We have option of Shapes or Path. Easily add a custom geometry to your button, or style it using one of the 15 professional-looking themes that come with UI for WPF. In WPF, you can create a resizable shape by using the Path control. This is a special syntax to define a vector graphic to be drawn on a XAML control. In nearly every bit of WPF training material or weblog there is some reference to the "ah-ha" moment. 5 Opacity when layered on top of other controls. The problem was, Expression uses margins, and those margins are not supported in WPF/e, and alter the path coordinates. Utilizzare un Lettore di codice XAML Il Percorso, PathGeometry e PathFigure codice mi e stata molto utile, grazie. It is using the custom CappedLine element, whose source code is contained in the attached project. Paid Tools. Class to convert XAML Path Geometry into BitmapImage - IconMaker. In the article WPF – Easy rounded corners for anything you can read how to achieve this. The following XAML code shows how to create a 2D object using in 3D geometry. How to add a path inside of a border using c# and wpf Showing 1-9 of 9 messages. The envelope "icon" is actually a path held as a string. Data property is of type Geometry, which is an abstract base. Path のGeometry。 XML Editor-> select svg path and look side column, d name propery in your data path value. WPF Sample of FormattedText Outline example Code with fill and Windows 10 Geometry geometry //// Supply the empty Path element in XAML with the PathGeometry. Fortunately there is a xaml plugin for illustrator, but I don't know how to apply this style since the exporter saves everything as a geometry. C# / C Sharp Forums on Bytes. Please, could you provide a simple example to work the dropshadow effect on a button with a geometry path? Thanks in advance. When using the various methods of a StreamGeometryContext instance, you work with X and Y values. 1, then RadTileList has you. Let's take a simple example to understand how to use 3D graphics. You can't use an SVG file directly within your XAML. Live Geometry lets you create interactive ruler and compass constructions and experiment with them. Learning WPF with BabySmash - Customer Feedback and a WPF Font ComboBox net/ for more developer info on WPF. UIElements. Anyone know a good way to create this object from Xaml? It also has to work at. stroke and other shape properties control the colors and appearance of the shape. Here's some cleaned-up code in a complete workable program:. Examples from Github. 1, then RadTileList has you. WPF Path Data Geometry mini-language. Here's an example of a geometry that I'm trying to use:. What is Path animation? Path Animation defined as an AnimationTimeline that uses input as Path geometry. C# / C Sharp Forums on Bytes. Learning WPF with BabySmash - Customer Feedback and a WPF Font ComboBox net/ for more developer info on WPF. Name windows types in WPF? Normal Window; Page Window and; Navigation Window; Q11). how would you animate these? I have created shapes in another application and when i export them into xaml it gives me complex shape made of geometry path. GetWidenedPathGeometry(). In Windows Forms programming, you can draw a smooth curve by using the Graphics object's DrawCurve method. There are no other options to configure or runtimes to install. A closed shape is a shape that has same start point and end point. The coordinates can be specified relative to any side of the panel usind the Canvas. The envelope "icon" is actually a path held as a string. It led me down a path to see how easy it was to use vector data with the default AppBarButtonStyle definition. By setting the Data property of the Path with a Geometry and setting its Fill and Stroke properties, you can render a Geometry. XAML) as available selections under Save as type. You can instantiate this control in both XAML and code behind (see Example 1 and 2). The Files tab controls where the various file types are saved on your system. In the article WPF - Easy rounded corners for anything you can read how to achieve this. These are basically converted from SVG. Path Data, Prefixes and Known Colors I previously wrote about some fixes I made to the Baml Viewer addin for Reflector. GetWidenedPathGeometry(). Data = Geometry. Automatically resize the read elements. That is equivalent to using SvgImageSource, as follo. Although caching of. XAML Geometry Path Markup Syntax Summary WPF/Silverlight has quite a nice syntax for defining paths in XAML. That is equivalent to using SvgImageSource, as follo. The geometry transformer is a simple tool to scale-, translate- and rotate-transform a geometry in the path mini language. Xamarin XAML intellisense broken since 15. A quick geometrical question on retrieving geometry from a basic wall being used as a panel in a curtain wall. The following is a XAML page that allows the user to draw on it. It is of type GlyphExportType which is an enumeration with the values None (default), Image (which returns an ImageSource) and Path (which returns a Geometry). I used this SE answer to build my own version. Find out how DrawingImage and DrawingVisual work and when to use which. Create a new WPF application in Visual Studio named, "CombinedGeometryDemo". WPF Sample of FormattedText Outline example Code with fill and Windows 10 Geometry geometry //// Supply the empty Path element in XAML with the PathGeometry. Without XAML can we build WPF applications? Yes ofcourse, we can create WPF applications without XAML. After counting all the crossings, if the result is zero, the point is outside the path. To create a WPF version of spatial data, we read the WKT format and use it to initialize a SqlGeometry instance. Graphic In XAML And WPF. Simply paste the geometry string into the input textbox and specify the transform parameters. If both large and small images are assigned, the bar item's links displays an image that matches the settings provided by bar objects (a bar item, bar, menu, and bar manager). A vector image is a geometric representation of an image. 一、使用Path构建复杂图形Path所构建的图形由Data属性来定义,其属性的类型为Geometry(几何类),通过Path可以构建更加复杂的图形。想创建一个圆环,一种做法是使用两个圆形构建,另一种做 博文 来自: mq75956672的专栏. This is a subclass of Geometry, so can be used directly within a Path object. < Path x:. 6m developers to have your questions answered on Binding to RadPathButton PathGeometry Glyph of UI for WPF Buttons. The path's data property is set to a path geometry figure, which consists of a path segment collection. If you want an ellipse you can use an Ellipse, or build the Path from an EllipseGeometry or ArcSegments. Let's take a simple example to understand how to use 3D graphics. insertPoint(pathIndex, pointIndex, point) Polyline: Inserts a new point into a polyline. A small summary of this usefull language:. My confidence in ViewerSvg is so good because it not only can accurately convert svg files into XAML but also has the following additional great features:. Before we delve into WPF shapes, we need to define an important aspect of WPF elements--the UIElement. Additionally it adds a Path control to its default template. Create a StreamGeometry object and paste the content between the opening and closing tag. 1 Solution Xamarin designer not working 2 Solution Intellisense for C++: Values for enum variables/arguments prediction. While I was fiddling around with WPF in general I noticed that when I dropped inane little circles and boxes onto a canvas I'd never be able to center it inside the containing canvas just right. A vector image is a geometric representation of an image. The first in a series of tutorials on creating WPF applications in C# Starts with creating and using some basic controls like text boxes, labels, buttons, checkboxes and drop downs Source code. In the December 2008 issue of MSDN Magazine, Charles Petzold shows you how to position text characters along a curved line with Windows Presentation Foundation (WPF) and animate the individual points defining the path to watch the characters bounce around in response. By default, each SWF file will have its own subfolder created. Repository for WPF related samples. WPF provides multiple ways to convert vector drawings to bitmaps. The preceding sections mentioned that Geometry objects can be used with other objects for a variety of purposes, such as drawing shapes, animating, and clipping. While Paths have defined points. This allows you to easily add custom geometry to your button. Register Fonts. Revealing the magical uses of number and geometry as tools for introspection, self-development, and creating change in both the inner and outer worlds, Toby Chappell explores the rites, history, and potent practices of Angular Magic and Infernal Geometry, the Left-Hand Path of Sacred Geometry. A polygon is a series of connected lines which is a closed shape. Browse code - Windows 8 XAML vector-based drawing sample in C#, VB. Convert Text to Path in Xaml In Expression Blend you can convert any object to a path: Object Menu > Path > Convert to Path. Simply set up your shape's path data and then set the Stretch property to Fill and your shape will resize itself to fit the space available. But I can't figure out how to dynamically set Path Data. At the time of an geometry creation with the mini-language, you are actually creating a StreamGeometry object, not a PathGeometry. WPF (Windows Presentation Foundation) is the most significant philosophy shift to come from Microsoft regarding the development of client applications. Although caching of. The tool will display the transformed path in the Output Geometry field, so copy that and use it as the data for your path icon. Most of the techniques needed to draw an outlined path are included in those you need to draw compound lines. Two paths are vertex-independent (alternatively, internally vertex-disjoint) if they do not have any internal vertex in common. Create a new WPF project with the name WPF3DGraphics. is a point, a line or a polygon. The default font family used by the glyphs is the TelerikWebUI. Net Tutorial. Net application as a screen saver, you get the assembly built, change the. but i dont know how to animate that. wpfのPathはさまざまな線を描けるようになっています。 その分扱うデータも複雑です。 前の投稿でもPolyBezierSegment、PathFigure、PathSegmentCollection、PathGeometryなどを組み合わせてやっと一連のベジェ曲線を描くことができました。. Utilizzare un Lettore di codice XAML Il Percorso, PathGeometry e PathFigure codice mi e stata molto utile, grazie. In this article I want to describe the functions of XAML, WPF and Silverlight in the context of graphic. It is a type of XAML that has been tokenized, parsed, and changed into binary form. Give the geometry a unique key. NET 4 there is a new namespace to be aware of and that is System. These are basically converted from SVG. Radial gradients + Mini-path geometry sprites + infinite-scrolling inertial canvas = :) Posted on May 20, 2012 | 9 Comments I’m slowly building up some very cool controls and general learning’s around XAML & SharpDx and I want to share 3 of them with you today. Here M represents MoveTo command and C represents the absolute path. Anyone know a good way to create this object from Xaml? It also has to work at. Note: If the specified Geometry is animated, the conversion from Geometry to PathFigure may result in some loss of information. Capital H represents the LineTo command. Left, Canvas. In this article, I'll talk about a control included in Telerik UI for WPF called RadTileList. My example curtain wall has two panels. Path can be drawn using Pen or Pencil and you can edit and move the points within path. Here M represents MoveTo command and C represents the absolute path. Currently, with Window Presentation Foundation (WPF), it is not easy to display a text string that will follow the path of any given geometry. When using the various methods of a StreamGeometryContext instance, you work with X and Y values. Repository for WPF related samples. Starting with a count of zero, the rule adds one each time a path segment crosses the ray from left to right and subtracts one each time a segment crosses from right to left. Create a StreamGeometry object and paste the content between the opening and closing tag. The result. In the example below, the first Path was created using the Pen tool, while the second Path was created using the Pencil tool. Capital H represents the LineTo command. WPF C# Path: How to get from a string with Path Data to Geometry in Code (not in XAML) 523 Curious null-coalescing operator custom implicit conversion behaviour. These are basically converted from SVG. Here's an example of a Web service that takes in the text, typeface, size and other parameters, loads them into a FormattedText, and uses. This is easy to do by setting the DefaultMarkerGeometry property. WPF-Samples / Graphics / Geometery / CombiningGeometriesExample. WPF applications support video and audio using MediaElement. This object knows convert WPF Visual into Bitmap and this is exactly what we need. The Okino XAML exporter acts as a middleware tool. Data = Geometry. This means it inherits all the features of the standard button. The default font family used by the glyphs is the TelerikWebUI. I hope this book w ould be useful for WPF and C# programmers of all skill. GetXaml method to get formatted and valid XAML of the read objects. 外边框和笔刷均由Path提供,Geometry只负责绘制形状. In the article WPF - Easy rounded corners for anything you can read how to achieve this. Some people uses the "reverse image search" to upload the picture and search for the results. Here's an example of a geometry that I'm trying to use:. WPF : Geometry mini-language It is really cool feature of WPF. Name the WPF. We can have two concentric circles and then use LinearGradientBrush to have two colors gradients in it, black and transparent. ViewerSvg is the best svg to XAML converter for WPF, Windows Store, Windows Phone, Universal Aps and Silverlight. This is a subclass of Geometry, so can be used directly within a Path object. The envelope "icon" is actually a path held as a string. Parse(path. The Advanced tab contains settings that control how the tool caches various assets. RadialGradientBrush - using SharpDx I can create a nice radial gradient brush in my XAML managed metro app 2. How do I remove a line segment from a PathGeometry in wpf. Let's take a simple example to understand how to use 3D graphics. You can't use an SVG file directly within your XAML. This example using a combination of Ellipses, Rectangles and Paths to create the rounded triangle: When finished, group all the shapes into a Canvas and copy the resulting XAML into…. Here is an example:. Path) from a dxf or dwg file and save it into a database so the user can see the drawing when he wants, I wonder if there is any way in which I can pass these Shapes. that you're pleased with WPF Diagrams. However, it is the most complex option. Using WPF styles. Automatically resize the read elements. This page describes the intelligent and well implemented Okino XAML file converter module which allows all varieties of 3D geometry, hierarchy, materials, textures and animation to be exported to native Microsoft. Geometry development by creating an account on GitHub. After pressing "Transform" the output textbox shows the translated geometry string. There are some frameworks available to parse a Geometry to and from a String, but as a lazy developer I decided to delegate this work the the XAML binding engine.