I have a WPF page that I've styled like this:
When I set the source to the WPF page, it looks like it loads. However, the hatched background style disappears.
The button is just a test on the main Window. The background remains from the Window and the Page background isn't inherited.
Frame Code:
Code:<Frame Source="{Binding ProductFrameSource}" Name="frameProducts" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Grid.Column="0" Grid.RowSpan="2" />Page Style:Code:private Uri _ProductFrameSource = new Uri("pack://application:,,,/<omitted>.<omitted>.UI;component/Views/Products/<omitted>/Products_<omitted>.xaml"); /// <summary> /// Gets or sets a property indicating the current product page to display /// </summary> public Uri ProductFrameSource { get { return _ProductFrameSource; } set { _ProductFrameSource = value; RaisePropertyChanged("ProductFrameSource"); } }
Any ideas?Code:<Style TargetType="{x:Type Page}"> <Setter Property="Background"> <Setter.Value> <DrawingBrush TileMode="Tile" Viewport="0 0 40 40" ViewportUnits="Absolute" Viewbox="0 0 100 100" ViewboxUnits="Absolute"> <DrawingBrush.Drawing> <DrawingGroup> <GeometryDrawing Brush="#FF1C1C1C" Geometry="M 0 0 L 100 0 L 100 100 L 0 100 Z" /> <GeometryDrawing Geometry="M -10 77.5 L 22.5 110 M -10 52.5 L 47.5 110 M -10 27.5 L 72.5 110 M -10 2.5 L 97.5 110 M 2.5 -10 L 110 97.5 M 27.5 -10 L 110 72.5 M 52.5 -10 L 110 47.5 M 77.5 -10 L 110 22.5"> <GeometryDrawing.Pen> <Pen Brush="#FF908B91" Thickness=".5" /> </GeometryDrawing.Pen> </GeometryDrawing> </DrawingGroup> </DrawingBrush.Drawing> </DrawingBrush> </Setter.Value> </Setter> </Style>


Reply With Quote