私はC#の代わりにXAMlで宣言されたcoding4fun AboutPromptを使いたいです。私は標準的な方法でAboutPromptを表示したいその後Coding4funツールキットAboutPromptはXAMLで宣言されていますか?
<c4fControls:AboutPrompt x:Name="prompt" Visibility="Collapsed" Title="AboutPrompt declared in XAML" WaterMark="No Watermark">
<c4fControls:AboutPrompt.Body>
<TextBlock Text="This is the first tect in the Body section."/>
</c4fControls:AboutPrompt.Body>
</c4fControls:AboutPrompt>
: 私は私のMainPage.XMALでこのようなものが必要
private void aboutPrompt1_Click(object sender, RoutedEventArgs e)
{
prompt.Visibility = visibility.Visible;
prompt.Show();
}
問題は、私は要素がすでにある得るということです別の要素の子です。例外。
私はVisualTreeHelperを使用してこれを回避できることを知っていますが、私は洗練されたソリューションが必要です。
ありがとうございました。実際にはAboutPromptについての深い記事とUserControlの回避策があります:http://www.windowsphonegeek.com/articles/WP7-AboutPrompt-in-depth –
あなたが必要なところに嬉しいです。リンクありがとう。 –