簡體   English   中英

WP8 - RateMyApp“插件”異常

[英]WP8 - RateMyApp “addon” exception

我找到了諾基亞的這個好插件, https://github.com/nokia-developer/rate-my-app

我按照他們的指南在我的應用程序中實現它,可以在這里下載https://github.com/nokia-developer/rate-my-app/blob/master/Doc/RateMyAppGuide.pdf?raw=true

順便說一下,在那個指南中沒有什么困難,我只需要在我的項目中安裝一個插件並添加兩行代碼,

xmlns:rma="clr-namespace:RateMyApp.Controls;assembly=RateMyApp"

<rma:FeedbackOverlay x:Name="FeedbackOverlay" Grid.RowSpan="2" FeedbackTo="me@test.com" ApplicationName="MyApp" CompanyName="MyCompany"/>

我實際上做了一切都沒有遇到任何問題。 當我嘗試編輯rma:FeedbackOverlay對象的XAML代碼時,“GUI”窗口(XAML項目附近的窗口)拋出此異常:

InvalidOperationException: The property "FeedbackOverlay.Message" does not expose a get method.
InnerException: None
(there is also a StackTrace that I am not able to read, but I can provide it if anyone can read that for me)

我嘗試在我的設備上部署應用程序,它實際運行正常,使擴展工作正常。 然而,我擔心這個例外。 我有理由嗎? 我怎么解決這個問題? 提前致謝!

(是的,我嘗試重新啟動電腦,重新啟動IDE,沒有任何效果)

我檢查了這個插件的代碼。 如果您在那里打開FeedbackOverlay.xaml.cs,您會發現Message屬性缺少get訪問器:

public string Message
{
   // get { //something } - is not here
   set
   {
      // some code
   }
}

但在這種情況下(因為此屬性僅用於定義消息 - 不能獲取它),因此不需要get訪問器。 因此,您獲得的異常可能僅來自Visual Studio,並且如果您嘗試獲取Message的值,則會通知可能存在問題。
因此,除非您嘗試獲取Message的值 - 例如:

string myMessage = FeedbackOverlay.Message;

應該沒有問題(VS也應該在上面標記這個代碼)。 如果您嘗試在xaml中獲取此值(例如使用Binding),也可能會出現問題。

我還認為,如果您已經通知開發人員(您可能很容易在Github或項目中的某個地方找到他的電子郵件),那么您會遇到這樣的問題。

希望這可以幫助。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM