HandheldCompanion icon indicating copy to clipboard operation
HandheldCompanion copied to clipboard

Fit Windows 11 Style

Open wherewhere opened this issue 3 years ago • 29 comments

Change some margins and add mica. image P.S. The Card UI is so weird. You can use SettingUI instead. (https://github.com/Paving-Base/APK-Installer-Classic/tree/main/APKInstaller/APKInstaller/Controls/Setting)

wherewhere avatar Jun 24 '22 18:06 wherewhere

Thanks for the above. Will give it a try. I'd love to stop using my workaround for broken touch input on my project, aka: all the PreviewMouse calls on MainWindow.cs

Valkirie avatar Jun 24 '22 18:06 Valkirie

Thanks for the above. Will give it a try. I'd love to stop using my workaround for broken touch input on my project, aka: all the PreviewMouse calls on MainWindow.cs

WPF support touch scroll itself. Just need set IsManipulationEnabled=true and PanningMode not None... Does this project have some problem when using native touch scroll?

wherewhere avatar Jun 24 '22 18:06 wherewhere

Thank you for your pull request and insight. Testing!

CasperH2O avatar Jun 24 '22 18:06 CasperH2O

Thank you for the additional translations.

I think this commit completely fixes #59 Sweet! Need to do more testing with an installed version.

About the changes in the various margins across pages and locking the title. As our target screens are usually 800p lot's of screen real estate it now white space (marked orange) and the title keep being visible (marked purple), which is kind of wasteful in my opinion:

image

CasperH2O avatar Jun 24 '22 19:06 CasperH2O

This is the style of winui 2.7. You can change this but also need change the margin of page head. I think this space is acceptable unless you need support Windows 10 Mobile...

wherewhere avatar Jun 24 '22 19:06 wherewhere

Thanks for the above. Will give it a try. I'd love to stop using my workaround for broken touch input on my project, aka: all the PreviewMouse calls on MainWindow.cs

WPF support touch scroll itself. Just need set IsManipulationEnabled=true and PanningMode not None... Does this project have some problem when using native touch scroll?

Yes. I just can't get native touch scroll to work.

Valkirie avatar Jun 24 '22 20:06 Valkirie

Could you make a pure UI version? I don't want install HidHide...

wherewhere avatar Jun 25 '22 01:06 wherewhere

I don't know how to fix it. Mybe you can copy everything to a empty WPF one by one to find out what is broken...

wherewhere avatar Jun 25 '22 06:06 wherewhere

Could you make a pure UI version? I don't want install HidHide...

You can actually ignore the ControllerService project. You don't have to run it for Handheld Companion to start and for it to let you navigate menus.

Valkirie avatar Jun 25 '22 06:06 Valkirie

I don't know why every scrollviewer in your app doesn't support touch. (Maybe you can move to Windows App SDK. That's real WinUI and fully support touch... (And why you add winui2.7 into the WPF???

wherewhere avatar Jun 25 '22 06:06 wherewhere

And why you add winui2.7 into the WPF???

Am I?

Valkirie avatar Jun 25 '22 13:06 Valkirie

Yep Screenshot_20220626-193046.jpg

wherewhere avatar Jun 26 '22 11:06 wherewhere

Yep Screenshot_20220626-193046.jpg

Oups, most likely some of stuff I forgot to remove.

Valkirie avatar Jun 26 '22 12:06 Valkirie

There is a style for separator in SettingExpander.xaml

wherewhere avatar Jun 27 '22 16:06 wherewhere

Interesting, when I use the touch interface now, in the areas where the right hand slider is present, I can observe a small circle/cross. Sliding feels good too.

Will check the style for separator in SettingExpander.xaml

CasperH2O avatar Jul 04 '22 17:07 CasperH2O

When removing all of these:

image

And putting it in:

<Style x:Key="ExpanderSeparatorStyle" TargetType="Rectangle"> <Setter Property="Margin" Value="0" />

Some code can definitely be spared.

Another odd thing I noticed, I checked several commits back is the following:

image

It seems ExponderContent padding, which is defined in SettingExpender.xml as 0 14 0 14 does not apply it at the top and bottom Expander entries?

CasperH2O avatar Jul 04 '22 18:07 CasperH2O

So this pull is outdated? Would I close it?

wherewhere avatar Jul 23 '22 15:07 wherewhere

I need to rebase it.

Valkirie avatar Jul 23 '22 16:07 Valkirie

Why use .netcore? Useing .netfx will be smaller and don't need to install runtime. And some of nugets which this project used is not support .netcore yet.

wherewhere avatar Jul 23 '22 18:07 wherewhere

Hey @wherewhere. I'm not familiar with .netfx at all.

I was able to fix my touch issue. Guilty component was ManagementObjectSearcher (https://github.com/dotnet/runtime/issues/522).

Now that I can get proper touch support, do you have any suggestions on how to get my sliders contained within the scrollviewer to receive touch inputs and slide properly?

Valkirie avatar Aug 25 '22 14:08 Valkirie

It's not much difference between netfx and netcoreapp. You can just change .net6.0 to .net4.8. Because Windows doesn't per-install netcoreapp runtimes. It's very annoying to install them one by one...

wherewhere avatar Aug 25 '22 14:08 wherewhere

Any chance you could help me get my sliders to work when used inside a scrollviewer now that touch inputs are coming through ? https://github.com/Valkirie/ControllerService/pull/233

Valkirie avatar Aug 25 '22 14:08 Valkirie

I have no idea... It seems that the Thumb can't be moved by touch... Maybe you can try to make it move first... (I don't like WPF. Mybe you can just abandon WPF. And move to UWP/WAS...

wherewhere avatar Aug 25 '22 14:08 wherewhere

Sorted it. Now I'm wondering why the below isn't switching the visual backdrop to Acrylic. https://github.com/Valkirie/ControllerService/blob/c1cfc35415498fb48e6e16a7fa3a7f2ab4533280/HandheldCompanion/Views/Pages/SettingsPage.xaml.cs#L341

if (OSVersionHelper.IsWindows11OrGreater) { BackdropType newType; switch (Toggle_Backdrop.IsOn) { case true: newType = BackdropType.Acrylic; break; default: case false: newType = BackdropType.Mica; break; } WindowHelper.SetSystemBackdropType(MainWindow.GetCurrent(), newType); }

Valkirie avatar Aug 31 '22 18:08 Valkirie

This is what I use. https://github.com/Paving-Base/APK-Installer-Classic/blob/main/APKInstaller/APKInstaller/Pages/SettingsPages/TestPage.xaml.cs#L127-L152

wherewhere avatar Sep 01 '22 00:09 wherewhere

This is what I use. https://github.com/Paving-Base/APK-Installer-Classic/blob/main/APKInstaller/APKInstaller/Pages/SettingsPages/TestPage.xaml.cs#L127-L152

Thanks.

When I try to set Backdrop to None, I get this: image

When I try to set Backdrop to Acrylic while the app is running, I get this: image

Code is the following: https://github.com/Valkirie/ControllerService/blob/08f9f11d5147bb3d00826859cf22138b3648759d/HandheldCompanion/Views/Pages/SettingsPage.xaml.cs#L343 Any idea ?

Valkirie avatar Sep 01 '22 05:09 Valkirie

...... You need set background by yourself when the backdrop is none...

wherewhere avatar Sep 01 '22 09:09 wherewhere

Ok thanks. What about the crash when switching to Acrylic ?

Valkirie avatar Sep 01 '22 09:09 Valkirie

Maybe you can add modern wpf source into this project, so that you can directly debug it without guess...

wherewhere avatar Sep 01 '22 09:09 wherewhere