Ejemplo n.º 1
0
        private void OnClick(object sender, RoutedEventArgs e)
        {
            OpenFileDialog dialog = new OpenFileDialog
            {
                Filter      = Filter,
                Multiselect = false
            };

            if (dialog.ShowDialog() != true || !File.Exists(dialog.FileName))
            {
                return;
            }
            TextContent.Text = dialog.FileName;
            TextContent.GetBindingExpression(TextBox.TextProperty)?.UpdateSource();
        }