Пример #1
0
        public Playground()
        {
            MeasureStartup();

            this.InitializeComponent();

            Loaded += Playground_Loaded;

            xamlText.TextChanged        += OnTextChanged;
            jsonDataContext.TextChanged += OnDataContextTextChanged;

            content.SizeChanged += (snd, args) =>
            {
                resolution.Text = $"{content.ActualWidth}x{content.ActualHeight}";
            };

            var abc = DynamicAnimation.StoryboardProperty.ToString();

            DynamicAnimation.GetStoryboard(this);
            DynamicAnimation.SetStoryboard(this, null);

            SizeChanged += (snd, e) => RestoreCodePaneSize(e.PreviousSize, e.NewSize);
#if __WASM__
            Uno.Foundation.WebAssemblyRuntime.InvokeJS("Uno.UI.WindowManager.current.setStyle(\"" + splitter.HtmlId + "\", {\"cursor\": \"col-resize\"});");
#endif
            InputPane.GetForCurrentView().Showing += OnInputPaneShowing;
            InputPane.GetForCurrentView().Hiding  += OnInputPaneHiding;;
        }
Пример #2
0
        public Playground()
        {
            MeasureStartup();

            this.InitializeComponent();

            Loaded += Playground_Loaded;

#if MONACO
            xamlText.PropertyChanged += OnPropertyChanged;
            xamlText.Loaded          += OnEditorLoaded;
            xamlText.Loading         += OnEditorLoading;
            xamlText.RequestedTheme   = ElementTheme.Dark;

            xamlText.SizeChanged += (snd, evt) =>
            {
                xamlText.ExecuteJavascript("if(typeof editor !== 'undefined') editor.layout();");
            };
#else
            xamlText.TextChanged += OnTextChanged;
#endif

#if __WASM__
            splitter.SetCssClass("resizeHandle");
#endif

            jsonDataContext.TextChanged += OnDataContextTextChanged;

            content.SizeChanged += (snd, args) =>
            {
                resolution.Text = $"{content.ActualWidth}x{content.ActualHeight}";
            };

            var abc = DynamicAnimation.StoryboardProperty.ToString();
            DynamicAnimation.GetStoryboard(this);
            DynamicAnimation.SetStoryboard(this, null);

            SizeChanged += (snd, e) => RestoreCodePaneSize(e.PreviousSize, e.NewSize);
#if false // __WASM__
            Uno.Foundation.WebAssemblyRuntime.InvokeJS("Uno.UI.WindowManager.current.setStyle(\"" + splitter.HtmlId + "\", {\"cursor\": \"col-resize\"});");
#endif
            InputPane.GetForCurrentView().Showing += OnInputPaneShowing;
            InputPane.GetForCurrentView().Hiding  += OnInputPaneHiding;;
        }