Setting UI Locals
The Locals attribute of a UI contains private values and objects that are instantiated for each instance of the UI. These values can be changed by the UI at run time. A local can be any MCML or user-defined type.
The following example defines locals to hold a current seconds count and host a timer:
<Locals>
<cor:Int32 Name="Seconds" Int32="0" />
<Timer Name="Timer" Interval="1000" Enabled="true" />
</Locals>
The Locals section is also where objects for your application are created:
<Mcml
xmlns:addin="assembly://Microsoft.MediaCenter/Microsoft.MediaCenter.Hosting"
. . .
<Locals>
<addin:AddInHost Name="AddInHost"/>
</Locals>
Sample Explorer
- Markup > Locals
See Also