相关疑难解决方法(0)

(object)是一个'field'但是像'type'一样使用

我的intellisense给了我错误:'ClassLibrary1.GetTimeZone.myWorldTime'是一个'字段'但是像'类型'一样使用

知道我做错了什么吗?

我的代码

!类1的对象浏览器 我的代码

c# asp.net

6
推荐指数
2
解决办法
4万
查看次数

如何为 WPF 设置 DatePicker 可选范围?

我在论坛和 msdn 上到处搜索,它说 SelectedDate、DisplayStartDate、DisplayEndDate,无论是在 XAML 还是 C# 中都可以使其工作,但是每次我尝试使用任何这些时,我都会丢失指令引用或程序集。我该如何解决?我知道我缺少一个参考,但是使用 System 或 xlmns ....?请告诉我如何使其工作,以便在我尝试使用该属性时不会出错。

XAML 代码和参考:

x:Class="Data_Query.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="Portrait" Orientation="Portrait"
shell:SystemTray.IsVisible="True">

<toolkit:DatePicker HorizontalAlignment="Left" VerticalAlignment="Top" x:Name="dateOfBirthPicker" ValueChanged="dateOfBirthPicker_ValueChanged" Margin="0,369,0,0"/>
Run Code Online (Sandbox Code Playgroud)

C# 代码参考:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using System.Windows.Media; // added to support SolidColorBrush, FontWeights, etc...
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using Data_Query.Resources;
using System.Windows.Input;
using System.Windows.Media.Animation;
using System.Text.RegularExpressions;
Run Code Online (Sandbox Code Playgroud)

完整的 XAML 代码:

<!--LayoutRoot is …
Run Code Online (Sandbox Code Playgroud)

c# wpf xaml datetimepicker visual-studio-2013

1
推荐指数
1
解决办法
8890
查看次数

标签 统计

c# ×2

asp.net ×1

datetimepicker ×1

visual-studio-2013 ×1

wpf ×1

xaml ×1