Hello.
I have the following Xaml code that defines a Rectangle.
<Rectangle x:Name="BackgroundBlock"
Style="{StaticResource BackgroundBlockStyle}"
Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Grid.RowSpan="5"
RadiusX="0.0625in" RadiusY="0.0625in"
StrokeThickness="1" Stroke="Gray"/>
I need to add a NUnit test to check for the StrokeThickness andhave the following code.
The problem is that I do not have access to theStrokeThickness property.
I verified that Rectangle inherits from the Shape class which inherits from FrameworkElement.
Assert.AreEqual(0, InternalFrameworkElement("BackgroundBlock").STROKETHICKNESS.ToString())
Public Function InternalFrameworkElement(ByVal name As String) As FrameworkElement
Return CType(TestElement.FindName(name), FrameworkElement)
End Function
What do I need to do to get access to Rectangle "BackgroundBlock"'s StrokeThickness?
Since the Xaml code hass access to it, why can't I reference it in code?
Thanks,
Rita