Exemple #1
0
        private void LayerCheckBox_Click(object sender, RoutedEventArgs e)
        {
            if (OnLayerCheckBoxClick != null)
            {
                CheckBox tickedCheckBox = sender as CheckBox;

                LayerItem item = new LayerItem();
                if (tickedCheckBox.Content != null)
                    item.Name = tickedCheckBox.Content.ToString();
                item.Visibility = (bool)tickedCheckBox.IsChecked;
                item.LayerObject = tickedCheckBox.Tag;

                LayerCheckBoxClickArgs args = new LayerCheckBoxClickArgs();
                args.Item = item;

                OnLayerCheckBoxClick(this, args);
            }
        }
        private void LayerCheckBox_Click(object sender, RoutedEventArgs e)
        {
            if (OnLayerCheckBoxClick != null)
            {
                CheckBox tickedCheckBox = sender as CheckBox;

                LayerItem item = new LayerItem();
                if (tickedCheckBox.Content != null)
                {
                    item.Name = tickedCheckBox.Content.ToString();
                }
                item.Visibility  = (bool)tickedCheckBox.IsChecked;
                item.LayerObject = tickedCheckBox.Tag;

                LayerCheckBoxClickArgs args = new LayerCheckBoxClickArgs();
                args.Item = item;

                OnLayerCheckBoxClick(this, args);
            }
        }