Hi,
I have a method that returns some Xaml at runtime to create a control template:
string GetTemplate(string strImage, string strType, string strDetail)
{
string strXaml = String.Format(@"
<ControlTemplate xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation"">
<Grid Width=""145"">
<Rectangle Fill=""#FFE7E7E7"" Margin=""0"" Stroke=""Black"" RadiusX=""5"" RadiusY=""5"" Width=""145"" Opacity=""0.6""/>
<Image Margin=""2,1,0,0"" Source=""{0}.png"" RenderTransformOrigin=""1.66,1.29"" Stretch=""Fill"" HorizontalAlignment=""Left"" Width=""40"" Height=""40""/>
<TextBlock Margin=""45,1,0,0"" TextWrapping=""Wrap"" Text=""{1}"" Height=""20"" VerticalAlignment=""Top"" FontWeight=""Bold""/>
<TextBlock Margin=""45,16,10,6"" TextWrapping=""Wrap"" Text=""{2}""/>
</Grid>
</ControlTemplate>", strImage, strType, strDetail);
return strXaml;
}
Then used like this:
eEventGfx.Symbol.ControlTemplate =
XamlReader.Load(GetTemplate("pandemic", "Pandemic", oEvent.Name)) as ControlTemplate;
What I am wondering - does this create a runtime dependencies on http://schemas.microsoft.com/winfx/2006/xaml/presentation?
Since my application does not have access to the internet.
Thank you.
Mat