Inheritance: IBinaryStateEndpoint
        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;
        }
Esempio 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);
        }