Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

VB.NET - Can't seem to set background stretch with radiobuttons

$
0
0

I've been trying some code for a while but I'm trying to code Radiobuttons that will change the Background Stretch when checked. I have been looking around with no luck :(

This is what I have so far, which doesn't work.

Dim imagebrush as new imagebrush()

Private Sub BGNone_Checked(sender As Object, e As RoutedEventArgs) Handles BGNone.Checked If BGNone.IsChecked = True Then imagebrush.Stretch = Stretch.None Me.Background = imageBrush End If End Sub Private Sub BGFill_Checked(sender As Object, e As RoutedEventArgs) Handles BGFill.Checked If BGFill.IsChecked = True Then imagebrush.Stretch = Stretch.Fill Me.Background = imageBrush End If End Sub


Any help is appreciated :)



Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>