A我的Windows Phone 8.1中有以下CommandBar(我正在使用通用模板):
<Page.BottomAppBar>
<CommandBar>
<AppBarButton Label="add task" Click="GoToAddTask">
<AppBarButton.Icon>
<SymbolIcon Symbol="Add" />
</AppBarButton.Icon>
</AppBarButton>
<AppBarButton Label="sort by">
<AppBarButton.Icon>
<SymbolIcon Symbol="Sort" />
</AppBarButton.Icon>
<AppBarButton.Flyout>
<MenuFlyout>
<MenuFlyoutItem Command="{Binding SortByDate}" Text="Date" />
<MenuFlyoutItem Text="Priority" Command="{Binding SortByPriority}" />
<MenuFlyoutItem Text="Name" Command="{Binding SortByName}" />
</MenuFlyout>
</AppBarButton.Flyout>
</AppBarButton>
<AppBarButton Label="pin project" Command="{Binding PinProject}">
<AppBarButton.Icon>
<SymbolIcon Symbol="Pin" />
</AppBarButton.Icon>
</AppBarButton>
</CommandBar>
</Page.BottomAppBar>
Run Code Online (Sandbox Code Playgroud)
问题是,当用户点击AppBarButton"排序依据"时,Flyout的下边缘似乎粘在AppBar本身后面的屏幕底部.这是一个截图:

我检查了在Windows 8.1当量,它工作正常(如图所示例如这里).
我假设Flyout将显示在AppBar本身上方.
当用户更改Hub控件中的视图时,我需要更改AppBar的内容.
我在使用Pivot控件时执行此操作的方式是侦听SelectionChanged事件并响应SelectIndex值.
但是,集线器只有一个SectionsInViewChanged事件,它返回多个部分的集合.通常,一个用户与相邻的,几乎不可见的部分进行交互.
所以我的问题是,我如何判断哪个部分是当前显着向用户显示的部分(因此我可以相应地更改AppBar图标)?
我需要在使用WinRT创建的Windows Phone 8.1应用程序中创建可重新排序的ListView.XAML如下(它与代码隐藏中的ObservableDictionary绑定):
<Grid Margin="24">
<ListView x:Name="MainListView" CanDragItems="True" CanReorderItems="True" AllowDrop="True" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" >
<ListView.ItemTemplate>
<DataTemplate>
<Border Padding="24" Margin="16" Background="CadetBlue">
<TextBlock Text="{Binding}" />
</Border>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Grid>
Run Code Online (Sandbox Code Playgroud)
当我尝试重新排序项目时,ListView什么都不做(看起来"重新排序模式"没有激活).
当我在Windows 8.1中运行此示例(共享XAML)时,它按预期工作.根据文档,应支持Windows Phone 8.1.
手机是否支持此功能(文档错误)或我是否需要为手机做一些特殊操作?
问题是,DataGrid 中的空白行没有出现,因此用户无法添加数据。这是代码:
System.Collections.ObjectModel.ObservableCollection<CoreVocabularyEntry> dataList = new System.Collections.ObjectModel.ObservableCollection<CoreVocabularyEntry>();
public VocabularyToolWindow()
{
InitializeComponent();
dataList.Add(new CoreVocabularyEntry { Foreign = "ja", Native = "ano" });
ListCollectionView view = new ListCollectionView(dataList);
WordsDataGrid.ItemsSource = dataList;
WordsDataGrid.CanUserAddRows = true;
MessageBox.Show(view.CanAddNew.ToString());
}
Run Code Online (Sandbox Code Playgroud)
我不明白为什么 view.CanAddNew 等于 false。这看起来像是一个非常标准的场景,所以可能有一些我遗漏的东西。有人可以告诉我代码有什么问题吗?CoreVocabularyEntry 如下:
public struct CoreVocabularyEntry : IVocabularyEntry
{
#region IVocabularyEntry Members
public string Foreign
{
get;
set;
}
public string Native
{
get;
set;
}
#endregion
}
Run Code Online (Sandbox Code Playgroud)
谢谢,JK
无论我尝试过什么,我都会在消息中得到PLS-00103错误:
Error starting at line 1 in command:
DECLARE
MyVar NUMBER(12,0);
BEGIN
HISTORY.sp_CHS_Insert('OMSC01', 522‚ 'OMSC01' ,522 , 4, 'S14_DCSKOLIZE', 'CHYBA', MyVar);
END;
Error report:
ORA-06550: ?ádka 4, sloupec 38:
PLS-00103: Encountered the symbol "," when expecting one of the following:
) , * & = - + < / > at v is mod remainder not rem =>
<exponent (**)> <> or != or ~= >= <= <> and or like like2
like4 likec between || multiset member submultiset
Symbol …Run Code Online (Sandbox Code Playgroud)