If I have a TextBlock in the corner of my UserControl is it possible to bind the Text property to my Assembly Version Number Which is in AssemblyInfo.cs
WPF:
<TextBlock Text="{Binding AssemblyVersion}"/>
AssemblyInfo.cs
[assembly: AssemblyVersion("1.0.0.0")]
Create a readonly property named AssemblyVersion and bind it.
public Version AssemblyVersion
{
get
{
return Assembly.GetEntryAssembly().GetName().Version;
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With