Reputation: 1102
I am using SplitView in a desktop app. It works fine. Now, I want to use it in a phone with Windows 10. I want to avoid the permanent vertical panel because of the small screen of a phone. I would like to hide the this bar, like for example Calendar App of Windows Mobile 10 does.Is it possible? I cannot find the property.
Upvotes: 1
Views: 1121
Reputation: 516
Just created a sample project for others to follow while doing SplitView in both mobile and desktop: https://github.com/nicruo/Splitview-UWP
Upvotes: 0
Reputation: 1074
You can keep a device type enumeration to keep track of the devices,ie wether its a phone or tablet like this
public enum DeviceTypeEnum
{
Phone = 1,
Tablet = 2
}
You can identify whether its a tablet or phone using the following code
var deviceType = ApiInformation.IsTypePresent("Windows.Phone.UI.Input.HardwareButtons") ? DeviceTypeEnum.Phone : DeviceTypeEnum.Tablet;
Now using the devicetype property you can do whatever applicable to phone and tablet.
In your case you could write a enum to visibility converter which be visible if the device type is tablet.
Upvotes: 0