I have the following UserControl declaration in xaml done by someone else:
<core:UserControlBase x:Class="xxxx"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:core="clr-namespace:Agn.Word.AddIn.Core.Presentation;assembly=Agn.Word.AddIn.Core"
x:Name="aName">
As far as I know the x:Name attribute is used to give a name to the variable declarer in xaml to be able to reference it from code or from the xaml itself.
Given that this is the root element I don't get why would I use this name for (in code behind I will use this
, in xaml I can use RelativeSource
, etc).
Any hints?