Combo Box touch events not firing in Windows 10 VS2017 - wpf

Created a test application with a wpf combo box.
Using touch select an item from Combo box,after selecting the item combo box close after a flickering.
This flickering is not observed using mouse clicks.
Following are the specification for Application:
1.Made AllowsTransparency="True" for windows
2.Unchecked "Enable press and hold for right clicking" in Pen and Touch setting
System Specification:
1.Windows 10
2.VS 2017 and .Net framework 4.7
Some search results shows it is a common issue in Windows 10 that when windows is transparent touch events are not firing.
On Windows 10 (1803), all applications lost touch or stylus if a WPF transparent window covers on them
Workaround mentioned in it is not working in our case.(ResizeMode="NoResize") .
Is there any other workaround for this?
Following is my xaml code:
<Window x:Class="WpfApp1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApp1"
mc:Ignorable="d" WindowState="Maximized" WindowStyle="None"
Title="MainWindow" Height="800" Width="800" Background="Transparent" AllowsTransparency="True">
<Grid>
<ComboBox Name="cb" Height="50" Width="50">
<ComboBoxItem>A</ComboBoxItem>
<ComboBoxItem>B</ComboBoxItem>
<ComboBoxItem>C</ComboBoxItem>
<ComboBoxItem>D</ComboBoxItem>
<ComboBoxItem>E</ComboBoxItem>
<ComboBoxItem>F</ComboBoxItem>
<ComboBoxItem>G</ComboBoxItem>
</ComboBox>
</Grid>
</Window>

Related

Some Extended Unicode Characters (e.g., Zodiac Symbols) Displaying Differently between UWP and WPF

Certain extended Unicode characters, among which are the Zodiac symbols, are displaying differently in WPF TextBlocks vs. UWP TextBlocks. In UWP, as well as web browsers (for example, ♑), Toast messages, etc., display the characters with a purple background and white foreground. In WPF, the same characters are displayed with the control's background color and a black foreground. Ideally, the characters in WPF apps should be displayed consistently with the way they are displayed in other apps.
The following are the results of two test apps, one created as UWP and the other created as WPF. No changes were made to any of the other files (App.xaml, etc.), apart from the addition of the TextBlock control as follows:
UWP MainPage.xaml:
<Page x:Class="UwpApp1.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:UwpApp1"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Height="150" Width="150">
<Grid>
<TextBlock Text="♑" HorizontalAlignment="Center" Margin="0,0,0,0" VerticalAlignment="Top" FontFamily="Segoe UI" FontSize="48"/>
</Grid>
</Page>
UWP application screen:
WPF MainWindow.xaml:
<Window x:Class="WpfApp1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApp1"
mc:Ignorable="d"
Title="MainWindow" Height="150" Width="150">
<Grid>
<TextBlock Text="♑" HorizontalAlignment="Center" Margin="0,0,0,0" VerticalAlignment="Top" FontFamily="Segoe UI" FontSize="48"/>
</Grid>
</Window>
WPF application screen:
Is anyone aware of an application setting or any other change that can be done to the WPF application so it will display these types of special characters consistently with other applications?

How to make the WebView2 fit and full the Window (adaptive size effect or full - screen)?

I tried to set HorizontalAlignment="Stretch" & VerticalAlignment="Stretch"
but it was not work.
<Window
x:Class="Y.Shen12DP.PLCT.WebWidow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Y.Shen12DP.PLCT"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:wv2="clr-namespace:Microsoft.Web.WebView2.Wpf;assembly=Microsoft.Web.WebView2.Wpf"
Title="WebWidow"
Width="800"
Height="450"
mc:Ignorable="d">
<Grid>
<wv2:WebView2
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Source="https://www.microsoft.com/" />
</Grid>
</Window>
enter image description here
Could you tell me how to do it (adaptive size effect or full - screen)?
The code you have will ensure the WebView2 fills the WPF Window. To make it full screen you need to make the WPF Window full screen which is described elsewhere on StackOverflow: Full screen in WPF application. Once the WPF Window is full screen the WebView2 should be full screen as well.

Combo box flickering in Window 10 Touch screen

I am using a WPF Combobox in my Wpf application.
Following are my issue scenario:
1.Open combo box using touch
2.Touch on any item from drop down list
3.Combo box drop down list close after a flickering.
This issue is not there in mouse click.
I made AllowsTransparency="True" for windows
System Specification:
1.Windows 10
2.Visual Studio 2017
3.Unchecked "Enable press and hold for right clicking" in Pen and Touch setting
Following is my Xaml.code:
<Window x:Class="WpfApp1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApp1"
mc:Ignorable="d" WindowState="Maximized" WindowStyle="None"
Title="MainWindow" Height="800" Width="800" Background="Transparent" AllowsTransparency="True">
<Grid>
<ComboBox Name="cb" Height="50" Width="50">
<ComboBoxItem>A</ComboBoxItem>
<ComboBoxItem>B</ComboBoxItem>
<ComboBoxItem>C</ComboBoxItem>
<ComboBoxItem>D</ComboBoxItem>
<ComboBoxItem>E</ComboBoxItem>
<ComboBoxItem>F</ComboBoxItem>
<ComboBoxItem>G</ComboBoxItem>
</ComboBox>
</Grid>
</Window>
Please help

Is there any way to disable aero snap feature for particular WPF window?

I would like to use the window without enabling the default feature of aero snapping....i could do this by disabling the aero snap feature from the control panel....but i need to disable it for specific WPF Window alone.
Sure... just make the Window un-resizable (if that is a real word):
<Window x:Class="WpfApplication2.Views.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="300" Width="300" ResizeMode="NoResize">
<Grid>
<!-- Your content here -->
</Grid>
</Window>

opening window animation like Microsoft security essentials

I'm working on a project where I need to display notification popups.
http://youtu.be/fweLIzpW6I0?t=52s
Here you see the way I want the notification to display. Microsoft Security Essentials uses a popup-window which grows. I can't find a way to do it like that.
This is the window:
<Window x:Class="AlertDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Notification"
Height="196" Width="400"
ResizeMode="NoResize"
ShowInTaskbar="False"
Topmost="True"
HorizontalAlignment="Right"
VerticalAlignment="Bottom" SizeToContent="WidthAndHeight" Loaded="Window_Loaded" WindowStyle="ToolWindow">
<Grid Name="contentGrid">
</Grid>
</Window>

Resources