GET Typical fixes after updating Windows Store apps from version 8 to 8.1 / Sudo Null IT News FREE
Translating my applications to platform 8.1, I found that this is a fairly elliptic chore that does not require much effort.
After the translation, typical warnings often arise as a consequence of platform mismatch. Naturally, information technology is advisable to correct these warnings.
Consider the most popular fixes?
When updating, be sure to make a copy of the project directory. First, you will always have a backup, and secondly, you can have versions for Windows 8 and Windows 8.1 in the Fund at the same time.
1. The warning "Windows.ApplicationModel.DataTransfer.DataPackage.SetUri (System.Uri)" is deprecated: "SetUri may be neutered or unprocurable for releases after Windows 8.1. Alternatively, utilisation SetWebLink OR SetApplicationLink. "
The simplest and most easily punished warning. In version 8.1, setUri was introduced to various SetWebLink and SetApplicationLink methods. If you suffer a tie-in to a website, then simply replace setUri with SetWebLink
2. The warning "Windows.UI.Notifications.TileTemplateType.TileWideText04" is deprecated: "TileWideText04 whitethorn be altered OR unavailable for releases later on Windows 8.1. Instead, use TileWide310x150Text04. "
Again, just replace TileWideText04 with TileWide310x150Text04 or with a roofing tile template of any another sized.
3. The word of advice "Windows.UI.Xaml.Controls.ScrollViewer.ScrollToVerticalOffset (double)" is deprecated: "ScrollToVerticalOffset whitethorn be altered or unavailable for releases after Windows 8.1. Instead, use ChangeView. "
Means that ScrollToVerticalOffset is now an obsolete method acting. Replace encipher like the tailing
scrollV.ScrollToHorizontalOffset(100); // здесь scrollV это имя элемента ScrollViewer scrollV.ScrollToVerticalOffset(0);
happening the
scrollV.ChangeView(100, 0, 1);
4. The warning "Windows.UI.ViewManagement.ApplicationView.Value" is deprecated: "Value Crataegus laevigata be altered Oregon inaccessible for releases later Windows 8.1. Instead, query for windowpane layout sizes directly. "
This is the nearly popular, well-nig frequently occurring exemplary.
ApplicationView physical object is deprecated. In Windows 8.1, 50/50 modal value is also added to snap mode. This provides more options for handling coating states, but it also forces United States of America to bind to the width of the sort, sooner than to the name of a particular state.
In C # we do IT like this:
Record the Window.Current.SizeChanged + = Window_SizeChanged event;
Then in the code of the event manager, dependent on the sieve size of the device, we start the necessary processing:
esoteric void Window_SizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e) { if (e.Size.Width <= 1000){ // здесь обрабатываем экран такого размера } else if (e.Size up.Width <= 500){ // и здесь обрабатываем экран такого размера } other{} // получаем значение текущего расположения ориентации экрана ApplicationViewOrientation winOrientation = ApplicationView.GetForCurrentView().Orientation; if (winOrientation == ApplicationViewOrientation.Landscape painting) { // альбомная ориентация } else if (winOrientation == ApplicationViewOrientation.Portrait) { // портретная ориентация } }
Every bit you can see in the model, the Layout of the concealment lavatory still be determined not by aspect ratio, but by figure. It is possible that in the near future the predilection of the gimmick can be determined only by the ratio of width to height. If the width is greater, and so it is landscape, and if less, so portrait. We'll have it off in a similar JavaScript example (the example from the official guideline already refused to work for me):
// регистрируем событие resize window.addEventListener("resize", function (e) { var windowWidth = document.documentElement.offsetWidth; // получаем ширину окна var windowHeight = document.documentElement.offsetHeight; // получаем высоту окна if (windowWidth <= 500) { // обрабатываем как нам нужно это состояние }else{} // определяем, что устройство находится в портретной ориентации, если ширина меньше высоты if (windowWidth>windowHeight) { // альбомная ориентация } else { // портретная ориентация } });
A dainty advantageous in HTML5 applications was and is the ability to set styles for various positions and screen sizes. In 8.1, these media styles were slightly denaturized from styles indicating the state of the application to styles indicating the width in pixels.
That is, styles such equally:
@media (-Mississippi-reckon-state: snapped)
or
@media (-ms-view-province: filled)
were replaced by classic:
@media (min-width: 500px) and (max-width: 1023px)
or
@media (min-width: 1024px)
There are also changes in orientation styles. Instantly they look equal this:
@media (orientation: landscape painting) { /* CSS стили для альбомной ориентации */ } @media (orientation: portrait) { /* CSS стили для портретной ориентации */ }
For those who found information technology only too unproblematic, I'll sacrifice you combined more rare error that occurs when updating an application created in the developer preview translation (it does not threaten most developers).
After updating, the project refused to open, giving the pursuing error:
D: \ TesT \ TesT.csproj: error: strange project "C: \ Political program Files \ MSBuild \ Microsoft \ WindowsXaml \ v11.0 \ Microsoft.Windows.UI.Xaml.CSharp. targets "not found. Check the way in the Import declaration and the presence of the file on disk. D: \ TesT \ TesT.csproj
Open the project file and find a similar line in it:
Replace v $ (VisualStudioVersion) with the version of our studio used. In my case, this is the version of Visual Studio 2013, which substance I am replacing it with v12.0
Summary:
Updating the practical application is not only possible, but also easy. Go for it!
If you manage to do this this year, and so you testament have the chance to participate in the competition and at the unvaried fourth dimension promote your application.
Other pretty nice bun from updating the application wish be many carrying into action improvements in 8.1 There
are a good deal of changes. He cited exclusively the most popular errors that he himself encountered. I pronto read about other errors / warnings in the comments.
Authorized Guides and Changelog:
Changes to the Windows 8.1 API (Hypertext mark-up language)
Changes to the Windows 8.1 API (XAML)
DOWNLOAD HERE
GET Typical fixes after updating Windows Store apps from version 8 to 8.1 / Sudo Null IT News FREE
Posted by: brownagen1949.blogspot.com
0 Response to "GET Typical fixes after updating Windows Store apps from version 8 to 8.1 / Sudo Null IT News FREE"
Post a Comment