main
syneffort 2 years ago
parent 777cc3c474
commit 151f3a5606
  1. 2
      PacticeSolution/ImageLoader/MainWindow.xaml.cs
  2. 6
      PacticeSolution/PacticeSolution.sln
  3. 9
      PacticeSolution/XamlUISample/App.xaml
  4. 17
      PacticeSolution/XamlUISample/App.xaml.cs
  5. 10
      PacticeSolution/XamlUISample/AssemblyInfo.cs
  6. 81
      PacticeSolution/XamlUISample/MainWindow.xaml
  7. 28
      PacticeSolution/XamlUISample/MainWindow.xaml.cs
  8. 10
      PacticeSolution/XamlUISample/XamlUISample.csproj

@ -78,7 +78,7 @@ namespace ImageLoader
//if (parent != null) //if (parent != null)
// parent.Children.Clear(); // parent.Children.Clear();
Image newImage = CreateBitmap(image.Source.ToString(), 1000); Image newImage = CreateBitmap(image.Source.ToString(), (int)cvsImage.ActualWidth);
newImage.Stretch = Stretch.UniformToFill; newImage.Stretch = Stretch.UniformToFill;
cvsImage.Children.Clear(); cvsImage.Children.Clear();
cvsImage.Children.Add(newImage); cvsImage.Children.Add(newImage);

@ -29,6 +29,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVMDataGridBinding", "MVVM
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageLoader", "ImageLoader\ImageLoader.csproj", "{F65ED213-2F48-4370-B327-FC1F4AFF1E66}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageLoader", "ImageLoader\ImageLoader.csproj", "{F65ED213-2F48-4370-B327-FC1F4AFF1E66}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamlUISample", "XamlUISample\XamlUISample.csproj", "{CBB0126E-291E-47F0-82D4-B7D78439BC4C}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -87,6 +89,10 @@ Global
{F65ED213-2F48-4370-B327-FC1F4AFF1E66}.Debug|Any CPU.Build.0 = Debug|Any CPU {F65ED213-2F48-4370-B327-FC1F4AFF1E66}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F65ED213-2F48-4370-B327-FC1F4AFF1E66}.Release|Any CPU.ActiveCfg = Release|Any CPU {F65ED213-2F48-4370-B327-FC1F4AFF1E66}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F65ED213-2F48-4370-B327-FC1F4AFF1E66}.Release|Any CPU.Build.0 = Release|Any CPU {F65ED213-2F48-4370-B327-FC1F4AFF1E66}.Release|Any CPU.Build.0 = Release|Any CPU
{CBB0126E-291E-47F0-82D4-B7D78439BC4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CBB0126E-291E-47F0-82D4-B7D78439BC4C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CBB0126E-291E-47F0-82D4-B7D78439BC4C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CBB0126E-291E-47F0-82D4-B7D78439BC4C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

@ -0,0 +1,9 @@
<Application x:Class="XamlUISample.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:XamlUISample"
StartupUri="MainWindow.xaml">
<Application.Resources>
</Application.Resources>
</Application>

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
namespace XamlUISample
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
}
}

@ -0,0 +1,10 @@
using System.Windows;
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]

@ -0,0 +1,81 @@
<Window x:Class="XamlUISample.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:XamlUISample"
mc:Ignorable="d"
Title="MainWindow" Height="550" Width="400">
<Border Padding="10">
<StackPanel>
<TextBlock Text="Pulse Properties" FontWeight="Bold" Margin="0 10 0 0"/>
<TextBlock Text="Description" FontWeight="Light" Margin="0 10 0 0"/>
<TextBox Padding="2"/>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" Margin="0 10 5 0">
<TextBlock Text="Status"/>
<TextBox Padding="2" IsReadOnly="True" Background="#eeeeee"/>
</StackPanel>
<StackPanel Grid.Column="1" Margin="5 10 0 0">
<TextBlock Text="Revision"/>
<TextBox Padding="2" IsReadOnly="True" Background="#eeeeee"/>
</StackPanel>
</Grid>
<TextBlock Text="PartNumber" FontWeight="Light" Margin="0"/>
<TextBox Padding="2" IsReadOnly="True" Background="#eeeeee"/>
<TextBlock Text="Raw Materials" FontWeight="Bold" Margin="0 10 0 0"/>
<TextBlock Text="Materials" FontWeight="Light" Margin="0 10 0 0"/>
<ComboBox Padding="2"/>
<TextBlock Text="Manufacturing Information" FontWeight="Bold" Margin="0 10 0 0"/>
<TextBlock Text="Work Centers" FontWeight="Light" Margin="0 10 0 0"/>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0">
<CheckBox Content="Weld"/>
<CheckBox Content="Assembly"/>
<CheckBox Content="Plasma"/>
<CheckBox Content="Laser"/>
<CheckBox Content="Purchase"/>
</StackPanel>
<StackPanel Grid.Column="1">
<CheckBox Content="Weld"/>
<CheckBox Content="Assembly"/>
<CheckBox Content="Plasma"/>
<CheckBox Content="Laser"/>
<CheckBox Content="Purchase"/>
</StackPanel>
</Grid>
<TextBlock Text="Finish" FontWeight="Light" Margin="0 10 0 0"/>
<ComboBox Padding="2" SelectedIndex="0">
<ComboBoxItem Content="Painted"/>
<ComboBoxItem Content="No painted"/>
</ComboBox>
<Grid Margin="0 30 0 0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Button x:Name="btnApply" Grid.Column="0" Content="Apply" Margin="5"/>
<Button x:Name="btnReset" Grid.Column="1" Content="Reset" Margin="5"/>
<Button x:Name="btnRefresh" Grid.Column="2" Content="Refresh" Margin="5"/>
</Grid>
</StackPanel>
</Border>
</Window>

@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace XamlUISample
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
}
}

@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
</PropertyGroup>
</Project>
Loading…
Cancel
Save