0

私は次のコードを使用しています:

http://www.codeproject.com/Articles/15926/Save-and-Restore-the-Location-Position-and-State-o

XAML ウィンドウの場所を永続化します。

#region WindowApplicationSettings Helper Class
public class WindowApplicationSettings : ApplicationSettingsBase
{
    private WindowSettings windowSettings;

    public WindowApplicationSettings(WindowSettings windowSettings)
        : base(windowSettings.window.PersistId.ToString())
    {
        this.windowSettings = windowSettings;
    }

残念ながら、このコードは、Microsoft が廃止した Window.PersistId を使用しています。

「PersistId は廃止されたプロパティであり、将来のリリースで削除される可能性があります。このプロパティの値は定義されていません。」

このプロパティを置き換える最良の方法は何ですか?

4

1 に答える 1

0

I don't know which property should be used instead of PersistId. I found this solution though for persisting the window settings. I didn't try it myself though.

http://www.thomaslevesque.com/2008/11/18/wpf-binding-to-application-settings-using-a-markup-extension/

于 2013-04-15T10:55:12.423 に答える