Exemplo n.º 1
0
        public async Task <IButtonEndpoint> CreateDemoButton(string caption)
        {
            IButtonEndpoint result = null;

            await Dispatcher.RunAsync(
                CoreDispatcherPriority.Normal,
                () =>
            {
                var button     = new Button();
                button.Content = caption;

                var endpoint = new UIButtonButtonEndpoint(button);
                endpoint.Connect();

                DemoButtonStackPanel.Children.Add(button);

                result = endpoint;
            });

            return(result);
        }
Exemplo n.º 2
0
        public async Task<IButtonEndpoint> CreateDemoButton(string caption)
        {
            IButtonEndpoint result = null;

            await Dispatcher.RunAsync(
                CoreDispatcherPriority.Normal,
                () =>
                {
                    var button = new Button();
                    button.Content = caption;

                    var endpoint = new UIButtonButtonEndpoint(button);
                    endpoint.Connect();

                    DemoButtonStackPanel.Children.Add(button);

                    result = endpoint;
                });

            return result;
        }