ホーム > CS
C#
.NET
XamlUtil
public class XamlUtil { public static void Writer(string fileName, object obj) { using (var stream = System.IO.File.Open(fileName, System.IO.FileMode.Create)) { System.Windows.Markup.XamlWriter.Save(obj, stream); } } public static object Loader(string fileName) { object obj = null; using (var stream = System.IO.File.Open(fileName, System.IO.FileMode.Open)) { obj = System.Windows.Markup.XamlReader.Load(stream); } return obj; } }
WPF
Tips:コントロールを強制的に更新させる。
this.TextBlock.Text = "文字列"; this.TextBlock.Dispatcher.Invoke(DispatcherPriority.Background, new Action(() => { }));
このページのURL: