According to MSDN, The property value inheritance enables child elements in a tree of elements to obtain the value of a particular property from parent elements, inheriting that value as it was set anywhere in the nearest parent element.
Please find below the sample example
<GridWidth="300"><BorderBorderThickness="1"><StackPanelWidth="200"Height="200"Background="AliceBlue"><TextBlock/></StackPanel></Border></Grid>I have 2 questions about the example mentioned above,
1>the background of TextBlock is not set at textblock level but it obtains value from parent Stackpanel. Similarly, It takes width of 200 from stackpanel but height is not set to 200, why?
2> As Text property of TextBlock is not set, will it be looking for it in its parents like Stackpanel,Border, Grid? I cannot find a mechanism to set the value of Text property at Panel level.