Beispiel #1
0
        private View CreateControl(ScenarioInfo scenario)
        {
            var control = SwitchesCreator.CreateScenarioControl(scenario);

            control.VerticalOptions   = LayoutOptions.Start;
            control.HorizontalOptions = LayoutOptions.Start;
            control.WidthRequest      = ElementWidth;
            control.HeightRequest     = ElementHeight;
            control.Margin            = CreateControlMargin(scenario.VisualSettings);
            return(control);
        }
Beispiel #2
0
        private FrameworkElement CreateControl(ScenarioBase scenario)
        {
            var control = SwitchesCreator.CreateScenarioControl(scenario);

            control.MouseLeftButtonDown += ElementClick;
            control.MouseLeftButtonUp   += ElementMouseRelease;
            control.VerticalAlignment    = VerticalAlignment.Top;
            control.HorizontalAlignment  = HorizontalAlignment.Left;
            control.Width  = ElementWidth;
            control.Height = ElementHeight;
            control.Margin = CreateControlMargin(GetVisualSettings(control));
            return(control);
        }