MainGraph2.xaml 2.21 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
<UserControl x:Class="FLY.Weight2.UI.Client.UiModule.MainGraph2"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      xmlns:local="clr-namespace:FLY.Weight2.UI.Client.UiModule"
      xmlns:sys="clr-namespace:System;assembly=mscorlib"
      mc:Ignorable="d"  >
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/FLY.Weight2.UI.Client;component/Themes/UcWeighterItemStyle.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
    <Viewbox Stretch="Uniform" VerticalAlignment="Top" HorizontalAlignment="Left">
        <Grid Name="root_grid" d:DataContext="{StaticResource unittests_weighters}">
            <Grid.RowDefinitions>
                <RowDefinition Height="auto"/>
                <RowDefinition />
            </Grid.RowDefinitions>
            <local:UcTotalFlow x:Name="ucTotalFlow" Margin="5" />
            <Grid Grid.Row="1">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="auto"/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <local:UcThickness x:Name="ucThickness" Margin="5"/>
                <ItemsControl x:Name="itemsControl" Grid.Column="1" ItemsSource="{Binding Items}">
                    <ItemsControl.ItemsPanel>
                        <ItemsPanelTemplate>
                            <StackPanel Orientation="Horizontal" />
                        </ItemsPanelTemplate>
                    </ItemsControl.ItemsPanel>
                    <ItemsControl.ItemTemplate>
                        <DataTemplate>
                            <local:UcWeighterItem2 Margin="5" WeightSystemService="{Binding DataContext,ElementName=root_grid}"/>
                        </DataTemplate>
                    </ItemsControl.ItemTemplate>

                </ItemsControl>
            </Grid>
        </Grid>
    </Viewbox>
</UserControl>