document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. <Window x:Class="LatihanMVVM.MainWindow"
  2.         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3.         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4.         Title="MainWindow" Height="356" Width="528">
  5.  
  6.     <Window.Resources>
  7.         <Style TargetType="TextBlock">
  8.             <Setter Property="FontSize" Value="20" />
  9.             <Setter Property="FontFamily" Value="Myriad Pro" />
  10.             <Setter Property="FontWeight" Value="SemiBold" />
  11.             <Setter Property="Background">
  12.                 <Setter.Value>
  13.                     <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
  14.                         <GradientStop Color="#FF508FC4" Offset="0" />
  15.                         <GradientStop Color="#FF6F94AD" Offset="1" />
  16.                         <GradientStop Color="#FFC7F3FF" Offset="0.302" />
  17.                     </LinearGradientBrush>
  18.                 </Setter.Value>
  19.             </Setter>
  20.             <Setter Property="Foreground">
  21.                 <Setter.Value>
  22.                     <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
  23.                         <GradientStop Color="#FF5252CE" Offset="0" />
  24.                         <GradientStop Color="#FF0000DB" Offset="0.953" />
  25.                         <GradientStop Color="#FF6363CB" Offset="0.337" />
  26.                     </LinearGradientBrush>
  27.                 </Setter.Value>
  28.             </Setter>
  29.         </Style>
  30.  
  31.         <Style TargetType="Label">
  32.             <Setter Property="FontSize" Value="14" />
  33.         </Style>
  34.  
  35.         <Style TargetType="TextBox">
  36.             <Setter Property="Language" Value="in-IN" />
  37.             <Setter Property="Template">
  38.                 <Setter.Value>
  39.                     <ControlTemplate>
  40.                         <Border x:Name="customBorder" Background="{TemplateBinding Background}" CornerRadius="5" BorderThickness="2" BorderBrush="Gray">
  41.                             <ScrollViewer x:Name="PART_ContentHost"/>
  42.                         </Border>
  43.                         <ControlTemplate.Triggers>
  44.                             <Trigger Property="IsKeyboardFocused" Value="True">
  45.                                 <Setter TargetName="customBorder" Property="Effect">
  46.                                     <Setter.Value>
  47.                                         <DropShadowEffect BlurRadius="10" ShadowDepth="0" Color="#578EC9"/>
  48.                                     </Setter.Value>
  49.                                 </Setter>
  50.                             </Trigger>
  51.                             <Trigger Property="IsKeyboardFocused" Value="False">
  52.                                 <Setter Property="Foreground" Value="Gray" />
  53.                             </Trigger>
  54.                         </ControlTemplate.Triggers>
  55.                     </ControlTemplate>
  56.                 </Setter.Value>
  57.             </Setter>
  58.             <Setter Property="Validation.ErrorTemplate">
  59.                 <Setter.Value>
  60.                     <ControlTemplate>
  61.                         <StackPanel Orientation="Horizontal">
  62.                             <AdornedElementPlaceholder />
  63.                             <TextBlock Text="Perlu diperbaiki!" Padding="3" Foreground="Red" />
  64.                         </StackPanel>
  65.                     </ControlTemplate>
  66.                 </Setter.Value>
  67.             </Setter>
  68.         </Style>
  69.  
  70.         <Style TargetType="Button">
  71.             <Setter Property="Background" Value="#DEF2FC" />
  72.             <Setter Property="Foreground" Value="Black" />
  73.             <Setter Property="FontSize" Value="15"/>
  74.             <Setter Property="Effect">
  75.                 <Setter.Value>
  76.                     <DropShadowEffect BlurRadius="10" ShadowDepth="0" Color="#578EC9"/>
  77.                 </Setter.Value>
  78.             </Setter>
  79.             <Setter Property="Template">
  80.                 <Setter.Value>
  81.                     <ControlTemplate TargetType="{x:Type Button}">
  82.                         <Border x:Name="customBorder" Background="{TemplateBinding Background}" CornerRadius="4" BorderThickness="2" BorderBrush="Gray">
  83.                             <ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Center" />
  84.                         </Border>
  85.                         <ControlTemplate.Triggers>
  86.                             <Trigger Property="IsMouseOver" Value="True">
  87.                                 <Setter Property="Background" Value="#2394CC" />
  88.                                 <Setter Property="Foreground" Value="White" />
  89.                             </Trigger>
  90.                             <Trigger Property="IsPressed" Value="True">
  91.                                 <Setter Property="Effect" Value="{x:Null}" />
  92.                             </Trigger>
  93.                             <Trigger Property="IsEnabled" Value="False">
  94.                                 <Setter Property="Effect">
  95.                                     <Setter.Value>
  96.                                         <BlurEffect Radius="3"  />
  97.                                     </Setter.Value>
  98.                                 </Setter>
  99.                             </Trigger>
  100.                         </ControlTemplate.Triggers>
  101.                     </ControlTemplate>
  102.                 </Setter.Value>
  103.             </Setter>
  104.         </Style>
  105.     </Window.Resources>
  106.  
  107.     <Grid>
  108.         <Label Content="Nama Barang:" Height="29" HorizontalAlignment="Left" Margin="0,49,0,0" Name="label2" VerticalAlignment="Top" HorizontalContentAlignment="Right" Width="107" />
  109.         <TextBox Height="23" HorizontalAlignment="Stretch" Margin="112,55,12,0" Name="textBox1" VerticalAlignment="Top" Text="{Binding Path=NamaBarang}"/>
  110.         <Label Content="Jumlah:" Height="27" HorizontalAlignment="Left" Margin="1,86,0,0" Name="label3" VerticalAlignment="Top" Width="106" HorizontalContentAlignment="Right" />
  111.         <TextBox Height="23" HorizontalAlignment="Left" Margin="113,90,0,0" Name="textBox2" VerticalAlignment="Top" Width="62" Text="{Binding Path=Jumlah, StringFormat={}{0:#.0}}" />
  112.         <Label Content="Harga:" Height="28" HorizontalAlignment="Left" Margin="12,122,0,0" Name="label4" VerticalAlignment="Top" HorizontalContentAlignment="Right" Width="95" />
  113.         <TextBox Height="23" HorizontalAlignment="Left" Margin="113,127,0,0" Name="textBox3" VerticalAlignment="Top" Width="124" Text="{Binding Path=Harga, StringFormat={}{0:C}}" />
  114.         <Button Content="Simpan" Height="27" HorizontalAlignment="Left" Margin="207,228,0,0" Name="button1" VerticalAlignment="Top" Width="82" />
  115.         <Label Content="Diskon (%):" Height="33" HorizontalAlignment="Left" Margin="12,161,0,0" Name="label5" VerticalAlignment="Top" HorizontalContentAlignment="Right" Width="95" />
  116.         <TextBox Height="23" HorizontalAlignment="Left" Margin="113,165,0,0" Name="textBox4" VerticalAlignment="Top" Width="62" Text="{Binding Path=DiskonPersen, StringFormat={}{0:#.#}}" />
  117.         <Label Content="Total:" Height="33" HorizontalAlignment="Left" Margin="12,194,0,0" Name="label6" VerticalAlignment="Top" HorizontalContentAlignment="Right" Width="95" />
  118.         <Label Height="28" HorizontalAlignment="Left" Margin="113,194,0,0" Name="label7" VerticalAlignment="Top" Width="402" Content="{Binding Path=Total}" />
  119.         <TextBlock Height="28" HorizontalAlignment="Stretch" Name="textBlock1" Text="Tambah Item Penjualan" VerticalAlignment="Top" TextAlignment="Center" Margin="0,12,0,0" />
  120.  
  121.         <Grid.Background>
  122.             <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
  123.                 <GradientStop Color="#FFB7CEFF" Offset="0.192" />
  124.                 <GradientStop Color="White" Offset="1" />
  125.                 <GradientStop Color="#FF1648AD" Offset="0" />
  126.             </LinearGradientBrush>
  127.         </Grid.Background>
  128.  
  129.     </Grid>
  130. </Window>
');