Advertisement
Guest User

Untitled

a guest
Apr 20th, 2019
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.79 KB | None | 0 0
  1. <Window x:Class="Key_Master.View.Hauptfenster"
  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:Key_Master.View"
  7.         xmlns:local1="clr-namespace:Key_Master.ViewM"
  8.         Title="Hauptfenster" Height="956.076" Width="1577.746">
  9.     <Window.Resources>
  10.         <local1:ImageUrlToImageConverter x:Key="IImageUrlToImageConverter" />
  11.     </Window.Resources>
  12.  
  13.     <Grid RenderTransformOrigin="0.434,0.407" Background="#FF131212" Margin="0,0,0.4,3.8">
  14.         <Grid.ColumnDefinitions>
  15.             <ColumnDefinition/>
  16.         </Grid.ColumnDefinitions>
  17.  
  18.         <Grid x:Name="Sketch" Margin="145,110,715,288.7">
  19.             <Grid.RowDefinitions>
  20.                 <RowDefinition Height="0.9*"/>
  21.                 <RowDefinition Height="0.1*" />
  22.             </Grid.RowDefinitions>
  23.             <ItemsControl x:Name="myIc" Grid.Row="0" Margin="0,0,0,10" DataContext="{Binding CurrentField}" ItemsSource="{Binding Tueren}" >
  24.                 <ItemsControl.ItemsPanel>
  25.                     <ItemsPanelTemplate>
  26.                         <Canvas x:Name="canvi" Grid.Row="0" MouseDown="Canvi_MouseDown">
  27.                             <Canvas.Background>
  28.                                 <ImageBrush ImageSource="{Binding PicsOfFieldsUri, Converter={StaticResource IImageUrlToImageConverter}}"/>
  29.                             </Canvas.Background>
  30.                         </Canvas>
  31.                     </ItemsPanelTemplate>
  32.                 </ItemsControl.ItemsPanel>
  33.                 <ItemsControl.ItemContainerStyle>
  34.                     <Style TargetType="ContentPresenter">
  35.                         <Setter Property="Canvas.Left" Value="{Binding Xcoordinate}" />
  36.                         <Setter Property="Canvas.Top" Value="{Binding Ycoordinate}" />
  37.                     </Style>
  38.                 </ItemsControl.ItemContainerStyle>
  39.                 <ItemsControl.ItemTemplate>
  40.                     <DataTemplate>
  41.                         <Button Command="{Binding Path=DataContext.AddDoorCommand, ElementName=Sketch}" Background="GreenYellow" Content="{Binding Path=Bezeichnung}" TextElement.FontWeight="Bold"  Width="55" Height="35"/>
  42.                     </DataTemplate>
  43.                 </ItemsControl.ItemTemplate>
  44.             </ItemsControl>
  45.             <Slider x:Name="mySlider" Grid.Row="1" Margin="5" Maximum="44" Minimum="0"
  46.                     TickFrequency="1" IsSnapToTickEnabled="True" TickPlacement="TopLeft"
  47.                     Value ="{Binding ActuallySliderValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Background="#00000000"/>
  48.         </Grid>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement