Exemple #1
0
        private void FileSelectButton_Click(object sender, RoutedEventArgs e)
        {
            FileDialog dialog = new OpenFileDialog()
            {
                Filter = GetImageFileFilter()
            };
            bool?result = dialog.ShowDialog();

            if (result ?? false)
            {
                SkinProperty prop = (SkinProperty)(sender as FrameworkElement).Tag;
                prop.Value = dialog.FileName;
            }
        }
Exemple #2
0
        public void SetValue <T>(string name, T value)
        {
            var prop = _properties.FirstOrDefault(x => x.Name == name && x is SkinProperty <T>) as SkinProperty <T>;

            if (prop != null)
            {
                prop.Value = value;
            }
            else
            {
                prop = new SkinProperty <T>(name, value);
                _properties.Add(prop);
            }
        }
Exemple #3
0
        private void FileClearButton_Click(object sender, RoutedEventArgs e)
        {
            SkinProperty prop = (SkinProperty)(sender as FrameworkElement).Tag;

            prop.Value = null;
        }