i using C# and WPF building my project. In my application, i used a small size of image(25x25) as my application background. I found some example from the internet and when i try it, the background of my application is like imageA. But what i wish to do is like my background will be like the imageB. Any one know how to make it like the imageB?
my WPF code snippet:
<Grid>
<Grid.Background>
<VisualBrush TileMode="Tile" Viewport="0.8,0.8,0.1,0.1" AlignmentX="Left" AlignmentY="Top">
<VisualBrush.Visual>
<Image Source="/Wpf_Customer;component/bg.jpg"></Image>
</VisualBrush.Visual>
</VisualBrush>
</Grid.Background>
<RadioButton Content="Graph" Name="dsad" FontSize="15" ></RadioButton>
</Grid>
imageA:
imageB:
EDITED:
imageC:
Try it
<ImageBrush x:Key="SimpleBitmap" ImageSource="Assets\BitmapImage.png" TileMode="FlipY" Stretch="Uniform"AlignmentY="Top" Viewport="0,0,10,10" ViewportUnits="Absolute" />
Where BitmapImage Width = 10, and BitmapImage Height = 10
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With