text.BorderBrush = new SolidColorBrush(Color.FromRgb(rand.Next(0, 256), rand.Next(0, 256), rand.Next(0, 256)));
<TreeView Padding="0,3,0,0" Background="#FF09304A">
<TreeView.Resources>
<Style Type="Label">
<Setter Property="Foreground" Value="White" />
<Setter Property="Margin" Value="10" />
</Style>
</TreeView.Resources>
<Label Content="Формула 1" />
<Label Content="Формула 2" />
<Label Content="Формула 3" />
</TreeView>
[Key]
public char RoleId { get; set; }
try
{
/// ваш код
}
catch(Exception err)
{
MessageBox.Show(err.Message);
}
<DataGrid.Columns>
<DataGridTextColumn Header="Wrapped & centered" Binding="{Binding field}">
<DataGridTextColumn.ElementStyle>
<Style>
<Setter Property="TextBlock.TextWrapping" Value="Wrap" />
<Setter Property="TextBlock.TextAlignment" Value="Center"/>
</Style>
</DataGridTextColumn.ElementStyle>
</DataGridTextColumn>
</DataGrid.Columns>
void button_click(object sender, RoutedEventArgs e)
{
var form = new Form2(){DataContext = DataContext};
form.ShowDialog();
}
public void CreditsList_SelectionChanged(object sender, SelectionChangedEventArgs args)
{
if(combobox1.SelectedItem != null)
MessageBox.Show((combobox1.SelectedItem as CreditsList).credit_id);
}
<TextBox Text="{x:Static local:ClassG.TText ></TextBox>