I am trying to build a WPF desktop app and my HomeWindow
is defined like this:
<Window x:Class="App1.HomeWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:App1"
xmlns:MainWindow="clr-namespace:App1"
xmlns:uc="clr-namespace:App1.UserControls.Home"
mc:Ignorable="d" UseLayoutRounding="True"
Title="App 1" Height= "750" Width="1200" MinHeight="500" MinWidth="800" WindowStyle="ThreeDBorderWindow" WindowStartupLocation="CenterScreen">
When the app is first loaded, I store the username and the client name in a simple class that is defined like this:
public static class LoggedInData
{
public static string LoggedInUserName { get; set; }
public static string LoggedClientName { get; set; }
}
What I would like to accomplish is, instead of just displaying a text in the title of the window, I would like to display the static text App1
, the value of LoggedInUserName
and the value of LoggedClientName
.
I have tried some of the answers I have seen here but I have failed to reproduce them with my app. Can someone help me?