这是最后几个警告的图片,我无法修复并且找不到任何信息。
所有警告都指向同一个方法,并且它说它已经过时了,我该怎么做才能得到未过时的代码?
以下是代码:
warning number 2.
/// <summary> /// Translates <see cref="ApplicationViewState" /> values into strings for visual state /// management within the page. The default implementation uses the names of enum values. /// Subclasses may override this method to control the mapping scheme used. /// </summary> /// <param name="viewState">View state for which a visual state is desired.</param> /// <returns>Visual state name used to drive the /// <see cref="VisualStateManager" /></returns> /// <seealso cref="InvalidateVisualState" /> protected virtual string DetermineVisualState(ApplicationViewState viewState) { return viewState.ToString(); }
Warning number 1.
// Set the initial visual state of the control VisualStateManager.GoToState(control, DetermineVisualState(ApplicationView.Value), false);
Warning number 3.
string visualState = DetermineVisualState(ApplicationView.Value);
注意:这是LayoutAwarePage,所以我在这里没有编写任何代码,这是Windows 8.0实现。
感谢您的帮助和支持!