0
我想將一個字符串綁定到示例數據。我可以綁定到代碼隱藏功能,但它會在手機屏幕上閃爍,直到示例數據消失。我知道如何綁定到列表並查看在模擬預覽中,我不知道用於在示例數據中創建字符串的語法。如何綁定到字符串中的示例數據?
以下是我的示例數據。我想向名爲stringVar的變量添加一個屬性。這只是一個字符串。
<local:ListPage
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:ListPage" >
<local:ListPage.stringVar />
<local:ListPage.ItemList>
<local:Book id="0" title="item 1"/>
</local:ListPage.ItemList>
</local:ListPage>