TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Yoko Yoko
NA
12
4.2k
Filename is empty in SaveDialogue
May 19 2015 4:12 AM
I am trying to save a xml file generated in the code using Savedialogue.
I have given the following code in my click button command.
var saveDialog = new Microsoft.Win32.SaveFileDialog()
{
Filter = "Loan Parameters(*.xml)|"
};
if (saveDialog.ShowDialog() == false)
{
return;
}
// XML Serialization and Binary Encoding
byte[] buffer = LoanDataHelper.SerializeModel(loanParameterValueConfig);
if (buffer != null)
{
LoanDataHelper.WriteStreamToFile(buffer, saveDialog.FileName, LoanDataHelper.FileFormat.Normal);
}
I am using mvvm model .On running I am getting exception as filename is not getting the value that I am passing in the savedialogue window.It is always empty string.
I could not figure out what i am missing here.
Please help.
Thanks in advance
Reply
Answers (
3
)
WPF-Radio button and checkbox validation using if statements
[WPF] Grid: set height * of row from Code Behind