Friends,
I have a WPF user control/window which has a Style for textbox, and there is a another user control called inside the first user control ( parent ), I want to reuse the same style on the resource section of 2nd user control that is located in the 1st user control, for example below is dummy code structure.
<UserControl....><UserControl.Resources><Style x:key="s" x:TargetType="{x:Type TextBox...> ....</Style></UserControl.Resources><Grid> ....<AnotherUserControl.../> </Grid> .. ..</UserControl><AnotherUserControl..><AnotherUserControl.Resources><DataTemplate....><StackPanel><TextBox Style="{StaticResource s}" // HOW TO USE style 's' here ???</StackPanel></DataTemplate></AnotherUserControl.Resources></AnotherUserControl>
As shown in the sample code, anyone has any idea how to use Style 's' on AnotherUserControl that is in parent user control ? Thanks.
Thanks - Ravi