我只想设置StackPanel的background属性,当前我通过以下代码进行设置,
statusPanel.Background = new SolidColorBrush(Colors.Cyan);
Run Code Online (Sandbox Code Playgroud)
但是我只想设置一个十六进制值。我该怎么做??
我正在使用以下xaml代码水平显示列表,
<ListBox x:Name="List" HorizontalAlignment="Left" Height="429" Margin="18,83,0,0" VerticalAlignment="Top" Width="424" SelectionChanged="List_SelectionChanged_1">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" Width="420" Height="80">
<TextBox x:Name="tbName" IsHitTestVisible="False" Height="70" Background="Green" Foreground="White" FontSize="22" BorderThickness="0" Text="{Binding Name}" />
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
Run Code Online (Sandbox Code Playgroud)
我想要的是:
在TextBlock穿过宽度后,它应该放在下一行(通常它应该像我们在一篇论文中写的那样).
即.直到我们到达StackPanel的末尾,我们将水平地附加TextBox,但是在到达StackPanel的末尾之后,我们将把下一个TextBox放在下一行中.
我该怎么做??
在我的应用程序中,我正在使用WEB浏览器.我想要的是当一个特定的网页(网址)被加载,我只是想做一个动作,我怎么能帮助这个?
提前致谢!