diff options
| author | Paulius Klezys <paul4618@edu.easj.dk> | 2017-05-12 13:05:34 +0200 |
|---|---|---|
| committer | Paulius Klezys <paul4618@edu.easj.dk> | 2017-05-12 13:05:34 +0200 |
| commit | 2a192ba79d69741c947f400a4a4d9c80bf5d3d05 (patch) | |
| tree | d7f68241e42aec08903f98b9c10197b4ebb8590c | |
| parent | a59f6e6d3163d2c83ebfcc9c5b5da2d2f2c114c1 (diff) | |
| parent | 0163e5e6b85907140d70051cf96c32d1dfe9c310 (diff) | |
Ze best čeindž eva
37 files changed, 1241 insertions, 429 deletions
diff --git a/ApartmentManager/ApartmentManager/ApartmentManager.csproj b/ApartmentManager/ApartmentManager/ApartmentManager.csproj index 6a74df4..54a0248 100644 --- a/ApartmentManager/ApartmentManager/ApartmentManager.csproj +++ b/ApartmentManager/ApartmentManager/ApartmentManager.csproj @@ -103,7 +103,7 @@ <Compile Include="Handler\BoardApartmentsHandler.cs" /> <Compile Include="Handler\BoardResidentsHandler.cs" /> <Compile Include="Handler\LoginHandler.cs" /> - <Compile Include="Handler\ResidentsHandler.cs" /> + <Compile Include="Handler\ApartmentHandler.cs" /> <Compile Include="Model\Apartment.cs" /> <Compile Include="Persistency\ImgurPhotoUploader.cs" /> <Compile Include="Singletons\ApartmentsCatalogSingleton.cs" /> @@ -120,6 +120,12 @@ <Compile Include="ViewModel\ApartmentsViewModel.cs" /> <Compile Include="ViewModel\ApartmenViewModel.cs" /> <Compile Include="ViewModel\LoginViewModel.cs" /> + <Compile Include="View\ApartmentDefectPage.xaml.cs"> + <DependentUpon>ApartmentDefectPage.xaml</DependentUpon> + </Compile> + <Compile Include="View\ApartmentNewDefect.xaml.cs"> + <DependentUpon>ApartmentNewDefect.xaml</DependentUpon> + </Compile> <Compile Include="View\ApartmentPage.xaml.cs"> <DependentUpon>ApartmentPage.xaml</DependentUpon> </Compile> @@ -183,6 +189,14 @@ <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> </Page> + <Page Include="View\ApartmentDefectPage.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> + <Page Include="View\ApartmentNewDefect.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> <Page Include="View\ApartmentPage.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> diff --git a/ApartmentManager/ApartmentManager/Handler/ResidentsHandler.cs b/ApartmentManager/ApartmentManager/Handler/ApartmentHandler.cs index 203c06e..f3cc8b3 100644 --- a/ApartmentManager/ApartmentManager/Handler/ResidentsHandler.cs +++ b/ApartmentManager/ApartmentManager/Handler/ApartmentHandler.cs @@ -12,11 +12,11 @@ using Newtonsoft.Json; namespace ApartmentManager.Handler { - public class ResidentsHandler + public class ApartmentHandler { public ApartmentViewModel ApartmentViewModel { get; set; } - public ResidentsHandler(ApartmentViewModel apartmenViewModel) + public ApartmentHandler(ApartmentViewModel apartmenViewModel) { ApartmentViewModel = apartmenViewModel; } @@ -24,7 +24,7 @@ namespace ApartmentManager.Handler { Resident resident = new Resident(); resident.ApartmentNr = ApartmentViewModel.ApartmentNumber; - + var residentsFromDatabase = ApiClient.GetData("api/ApartmentResidents/" + resident.ApartmentNr); IEnumerable<Resident> residentlist = JsonConvert.DeserializeObject<IEnumerable<Resident>>(residentsFromDatabase); @@ -32,8 +32,16 @@ namespace ApartmentManager.Handler ApartmentViewModel.NewResident = new Resident(); foreach (var resident2 in residentlist) { - ApartmentViewModel.CatalogSingleton.Residents.Add(resident2); + ApartmentViewModel.CatalogSingleton.Residents.Add(resident2); } + + } + public void GetApartment() + { + string serializedApartment = ApiClient.GetData("api/Apartments/" + ApartmentViewModel.ApartmentNumber); + + Apartment apartment = JsonConvert.DeserializeObject<Apartment>(serializedApartment); + ApartmentViewModel.CatalogSingleton.Apartment = apartment; } public void CreateResident() @@ -41,7 +49,6 @@ namespace ApartmentManager.Handler try { Resident resident = new Resident(); - resident.ApartmentNr = ApartmentViewModel.ApartmentNumber; resident.FirstName = ApartmentViewModel.NewResident.FirstName; resident.LastName = ApartmentViewModel.NewResident.LastName; @@ -113,7 +120,7 @@ namespace ApartmentManager.Handler resident.Picture = ApartmentViewModel.NewResident.Picture; resident.Phone = ApartmentViewModel.NewResident.Phone; - ApiClient.PutData("api/residents/" + resident.ResidentNr,resident); + ApiClient.PutData("api/residents/" + resident.ResidentNr, resident); var residentsFromDatabase = ApiClient.GetData("api/ApartmentResidents/" + resident.ApartmentNr); IEnumerable<Resident> residentlist = JsonConvert.DeserializeObject<IEnumerable<Resident>>(residentsFromDatabase); @@ -128,6 +135,23 @@ namespace ApartmentManager.Handler { new MessageDialog(e.Message).ShowAsync(); } - } - } + } + + public async void UploadResidentPhoto() + { + try + { + ApartmentViewModel.NewResident.Picture = await ImgurPhotoUploader.UploadPhotoAsync(); + var tmp = ApartmentViewModel.NewResident; + ApartmentViewModel.NewResident = new Resident(); + ApartmentViewModel.NewResident = tmp; + } + catch (Exception e) + { + + + } + + } + } } diff --git a/ApartmentManager/ApartmentManager/Model/Apartment.cs b/ApartmentManager/ApartmentManager/Model/Apartment.cs index 1a37f96..c5754a9 100644 --- a/ApartmentManager/ApartmentManager/Model/Apartment.cs +++ b/ApartmentManager/ApartmentManager/Model/Apartment.cs @@ -14,6 +14,7 @@ namespace ApartmentManager.Model public string MonthlyCharge { get; set; } public int Floor { get; set; } public string Address { get; set; } + public string PlanPicture { get; set; } public Apartment() { } @@ -25,6 +26,7 @@ namespace ApartmentManager.Model this.MonthlyCharge = MonthlyCharge; this.Floor = Floor; this.Address = Address; + } diff --git a/ApartmentManager/ApartmentManager/Model/Defect.cs b/ApartmentManager/ApartmentManager/Model/Defect.cs index c588c18..5d97831 100644 --- a/ApartmentManager/ApartmentManager/Model/Defect.cs +++ b/ApartmentManager/ApartmentManager/Model/Defect.cs @@ -13,18 +13,18 @@ namespace ApartmentManager.Model public int ApartmentNumber { get; set; } public string Name { get; set; } public DateTime DateUploaded { get; set; } - public Image Picture { get; set; } - public Image Picture2 { get; set; } - public Image Picture3 { get; set; } + public string Picture { get; set; } + public string Picture2 { get; set; } + public string Picture3 { get; set; } public string Description { get; set; } public string Comment { get; set; } public string Status { get; set; } public Defect() { } - public Defect(int DefectNumber, int ApartmentNumber, string Name, DateTime DateUploaded, Image Picture, Image Picture2, Image Picture3, string Description, string Comment, string Status) + public Defect( int ApartmentNumber, string Name, DateTime DateUploaded, string Picture, string Picture2, string Picture3, string Description, string Comment, string Status) { - this.DefectNumber = DefectNumber; + this.ApartmentNumber = ApartmentNumber; this.Name = Name; this.DateUploaded = DateUploaded; diff --git a/ApartmentManager/ApartmentManager/Model/Resident.cs b/ApartmentManager/ApartmentManager/Model/Resident.cs index e9f39cd..79bf6a1 100644 --- a/ApartmentManager/ApartmentManager/Model/Resident.cs +++ b/ApartmentManager/ApartmentManager/Model/Resident.cs @@ -12,26 +12,31 @@ namespace ApartmentManager.Model public string FirstName { get; set; } public string LastName { get; set; } public int Phone { get; set; } - public DateTime BirthDate { get; set; } + public DateTimeOffset BirthDate { get; set; } public string Email { get; set; } - public Image Picture { get; set; } + public string Picture { get; set; } public int ApartmentNr { get; set; } public int ResidentNr { get; set; } - public Resident() { } - public Resident(string FirstName, string LastName, int Phone, DateTime BirthDate, string Email, int ApartmentNr ,int ResidentNr) + public Resident() { - this.FirstName = FirstName; - this.LastName = LastName; - this.Phone = Phone; - this.BirthDate = BirthDate; - this.Email = Email; - this.ApartmentNr = ApartmentNr; - this.ResidentNr = ResidentNr; + Picture = "https://tracker.moodle.org/secure/attachment/30912/f3.png"; + BirthDate = DateTimeOffset.Now; + } + public Resident(string firstName, string lastName, int phone, DateTimeOffset birthDate, string email, int apartmentNr ,int residentNr, string picture) + { + FirstName = firstName; + LastName = lastName; + Phone = phone; + BirthDate = birthDate; + Email = email; + ApartmentNr = apartmentNr; + ResidentNr = residentNr; + Picture = picture; } public override string ToString() { - return string.Format($"Name: {FirstName}, LastName: {LastName}, Birth Date: {BirthDate}, Phone {Phone}, Email {Email} "); + return string.Format($"Name: {FirstName}, LastName: {LastName}, Birth Date: {BirthDate.Date}, Phone {Phone}, Email {Email} "); } } } diff --git a/ApartmentManager/ApartmentManager/Singletons/CatalogSingleton.cs b/ApartmentManager/ApartmentManager/Singletons/CatalogSingleton.cs index 3a4c706..490ac49 100644 --- a/ApartmentManager/ApartmentManager/Singletons/CatalogSingleton.cs +++ b/ApartmentManager/ApartmentManager/Singletons/CatalogSingleton.cs @@ -1,11 +1,8 @@ using System; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using ApartmentManager.Model; -namespace ApartmentManager.Model +namespace ApartmentManager.Singletons { public class CatalogSingleton { @@ -13,16 +10,20 @@ namespace ApartmentManager.Model public static CatalogSingleton Instance => instance; - public ObservableCollection<User> User { get; set; } - public ObservableCollection<Apartment> Apartment { get; set; } + + public Apartment Apartment { get; set; } public ObservableCollection<Resident> Residents { get; set; } + public ObservableCollection<Defect> Defects { get; set; } private CatalogSingleton() { - User = new ObservableCollection<User>(); - User.Add(new User("Bibis", "Kiausiai", "3214568", new DateTime(2017, 1, 5, 2, 27, 0), "Bibis@mail.com", 1)); - Apartment = new ObservableCollection<Apartment>(); - Apartment.Add(new Apartment(1,"30 Square meters",2,"200",0,"adresas")); Residents = new ObservableCollection<Resident>(); + Defects = new ObservableCollection<Defect>(); + Defects.Add(new Defect(1, "Broken Pipe", new DateTime(1988, 8, 8), "https://cdn.theatlantic.com/assets/media/img/photo/2011/09/vladimir-putin-action-man/p34_DWI22303/main_900.jpg?1420519465", "https://cdn.theatlantic.com/assets/media/img/photo/2011/09/vladimir-putin-action-man/p34_DWI22303/main_900.jpg?1420519465", "https://cdn.theatlantic.com/assets/media/img/photo/2011/09/vladimir-putin-action-man/p34_DWI22303/main_900.jpg?1420519465", "description", "comment", "status")); + Defects.Add(new Defect(1, "Broken Pipe", new DateTime(1988, 8, 8), "https://cdn.theatlantic.com/assets/media/img/photo/2011/09/vladimir-putin-action-man/p34_DWI22303/main_900.jpg?1420519465", "https://cdn.theatlantic.com/assets/media/img/photo/2011/09/vladimir-putin-action-man/p34_DWI22303/main_900.jpg?1420519465", "https://cdn.theatlantic.com/assets/media/img/photo/2011/09/vladimir-putin-action-man/p34_DWI22303/main_900.jpg?1420519465", "description", "comment", "status")); + Defects.Add(new Defect(1, "Broken Pipe", new DateTime(1988, 8, 8), "https://cdn.theatlantic.com/assets/media/img/photo/2011/09/vladimir-putin-action-man/p34_DWI22303/main_900.jpg?1420519465", "https://cdn.theatlantic.com/assets/media/img/photo/2011/09/vladimir-putin-action-man/p34_DWI22303/main_900.jpg?1420519465", "https://cdn.theatlantic.com/assets/media/img/photo/2011/09/vladimir-putin-action-man/p34_DWI22303/main_900.jpg?1420519465", "description", "comment", "status")); + Defects.Add(new Defect(1, "Broken Pipe", new DateTime(1988, 8, 8), "https://cdn.theatlantic.com/assets/media/img/photo/2011/09/vladimir-putin-action-man/p34_DWI22303/main_900.jpg?1420519465", "https://cdn.theatlantic.com/assets/media/img/photo/2011/09/vladimir-putin-action-man/p34_DWI22303/main_900.jpg?1420519465", "https://cdn.theatlantic.com/assets/media/img/photo/2011/09/vladimir-putin-action-man/p34_DWI22303/main_900.jpg?1420519465", "description", "comment", "status")); + + Defects.Add(new Defect(1, "Broken Pipe", new DateTime(1988, 8, 8), "https://cdn.theatlantic.com/assets/media/img/photo/2011/09/vladimir-putin-action-man/p34_DWI22303/main_900.jpg?1420519465", "https://cdn.theatlantic.com/assets/media/img/photo/2011/09/vladimir-putin-action-man/p34_DWI22303/main_900.jpg?1420519465", "https://cdn.theatlantic.com/assets/media/img/photo/2011/09/vladimir-putin-action-man/p34_DWI22303/main_900.jpg?1420519465", "description", "comment", "status")); } } diff --git a/ApartmentManager/ApartmentManager/View/ApartmentDefectPage.xaml b/ApartmentManager/ApartmentManager/View/ApartmentDefectPage.xaml new file mode 100644 index 0000000..a69fe96 --- /dev/null +++ b/ApartmentManager/ApartmentManager/View/ApartmentDefectPage.xaml @@ -0,0 +1,91 @@ +<Page + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:local="using:ApartmentManager.View" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:ViewModel="using:ApartmentManager.ViewModel" + x:Class="ApartmentManager.View.ApartmentDefectPage" + mc:Ignorable="d"> + + <Page.DataContext> + <ViewModel:ApartmentViewModel/> + </Page.DataContext> + + <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> + <StackPanel Margin="10"> + <TextBlock Text="Apartment Defects" HorizontalAlignment="Center" FontSize="30" FontWeight="Bold"></TextBlock> + <ListView ItemsSource="{Binding CatalogSingleton.Defects}" Height="615" SelectedItem="{Binding NewDefect, Mode=TwoWay}" > + <ListView.ItemContainerStyle> + <Style TargetType="ListViewItem"> + <Setter Property="HorizontalContentAlignment" Value="Stretch"/> + </Style> + </ListView.ItemContainerStyle> + + <ListView.ItemTemplate> + + <DataTemplate> + <Grid Background="LightGray" Height="200" Margin="0,0,0,5"> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="200"/> + <ColumnDefinition /> + </Grid.ColumnDefinitions> + <Grid Grid.Column="0" Background="Gray" BorderThickness="0,0,2,0" BorderBrush="#CCFFFFFF" > + <Image Stretch="Fill" Source="{Binding Picture}" /> + </Grid> + <Grid Grid.Column="1" Margin="2"> + <StackPanel Margin="10"> + + <StackPanel Orientation="Horizontal"> + <TextBlock Text="Name :" Margin="0,0,10,0" FontSize="30" FontWeight="Bold"/> + <TextBlock Text="{Binding Name}" Margin="0,0,10,0" FontSize="30"/> + + </StackPanel> + + <StackPanel Orientation="Horizontal"> + <TextBlock Text="{Binding Description}" TextWrapping="Wrap" Margin="0,0,10,0" FontSize="20" Height="108" Width="800"/> + </StackPanel> + + <StackPanel Orientation="Horizontal"/> + + <StackPanel Orientation="Horizontal"> + <TextBlock Text="Status :" Margin="0,0,10,0" FontSize="25"/> + <TextBlock Text="{Binding Status}" Margin="0,0,10,0" FontSize="25"/> + + <TextBlock Text="Date Submitted :" Margin="700,0,10,0" FontSize="25" HorizontalAlignment="Left"/> + <TextBlock Text="{Binding DateUploaded}" Margin="0,0,10,0" FontSize="25"/> + </StackPanel> + + </StackPanel> + + + </Grid> + </Grid> + </DataTemplate> + </ListView.ItemTemplate> + </ListView> + <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,15,0,0"> + <Button Content="New Defect" Width="200" Margin="0,0,100,0" ></Button> + <Button Content="View Defect" Width="200" Margin="0,0,100,0" ></Button> + </StackPanel> + + </StackPanel> + + + + + + + + + + + + + + + + + + </Grid> +</Page> diff --git a/ApartmentManager/ApartmentManager/View/ApartmentDefectPage.xaml.cs b/ApartmentManager/ApartmentManager/View/ApartmentDefectPage.xaml.cs new file mode 100644 index 0000000..7a157ab --- /dev/null +++ b/ApartmentManager/ApartmentManager/View/ApartmentDefectPage.xaml.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using Windows.Foundation; +using Windows.Foundation.Collections; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Controls.Primitives; +using Windows.UI.Xaml.Data; +using Windows.UI.Xaml.Input; +using Windows.UI.Xaml.Media; +using Windows.UI.Xaml.Navigation; + +// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238 + +namespace ApartmentManager.View +{ + /// <summary> + /// An empty page that can be used on its own or navigated to within a Frame. + /// </summary> + public sealed partial class ApartmentDefectPage : Page + { + public ApartmentDefectPage() + { + this.InitializeComponent(); + } + } +} diff --git a/ApartmentManager/ApartmentManager/View/ApartmentNewDefect.xaml b/ApartmentManager/ApartmentManager/View/ApartmentNewDefect.xaml new file mode 100644 index 0000000..c6332e1 --- /dev/null +++ b/ApartmentManager/ApartmentManager/View/ApartmentNewDefect.xaml @@ -0,0 +1,53 @@ +<Page + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:local="using:ApartmentManager.View" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:ViewModel="using:ApartmentManager.ViewModel" + x:Class="ApartmentManager.View.ApartmentNewDefect" + mc:Ignorable="d"> + + <Page.DataContext> + <ViewModel:ApartmentViewModel/> + </Page.DataContext> + + <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> + <StackPanel Orientation="Vertical" HorizontalAlignment="Center"> + + <TextBlock Margin="0,10,0,10" Text="Defect Information" HorizontalAlignment="Center" FontSize="20" FontWeight="Bold"/> + + <StackPanel Orientation="Horizontal"> + <StackPanel Margin="0,5,30,0"> + + <StackPanel Orientation="Horizontal" > + <Image Height="200" Width="355" Source="{Binding NewDefect.Picture}" /> + <Button Content="Upload Picture" Margin="30,0,0,0"/> + </StackPanel> + + <StackPanel Orientation="Horizontal" Margin="0,30,0,0"> + <Image Height="200" Width="355" Source="{Binding NewDefect.Picture2}" /> + <Button Content="Upload Picture" Margin="30,0,0,0"/> + </StackPanel> + + <StackPanel Orientation="Horizontal" Margin="0,30,0,0"> + <Image Height="200" Width="355" Source="{Binding NewDefect.Picture3}" /> + <Button Content="Upload Picture" Margin="30,0,0,0"/> + </StackPanel> + + </StackPanel> + + <StackPanel Width="400" Margin="0,0,50,0"> + <TextBlock Margin="0,10,0,10" Text="Name"/> + <TextBox Text="{Binding NewDefect.Name, Mode=TwoWay}" /> + <TextBlock Margin="0,10,0,10" Text="Description"/> + <TextBox Text="{Binding NewDefect.Description, Mode=TwoWay}" Height="140" /> + <TextBlock Margin="0,10,0,10" Text="Comment"/> + <TextBox Text="{Binding NewDefect.Comment, Mode=TwoWay}" Height="300" /> + <Button Margin="0,20,0,0" Content="Create" HorizontalAlignment="Stretch"/> + </StackPanel> + + </StackPanel> + </StackPanel> + </Grid> +</Page> diff --git a/ApartmentManager/ApartmentManager/View/ApartmentNewDefect.xaml.cs b/ApartmentManager/ApartmentManager/View/ApartmentNewDefect.xaml.cs new file mode 100644 index 0000000..5e18b42 --- /dev/null +++ b/ApartmentManager/ApartmentManager/View/ApartmentNewDefect.xaml.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using Windows.Foundation; +using Windows.Foundation.Collections; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Controls.Primitives; +using Windows.UI.Xaml.Data; +using Windows.UI.Xaml.Input; +using Windows.UI.Xaml.Media; +using Windows.UI.Xaml.Navigation; + +// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238 + +namespace ApartmentManager.View +{ + /// <summary> + /// An empty page that can be used on its own or navigated to within a Frame. + /// </summary> + public sealed partial class ApartmentNewDefect : Page + { + public ApartmentNewDefect() + { + this.InitializeComponent(); + } + } +} diff --git a/ApartmentManager/ApartmentManager/View/ApartmentPage.xaml b/ApartmentManager/ApartmentManager/View/ApartmentPage.xaml index 385e580..acf1cbc 100644 --- a/ApartmentManager/ApartmentManager/View/ApartmentPage.xaml +++ b/ApartmentManager/ApartmentManager/View/ApartmentPage.xaml @@ -13,42 +13,61 @@ </Page.DataContext> <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> - <StackPanel Orientation="Horizontal" VerticalAlignment="Top" Width="1000" Margin="50" > - <StackPanel Width="600" Height="300" VerticalAlignment="Top"> - <StackPanel Orientation="Horizontal"> - <TextBlock Text="Apartment Address :" FontSize="20" Margin="0,0,10,0" /> - <TextBlock Text="{Binding CatalogSingleton.Apartment[0].Address}" FontSize="20"/> - </StackPanel> - <StackPanel Orientation="Horizontal"> - <TextBlock Text="Floor :" FontSize="20" Margin="0,0,10,0" /> - <TextBlock Text="{Binding CatalogSingleton.Apartment[0].Floor}" FontSize="20"/> - </StackPanel> - <StackPanel Orientation="Horizontal"> - <TextBlock Text="Apartment Number :" FontSize="20" Margin="0,0,10,0"/> - <TextBlock Text="{Binding CatalogSingleton.Apartment[0].ApartmentNumber}" FontSize="20"/> - </StackPanel> - <StackPanel Orientation="Horizontal"> - <TextBlock Text="Size :" FontSize="20" Margin="0,0,10,0"/> - <TextBlock Text="{Binding CatalogSingleton.Apartment[0].Size}" FontSize="20" Margin="0,0,10,0"/> - <TextBlock Text="m2" FontSize="20"/> - </StackPanel> - <StackPanel Orientation="Horizontal"> - <TextBlock Text="Number of Rooms :" FontSize="20" Margin="0,0,10,0"/> - <TextBlock Text="{Binding CatalogSingleton.Apartment[0].NumberOfRooms}" FontSize="20"/> + <StackPanel Orientation="Horizontal" VerticalAlignment="Top" Margin="50" > + + <StackPanel VerticalAlignment="Top" Margin="50,0,20,0"> + <Image Source="{Binding CatalogSingleton.Apartment.PlanPicture}" MaxWidth="800" MaxHeight="650"></Image> + </StackPanel> + + <StackPanel> + + <StackPanel> + + <StackPanel Orientation="Horizontal"> + <TextBlock Text="Address :" FontSize="20" Margin="0,0,10,0" FontWeight="Bold" /> + <TextBlock Text="{Binding CatalogSingleton.Apartment.Address}" FontSize="20"/> + |