Exemplo n.º 1
0
        public LayerItem(Layer item)
        {
            InitializeComponent();
            Item                = item;
            Height              = 100;
            VerticalAlignment   = VerticalAlignment.Top;
            HorizontalAlignment = HorizontalAlignment.Stretch;
            PropertyInfo prop = item.GetType().GetProperty("Name");

            LayerName.Set(prop, item, false, false);
            ToggleVisibilityIcon.Color = Item.Visible ? (Color)Application.Current.Resources["ColorTextLight"] : (Color)Application.Current.Resources["ColorTextDisabled"];
            if (Item.Mask != null)
            {
                MaskRemoveButton.Visibility = Visibility.Visible;
            }
            else
            {
                MaskRemoveButton.Visibility = Visibility.Collapsed;
            }
        }