From 244933b79f2ba271e4238b34ebf201a804838b5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tommy=20=C3=96man?= Date: Sun, 5 Jul 2020 22:59:37 +0200 Subject: [PATCH] Textblock and textbox with the same source --- WPFUI/ViewModels/ShellViewModel.cs | 12 +++++++++++- WPFUI/Views/ShellView.xaml | 25 ++++++++++++++++++++++--- 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/WPFUI/ViewModels/ShellViewModel.cs b/WPFUI/ViewModels/ShellViewModel.cs index 0dfdc6a..484cf8a 100644 --- a/WPFUI/ViewModels/ShellViewModel.cs +++ b/WPFUI/ViewModels/ShellViewModel.cs @@ -9,6 +9,16 @@ namespace WPFUI.ViewModels { public class ShellViewModel : Screen { - + private string _firstName = "Tommy"; + + public string FirstName + { + get { + return _firstName; + } + set { + _firstName = value; + } + } } } diff --git a/WPFUI/Views/ShellView.xaml b/WPFUI/Views/ShellView.xaml index 47b59ea..63896f9 100644 --- a/WPFUI/Views/ShellView.xaml +++ b/WPFUI/Views/ShellView.xaml @@ -4,9 +4,28 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:WPFUI.Views" - mc:Ignorable="d" - Title="ShellView" Height="450" Width="800"> + mc:Ignorable="d" FontSize="18" WindowStartupLocation="CenterScreen" + Title="ShellView" Height="300" Width="300"> - + + + + + + + + + + + + + + + + + + + +