Inheritance: IBinaryStateEndpoint
Ejemplo n.º 1
0
        public async Task<IBinaryStateEndpoint> CreateDemoBinaryComponent(string caption)
        {
            IBinaryStateEndpoint result = null;

            await Dispatcher.RunAsync(
                CoreDispatcherPriority.Normal,
                () =>
                {
                    var checkBox = new CheckBox();
                    checkBox.IsEnabled = false;
                    checkBox.Content = caption;

                    var endpoint = new CheckBoxBinaryStateEndpoint(checkBox);

                    DemoLampsStackPanel.Children.Add(checkBox);

                    result = endpoint;
                });

            return result;
        }
Ejemplo n.º 2
0
        public async Task <IBinaryStateEndpoint> CreateDemoBinaryComponent(string caption)
        {
            IBinaryStateEndpoint result = null;

            await Dispatcher.RunAsync(
                CoreDispatcherPriority.Normal,
                () =>
            {
                var checkBox       = new CheckBox();
                checkBox.IsEnabled = false;
                checkBox.Content   = caption;

                var endpoint = new CheckBoxBinaryStateEndpoint(checkBox);

                DemoLampsStackPanel.Children.Add(checkBox);

                result = endpoint;
            });

            return(result);
        }