Advertisement
Guest User

Plano Custom Control

a guest
Feb 3rd, 2013
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 2.85 KB | None | 0 0
  1. <UserControl x:Class="CustomControl.MainPage"
  2.              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3.              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4.              xmlns:customControl="clr-namespace:CustomControl"
  5.              xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6.              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  7.              xmlns:sectionControl="clr-namespace:SectionControl;assembly=SectionControl"
  8.              d:DataContext="{d:DesignInstance customControl:MainPage}"
  9.              d:DesignHeight="300"
  10.              d:DesignWidth="385"
  11.              mc:Ignorable="d">
  12.    <UserControl.Resources>
  13.        <DataTemplate x:Key="ProductTemplate" DataType="sectionControl:Good">
  14.            <Border Width="{Binding Width}"
  15.                     Height="{Binding Height}"
  16.                     BorderBrush="Green"
  17.                     BorderThickness="3"
  18.                     CornerRadius="3">
  19.                <Rectangle Fill="Indigo" />
  20.            </Border>
  21.        </DataTemplate>
  22.        <DataTemplate x:Key="SectionTemplate" DataType="sectionControl:Section">
  23.            <sectionControl:SectionControl AngleFlowDirection="{Binding ElementName=_combo, Path=SelectionBoxItem}"
  24.                                            Background="LawnGreen"
  25.                                            ContentItemTemplate="{StaticResource ProductTemplate}"
  26.                                            DepthItemsNumber="2"
  27.                                            HorizontalItemsNumber="{Binding FacingX}"
  28.                                            InnerObject="{Binding Good}"
  29.                                            VertialItemsNumber="{Binding FacingY}" />
  30.        </DataTemplate>
  31.        <DataTemplate x:Key="ShelfTemplate" DataType="Shelf">
  32.            <ShelfControl Width="{Binding Width}"
  33.                           Height="{Binding Height}"
  34.                           AlignmentType="{Binding AlignmentType}"
  35.                           BottomMargin="{Binding BottomMargin}"
  36.                           LeftMargin="{Binding LeftMargin}"
  37.                           SectionTemplate="{StaticResource SectionTemplate}"
  38.                           Thikness="{Binding Thikness}"
  39.                           Tilt="{Binding Tilt}" />
  40.        </DataTemplate>
  41.    </UserControl.Resources>
  42.    <Grid>
  43.        <PlanogramControl Name="{Binding Name}"
  44.                           Width="{Binding Width}"
  45.                           Height="{Binding Height}"
  46.                           DataContext="{Binding SelectedShopEquipment}"
  47.                           Depth="{Binding Depth}"
  48.                           ShelfItemTempale="{StaticResource ShelfTempalte}"
  49.                           Shelves="{Binding Shelves}"
  50.                           Type="{Binding ShopEquipmentType}" />        
  51.     </Grid>
  52. </UserControl>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement