WinDecorator.xaml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <Window x:Class="Test.Decorator.WinDecorator"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:Test.Decorator"
  7. xmlns:controls="http://schemas.FWind/xaml"
  8. mc:Ignorable="d"
  9. Title="WinDecorator" Height="300" Width="300">
  10. <Grid>
  11. <Grid.RowDefinitions>
  12. <RowDefinition Height="Auto"></RowDefinition>
  13. <RowDefinition Height="Auto"></RowDefinition>
  14. <RowDefinition Height="Auto"></RowDefinition>
  15. <RowDefinition></RowDefinition>
  16. </Grid.RowDefinitions>
  17. <!--<controls:DescriptionDecorator Description="米" >
  18. <TextBox Text="2131" BorderThickness="0"></TextBox>
  19. </controls:DescriptionDecorator>-->
  20. <Label Content="天地玄黄" Width="60" HorizontalAlignment="Left" Background="Red"></Label>
  21. <controls:ButtonDecorator Grid.Row="1" Description="打开">
  22. <controls:ButtonDecorator.ButtonStyle>
  23. <Style TargetType="Button">
  24. <Setter Property="Foreground" Value="Red"></Setter>
  25. </Style>
  26. </controls:ButtonDecorator.ButtonStyle>
  27. <TextBox Text="2131" BorderThickness="0"></TextBox>
  28. </controls:ButtonDecorator>
  29. <controls:IntegerSpinner x:Name="Spinner" Grid.Row="2" Value="{Binding Value,Mode=TwoWay}" ValueChanged="IntegerSpinner_ValueChanged" ForceType="KeyDown"></controls:IntegerSpinner>
  30. <DataGrid Grid.Row="3" ItemsSource="{Binding Items}" VirtualizingPanel.IsVirtualizing="False">
  31. <DataGrid.Columns>
  32. <DataGridTextColumn Header="序号" Binding="{Binding RelativeSource={RelativeSource AncestorType=DataGridRow,Mode=FindAncestor},Converter= {x:Static controls:ConverterFactory.RowIndex}}"></DataGridTextColumn>
  33. </DataGrid.Columns>
  34. </DataGrid>
  35. </Grid>
  36. </Window>