0
在我的應用程序上,我有一個按鈕用於保存在我的代碼上指定的特定uri上保存xlm文件。但我想給用戶在他想要的地方保存這個文件的可能性。在用戶本地機器上下載並保存xml文件
page.xaml
page.cs
private void Bt_Export_Click(object sender, RoutedEventArgs e)
{
CIRCUIT _selectedCircuit = (CIRCUIT)Lb_Circuits.SelectedItem;
busyIndicator.IsBusy = true;
this.DBContext.SaveXmlFile(_selectedCircuit.CIR_CIRCUIT, _action =>
{
if (!_action.HasError)
{
}
busyIndicator.IsBusy = false;
}, null);
}
//
public void SaveXmlFile(string XMlString)
{
XmlDocument XmlCircuit = new XmlDocument();
XmlCircuit.LoadXml(XMlString);
XmlCircuit.Save("C:/Users/izdoudou/Ciruit" + DateTime.Now.Date.ToString("yyMMddHHmm") + ".xml");
string ts= XmlCircuit.BaseURI;
}
你能告訴我,如果有可能整合這functionnality使用Silverlight,我該怎麼辦呢?
親切的問候,