1
我很難嘗試顯示我的文本塊在pivotitem中的外觀。我如何讓它看起來像你創建一個數據透視項目時得到的默認值?在pivotitem上正確顯示文本塊
謝謝! :)
private void LoadFromLocalStorage()
{
using (IsolatedStorageFile store = IsolatedStorageFile.GetUserStoreForApplication())
{
string[] fileNames = store.GetFileNames();
foreach (string s in fileNames)
{
TextBlock txt = new TextBlock() { Text = s };
container.Children.Add(txt);
//PivotItem pitem = new PivotItem(); //create pivotitem
//pitem.Content = //set pivotitem content
//MyPivot.Items.Add(pitem);//Add pivotitem to your pivot
}
}
}
XAML
<controls:Pivot Title="MY APPLICATION">
<!--Pivot item one-->
<controls:PivotItem Header="item1">
<StackPanel x:Name="container"></StackPanel>
</controls:PivotItem>
我在哪裏把這個 DataTemplate> –
CodeGuru
2012-01-29 09:06:27
在頁面資源或應用程序資源。應用程序資源是全球性的,而頁面是特定於給定頁面的。例如,打開App.xaml.cs,並將其粘貼到 –
2012-01-29 09:07:41
嗯,它表示屬性'LayoutOverrides'沒有在'Textblock'類型中找到 – CodeGuru 2012-01-29 09:11:41