[英]Button border thickness doesnt change from code behind
XAML
<Window x:Class="MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Grid>
<Button x:Name="Button1" Background="LightGreen" Height="50" Width="70"/>
</Grid>
</Window>
vb
Class MainWindow
Private Sub MainWindow_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
Button1.BorderBrush = Brushes.Red
Button1.BorderThickness = New Thickness(5)
End Sub
End Class
当您运行上面的代码时,您会看到;
Button1边框笔刷变为红色,这是正常的。
Button1的边框粗细不会更改为5,这不是很好。
这个问题看起来似乎尚未解决:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.