如何在Windows Phone 8中将数据绑定到超链接按钮 [英] How Do I Bind Data To Hyperlinkbutton In Windows Phone 8

查看:73
本文介绍了如何在Windows Phone 8中将数据绑定到超链接按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<HyperlinkButton Content="{Binding}" NavigateUri="/ECG.xaml" Background="Aqua">
                                <HyperlinkButton.ContentTemplate>

                                    <DataTemplate>

                                        <TextBlock Text="{Binding Path=ECG}"/>

                                    </DataTemplate>

                                </HyperlinkButton.ContentTemplate>
                            </HyperlinkButton>





它不会在模拟器上显示文字



it does not show text on emulator

推荐答案

我有两个想法。

第一个是:

I have two ideas for you.
The first one is:
<hyperlinkbutton content="{Binding ECG}" navigateuri="/ECG.xaml" background="Aqua" />



另一个想法是:


Another idea is this:

<hyperlinkbutton navigateuri="/ECG.xaml" background="Aqua">
    <hyperlinkbutton.content>
        <datatemplate>
            <textblock text="{Binding ECG}" />
        </datatemplate>
    </hyperlinkbutton.content>
</hyperlinkbutton>



希望它有所帮助。


Hope it helps.


这篇关于如何在Windows Phone 8中将数据绑定到超链接按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆