Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <UserControl x:Name="userControl" x:Class="CallTypePriorityMapping.MapperView"
- 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:CallTypePriorityMapping.Views"
- xmlns:ViewModels="clr-namespace:CallTypePriorityMapping.ViewModels"
- mc:Ignorable="d"
- d:DesignHeight="300" d:DesignWidth="300">
- <UserControl.DataContext>
- <ViewModels:CallTypeMappingsPresenter />
- </UserControl.DataContext>
- <Grid HorizontalAlignment="Stretch" x:Name="MappingGrid">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="0.5*" x:Name="Col1"/>
- <ColumnDefinition Width="0.5*" x:Name="Col2"/>
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="40"/>
- <RowDefinition Height="259*"/>
- </Grid.RowDefinitions>
- <Button x:Name="button" Content="+ New Mapping" Margin="10" Grid.Column="1" Command="{Binding AddMapping, UpdateSourceTrigger=PropertyChanged}"/>
- <ListView x:Name="listView" Grid.Row="1" Grid.ColumnSpan="2" ItemsSource="{Binding Mappings, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Stretch">
- <ListView.View>
- <GridView>
- <GridViewColumn Header="Call Type" x:Name="callTypeCol">
- <GridViewColumn.CellTemplate>
- <DataTemplate>
- <ComboBox Margin="0" HorizontalAlignment="Stretch" x:Name="CallTypeName" ItemsSource="{Binding DBCallTypes, ElementName=userControl}" IsSynchronizedWithCurrentItem="True" DisplayMemberPath="Value" SelectedItem="{Binding CallType.Value, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
- </DataTemplate>
- </GridViewColumn.CellTemplate>
- </GridViewColumn>
- <GridViewColumn Header="Priority">
- <GridViewColumn.CellTemplate>
- <DataTemplate>
- <WrapPanel HorizontalAlignment="Stretch">
- <ComboBox HorizontalAlignment="Stretch" x:Name="PriorityName" ItemsSource="{Binding DBPriorities, ElementName=userControl}" IsSynchronizedWithCurrentItem="True" DisplayMemberPath="Value" SelectedItem="{Binding Priority, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
- </WrapPanel>
- </DataTemplate>
- </GridViewColumn.CellTemplate>
- </GridViewColumn>
- </GridView>
- </ListView.View>
- </ListView>
- </Grid>
- </UserControl>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement