WPF的窗口属设置为llowsTransparency="True", WindowsFormsHost不能显示的问题(如能解决,高分赠送)
最近在用WPF做窗口,碰到一个问题,如果我将窗口设置为透明和没有标题栏.运行后,那个时间控件也显示透明,在网上搜索了下,虽然有这个问题的存在,但是都没有说出解决的方法,请各位支招如果解决,谢谢....顺便说下,操作系统为Windows 2003
<Window
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" mc:Ignorable="d"
x:Class="NotifyServerConfig.Window1"
xmlns:winForm="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
x:Name="Window"
Title="Window1"
Width="800" Height="600" AllowsTransparency="True" Icon="mobile.ico" WindowStartupLocation="CenterScreen" WindowStyle="None">
<Grid>
<WindowsFormsHost HorizontalAlignment="Left" Name="WindowsFormsHost1">
<winForm:DateTimePicker Width="100" Height="25" Format="Time" ShowUpDown="True" x:Name="dateTimerFrom"/>
</WindowsFormsHost>
<Label Margin="5,0,5,0">到</Label>
<WindowsFormsHost HorizontalAlignment="Right">
<winForm:DateTimePicker Width="100" Height="25" Format="Time" ShowUpDown="True" x:Name="dateTimerTo" />
</WindowsFormsHost>
</Grid>
</Window>