c# - Change the default message in the Security warning prompt when adding the DefaultFileName property of SaveFileDialog in Silverlight5 -


i using silverlight5 , need save file application. when user clicks save button, should open savefiledialog default name. using following code:

private void button_click(object sender, routedeventargs e)     {         savefiledialog dialog = new savefiledialog         {             defaultext = "xls",             filter =                 string.format("{1} files (*.{0})|*.{0}|all files (*.*)|*.*", "xls", "excel"                               ),             filterindex = 1,             defaultfilename = "test",           };         dialog.showdialog();     } 

but problem is, when adding defaultfilename property savefiledialog, show automatically confirmation message window. need customize message in messagebox shown when open savefiledialog.

hope of may come across problem, please guide me overcome one.

please find image below

enter image description here

you can't. message generated plugin native implementation, if want override message; you'd need create own silverlight plugin :)

proof (from reflection of system.windows.dll)

// system.windows.controls.savefiledialog private bool? showdialoginternal(window owner) {     ...     // call native plugin api show save dialog     num = xcpimports.ui_getsavefilename(nativehost.current.runtimehost, ref this.m_dlginfo, out dialogresult);     if (nativemethods.succeeded(num) && this.m_dlginfo.lpstrfile != intptr.zero && dialogresult == dialogresult.ok)     {       // if went ok, have handle saved file       ...     }     ... } 

that being said - dialog can shut off if configure browser trust app. check out connect issue questioning validity of dialog:

https://connect.microsoft.com/visualstudio/feedback/details/690502/savefiledialog-security-warning


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -