Entries in ‘UWP’

The bottle neck of porting Weather Tpying (WPF) to UWP is native C++ DLL. It is not difficult to port C++ code to C# but it will be convenient if I can use native code, it will be good.

At first, I tried making native DLL and called it from UWP by P/Invoke, it succeeded. It worked in Windows IoT, too. It seems that without prohibited API, it works.

After that, I tried building it as Windows Store app and validated with Windows App Certification Kit (WACK). Then I got “vccorlib140.dll is not supported for this application type” and Windows Security Features Test failed. In the error, memset and memcpy, that seems no problem to use, were shown. It
seems that the native DLL is linking desktop app library.

I found “Consume Windows Runtime Extension” in Native DLL project property. I enabled it seeing “Using C++/CX in Desktop apps” but it doesn’t change.

At last, I found official help “How to: Use Existing C++ Code in a Universal Windows Platform App” and changed project file directly and changed pre-complie header name addition to C++/CX settings above. After that, WACK succeeded.

When I saw the generated DLL by Dependancy Walker, it linked to “VCRUNTIME140_APP.DLL” and “MSVCP140_APP.DLL” instead of “VCRUNTIME140.DLL” and “MSVCP140.DLL. ” APP-DLL may be for UWP.

I was creating official package of Analog Book Reader for Windows store, but I struggled a lot.

At first, I couldn’t build the app because my store certificate was expired. I created new test certificate but Package Family Name was changed so it seems new product. At last I found the Package Family Name restored when I associate the app to Store again.

Next. I tried to test version up from previous version but the certificate was expired so I can’t install previous version. I back-dated the system time and I was able to install it.

Next. English UI is showed in Japanese OS. This is an issue from V1.7. V1.7 is a UWP app so it supports only Windows 10. Japanese people hate Windows 10 so it was no problem I think. I don’t know the real cause. If I have _language-ja.appx in the package, it is good. But sometimes I don’t have that file in package. I should test Japanese OS before release from next version. I don’t know whether I should support Japanese which has low download count.

So far, I submitted Analog Book Reader V1.8 to store so it will be released soon.

What I thought I should have read before releasing UWP app was UWP UX guideline(PDF version) and finished reading, There are not so many new topic but icons and Segoe MDL 2 were useful information.

Not related to guideline but I read the crash count is one of the KPI of Windows Store somewhere so I fixed bugs in long term holidays. I don’t know 600 crashes in one month is too much but I fixed almost all of them and most of the crashes are caused by operation during loading. Will it improve the ranking of the store?

I’m working on Analog Book Reader UWP version and I wanted to try Windows 10 Mobile. So I got Freetel Katana 02. I set it to developer mode and connected to PC by USB. Then I launched my app with Visual Studio… and it worked. Excellent. But UI is not good so I can’t support mobile in next release.

2016042901

I used Katana a little and realized it is better than I thought. I can use Outlook so Docomo mail might work, I can use services in Edge. GPS is not good as my Android so I can’t use as main smartphone yet.

Porting Analog Book Reader to UWP has finished. I will test it in next week and upload it.

I had some homework in previous blog. About GridView selection, I will support right click selection. About version dialog, I used Popup as in UI basic Sample of UWP sample.

I have to improve something other than supporting UWP so I improve the image quality which I have been wanted to fix. In current version, the image is zoomed by canvas feature so the quality was low. If I could re-size canvas, the quality will be higher but as Winrrt doesn’t support LayoutTransform, it was difficult. It is the same in UWP, but some people port Silverlight toolkit LayoutTransformer class to UWP so I did the same thing. The image quality will be much better next version.

As I finished to develop Weather Typing 3 update, I started to port Analog Book Reader to Universal Windows Platform. Creating UWP project and adding existing source was easy but it runs incorrectly in following ways.

  • Back button doesn’t work
  • Incorrect dialog layout
  • Mouse doesn’t fire Semantic Zoom
  • ScrollViewer doesn’t zoom with mouse
  • In GridView, items can’t selected with right click
  • Can’t drag and drop anything
  • No charm

Back button. It is changed to be attached to title bar. Windows 10 application surely does so.

var view = SystemNavigationManager.GetForCurrentView();
view.AppViewBackButtonVisibility = AppViewBackButtonVisibility.Visible;
view.BackRequested += OnBackRequested;

Layout. I have to fix it one by one.


Semantic zoom. MS sample also don’t zoom with mouse, Windows standard clock doesn’t have semantic zoom. Will it be abandoned?

Added: I found that the following code enables Semantic Zoom. It is as same as ScrollViewer, I need to set ZoomMode to use wheel zoom.



ScrollViewer zoom. After setting ScrollViewer.ZoomMode, I was able to zoom items. The property was there in Windows 8. Is the default value changed?


GridView selection with right click. It is the most important change. In Windows 8.1, right click was for selection and left click was for open. But Windows 10 enables only one of them.

Really? So I tried Windows 10 Start Menu and found that the menu can’t select multiply. I have to drag menus one by one to move them all. Is it fixed spec? Swipe selection is also seem to be removed from tablet.


Drag and drop. I have to set DragEventArgs.AcceptedOperation which was added from Windows 10 in DragOver. And following code enables file drag and drop.

if (e.DataView.Contains(StandardDataFormats.StorageItems))
{
    var storage = await e.DataView.GetStorageItemsAsync();
}

That is the reason I wanted to port the app to UWP.


Charm. What is the correct design? Where can I show version information? I’m investigating.