WinRT XamlToolkit日历控件 [英] WinRT XamlToolkit Calendar Control

查看:173
本文介绍了WinRT XamlToolkit日历控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图为我的WinRT通用应用程序实现日历控件。



所以我看着用于PC和电话。



所以我安装这两个包设置它在xaml和im得到这个错误



在那篇文章中,答案(似乎是从控件的创建者)说它已经在1.7.2.0中修复,但它不是,im使用1.7.2.0,并得到相同的错误。 / p>

我尝试用这样的代码创建控件:

  calendar = new WinRTXamlToolkit.Controls.Calendar(); 
calendar.SetValue(Grid.RowProperty,1);
root.Children.Add(calendar);

完全相同的错误。



卸载pc日历仅使用手机版本,如下所示:

  #if WINDOWS_PHONE_APP 
calendar = new WinRTXamlToolkit.Controls.Calendar ();
calendar.SetValue(Grid.RowProperty,1);
root.Children.Add(calendar);
#endif

完全相同的错误。


$ b b

现在我完全失去了,这是一个异常:

 类型为System的第一次机会异常。 IO.FileNotFoundException'发生在WinRTXamlToolkit.Controls.Calendar.DLL 

如何解决这个错误,



提前感谢。

解决方案

对不起,你是对的。似乎有一个错误 - 手机版本的日历dll有一个不必要的参考的核心WinRTXamlToolkit库的手机,没有配置为NuGet包中的依赖。现在的解决方案是还为您的手机项目添加基本工具包dll包:WinRT XAML Toolkit for Windows Phone 8.1。我将在下一个版本中删除不必要的引用(很快)。


im trying to implement a calendar control for my WinRT universal app.

So i looked to this for PC and this for Phone.

So i installed both packages set it in xaml and im getting exactly this error

In that post, the answer (that seems to be from the creator of the control) says that it has been fixed in 1.7.2.0, but it is not, im using 1.7.2.0 and getting the same error.

I have the tried to create the control at code like this:

    calendar = new WinRTXamlToolkit.Controls.Calendar();
    calendar.SetValue(Grid.RowProperty, 1);
    root.Children.Add(calendar);

Exactly same error.

Then i uninstall pc calendar to use only phone version like this:

        #if WINDOWS_PHONE_APP
        calendar = new WinRTXamlToolkit.Controls.Calendar();
        calendar.SetValue(Grid.RowProperty, 1);
        root.Children.Add(calendar);
        #endif  

Exactly same error.

So now im totally lost, this is the exception im getting:

A first chance exception of type 'System.IO.FileNotFoundException' occurred in WinRTXamlToolkit.Controls.Calendar.DLL

How can i solve that error and implement calendar in both PC and Phone versions or, at least, only the Phone version.

Thanks in advance.

解决方案

Sorry, you are right. It seems like there is a bug - the phone version of the calendar dll has an unnecessary reference to the core WinRTXamlToolkit library for the phone which is not configured as a dependency in the NuGet package. For now the solution is to also add the base toolkit dll package for your phone project: "WinRT XAML Toolkit for Windows Phone 8.1". I will remove the unnecessary reference in the next release (soon).

这篇关于WinRT XamlToolkit日历控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆