Advertisement
Guest User

Untitled

a guest
May 3rd, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.91 KB | None | 0 0
  1. <UserControl x:Name="userControl" x:Class="CallTypePriorityMapping.MapperView"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:CallTypePriorityMapping.Views"
  7. xmlns:ViewModels="clr-namespace:CallTypePriorityMapping.ViewModels"
  8. mc:Ignorable="d"
  9. d:DesignHeight="300" d:DesignWidth="300">
  10. <UserControl.DataContext>
  11. <ViewModels:CallTypeMappingsPresenter />
  12. </UserControl.DataContext>
  13. <Grid HorizontalAlignment="Stretch" x:Name="MappingGrid">
  14. <Grid.ColumnDefinitions>
  15. <ColumnDefinition Width="0.5*" x:Name="Col1"/>
  16. <ColumnDefinition Width="0.5*" x:Name="Col2"/>
  17. </Grid.ColumnDefinitions>
  18. <Grid.RowDefinitions>
  19. <RowDefinition Height="40"/>
  20. <RowDefinition Height="259*"/>
  21. </Grid.RowDefinitions>
  22. <Button x:Name="button" Content="+ New Mapping" Margin="10" Grid.Column="1" Command="{Binding AddMapping, UpdateSourceTrigger=PropertyChanged}"/>
  23. <ListView x:Name="listView" Grid.Row="1" Grid.ColumnSpan="2" ItemsSource="{Binding Mappings, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Stretch">
  24. <ListView.View>
  25. <GridView>
  26. <GridViewColumn Header="Call Type" x:Name="callTypeCol">
  27. <GridViewColumn.CellTemplate>
  28. <DataTemplate>
  29. <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}"/>
  30. </DataTemplate>
  31. </GridViewColumn.CellTemplate>
  32. </GridViewColumn>
  33. <GridViewColumn Header="Priority">
  34. <GridViewColumn.CellTemplate>
  35. <DataTemplate>
  36. <WrapPanel HorizontalAlignment="Stretch">
  37. <ComboBox HorizontalAlignment="Stretch" x:Name="PriorityName" ItemsSource="{Binding DBPriorities, ElementName=userControl}" IsSynchronizedWithCurrentItem="True" DisplayMemberPath="Value" SelectedItem="{Binding Priority, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
  38. </WrapPanel>
  39. </DataTemplate>
  40. </GridViewColumn.CellTemplate>
  41. </GridViewColumn>
  42. </GridView>
  43. </ListView.View>
  44. </ListView>
  45. </Grid>
  46. </UserControl>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement