我正在为Windows 10编写一个"可触摸"的WPF应用程序.想象一个包含以下网格的窗口:
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
<TextBox Text="dsdsd"></TextBox>
<TextBox Text="unten" Grid.Row="2" InputScope="Number"></TextBox>
</Grid>
Run Code Online (Sandbox Code Playgroud)
如果我的应用程序至少使用.NET 4.6.2编译并且其窗口最大化,我可以触摸下方TextBox并打开触摸键盘.但是我无法看到控件,因为键盘隐藏了它.此行为与Windows 8.x不同,其中键盘打开时渲染画布大小减少.在Windows Startbar-Search字段中执行相同操作时,该字段确实向上移动,因此我可以看到输入字段.使用最大化的explorer.exe打开键盘时,窗口会变小.
如何在WPF应用程序中实现此行为?
干杯,曼努埃尔
使用EF 6.1保存实体时,将生成并执行以下SQL代码:
exec sp_executesql N'INSERT [dbo].[Customers]([Name], [FirstName])
VALUES (@0, @1)
SELECT [CustomerId]
FROM [dbo].[Customers]
WHERE @@ROWCOUNT > 0 AND [CustomerId] = scope_identity()',N'@0 nvarchar(max) ,@1 nvarchar(max) ',@0=N'Wenk',@1=N'Manuel'
Run Code Online (Sandbox Code Playgroud)
我明白,插入/选择已完成,以便在保存后检索CustomerId列immediatley的值.据我所知,scope_identity()返回值,为什么没有类似的东西
SELECT scope_identity()
Run Code Online (Sandbox Code Playgroud)
而不是所有需要物理读取的东西?
干杯,曼努埃尔