Here is what i am trying to do
private ToggleButton _itemChecked=Name_Of_Element_In_Xaml;
That doesnt work. Is there a way?
Here is what i am trying to do
private ToggleButton _itemChecked=Name_Of_Element_In_Xaml;
That doesnt work. Is there a way?
You don't have to create it in the code behind if you already named it in xaml.
If you do this in xaml:
<Grid x:Name="LayoutRoot">
<ToggleButton x:Name="myToggleButton"></ToggleButton>
</Grid>
You can do this in code behind:
public MainPage()
{
InitializeComponent();
myToggleButton.Content = "Toggle Me";
}
Cheers, Phil