例如,我正在使用这种技术:
XAML
<Button x:Name="playButton" Content="Play with rabbit" With="20" Height="20"/>
MainPage.xaml.cs
public Button _PlayButton
{
get { return playButton; }
}
播放器控件.cs
//received instance of MainPage class to "_mainPage"
public Button Play
{
_mainPage._PlayButton.Content = "Who care about this text?";
//play logic
}
我正在寻找最佳实践。我在哪里可以深入了解这个范围?