public void Reload() { foreach (var Item in this.icFileUploadElements.Items) { FileUploadElement fileUploadElement = WpfUIUtilities.FindVisualChild <FileUploadElement>(Item as DependencyObject); if (fileUploadElement == null) { fileUploadElement = WpfUIUtilities.FindLogicalChild <FileUploadElement>(Item as DependencyObject); } fileUploadElement.Reload(); } }
//This method is called when format was changed //and sets the format on each of the file upload elements private void LstFormats_SelectionChanged(object sender, SelectionChangedEventArgs e) { foreach (var Item in this.icFileUploadElements.Items) { FileUploadElement fileUploadElement = WpfUIUtilities.FindVisualChild <FileUploadElement>(Item as DependencyObject); if (fileUploadElement == null) { fileUploadElement = WpfUIUtilities.FindLogicalChild <FileUploadElement>(Item as DependencyObject); } string filter = lstFormats.SelectedValue as string; fileUploadElement.Filter = filter; } }
private void SetControlsToFormat() { foreach (var Item in this.icFileUploadElements.Items) { FileUploadElement fileUploadElement = WpfUIUtilities.FindVisualChild <FileUploadElement>(Item as DependencyObject); if (fileUploadElement == null) { fileUploadElement = WpfUIUtilities.FindLogicalChild <FileUploadElement>(Item as DependencyObject); } string filter = Format; fileUploadElement.Filter = filter; } }