예제 #1
0
        private void Create360Controls(ViewerImage image)
        {
            // Lock-in/lock-out
            var immersionSwitch = new Switch
            {
                IsToggled         = false,
                HorizontalOptions = LayoutOptions.End,
                Margin            = new Thickness(0, -3, 0, 0)
            };

            immersionSwitch.Toggled += IsBlockedSwitchOnToggled;

            // Label
            var immersionSwitchText = new Label
            {
                Text              = (BindingContext as ViewerImage).Toggle360ModeText,
                TextColor         = Color.White,
                HorizontalOptions = LayoutOptions.EndAndExpand,
                FontSize          = 22,
                Margin            = new Thickness(0, 0, 5, 0)
            };

            // Add components to stacklayout
            _stackLayout.Children.Insert(1, new StackLayout
            {
                Orientation = StackOrientation.Horizontal,
                Children    = { immersionSwitchText, immersionSwitch }
            });
        }
예제 #2
0
        private void Create360Controls(ViewerImage image)
        {
            // Lock-in/lock-out
            var isBlockedSwitch = new Switch();

            isBlockedSwitch.IsToggled = false;
            isBlockedSwitch.Toggled  += IsBlockedSwitchOnToggled;

            // Add components to stacklayout
            _stackLayout.Children.Add(isBlockedSwitch);
        }