【发布时间】:2013-09-17 13:25:37
【问题描述】:
我试图通过插入日历标签在 WPF 应用程序中插入日历,但出现此错误?
找不到类型“日历”。确认您没有丢失程序集引用并且所有引用的程序集都已构建 这是代码:-
<Window x:Class="HomeExpenseCalculator.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="395.516" Width="445.511">
<Grid>
<Label Height="25" Name="label1" VerticalAlignment="Top" HorizontalAlignment="Left" Width="88" FontSize="14" Margin="14,15,0,0" Background="White">Person</Label>
<ComboBox Height="23" Margin="159.984,15,95.546,0" Name="comboBox1" VerticalAlignment="Top">
<ComboBoxItem>Pankaj</ComboBoxItem>
<ComboBoxItem>Shad</ComboBoxItem>
<ComboBoxItem>Kartik</ComboBoxItem>
<ComboBoxItem>Abhinav</ComboBoxItem>
<ComboBoxItem>Rahul</ComboBoxItem>
</ComboBox>
<Label Height="28" Margin="3,63.327,0,0" Name="label2" VerticalAlignment="Top" HorizontalAlignment="Left" Width="99" FontSize="12" Background="White">Stuff Purchased</Label>
<TextBox Height="63" Margin="111,48,38,0" Name="textBox1" VerticalAlignment="Top" />
<Calendar> </Calendar>
</Grid>
</Window>
【问题讨论】:
-
向我们展示代码:)(您是否尝试过使用大写“C”的日历?)
-
我已经添加了上面的代码
-
您的目标是哪个版本的 .NET Framework?
-
它是 3.5 版(VS 2008)
-
那么您就不能使用 Calendar 和 DatePicker - 它们已包含在 .NET 4 的 WPF 中。
标签: c# .net wpf wpf-controls