【概要】

各ウインドウを表示位置やドッキング状態は保存・読み込みが可能なので、ユーザーごとのパーソナライズ機能として利用することができます

【該当するコンポーネント】

UltraWinDockManager

【該当するバージョン】

全てのバージョン 

【記事の種類】

How-to 

【詳細】

実行時にドッキング設定を保存するコードは以下になります。 

(C#)

System.IO.FileStream file = new System.IO.FileStream("ultradocksettings.xml", System.IO.FileMode.OpenOrCreate);
UltraDockManager1.SaveAsXML(file);
file.Close();

(VB)

        Dim file As New System.IO.FileStream("ultradocksettings.xml", IO.FileMode.OpenOrCreate)
        UltraDockManager1.SaveAsXML(file)
        file.Close()

保存した設定を読み込むためには、以下のコードを利用します。

(C#)

System.IO.FileStream file = new System.IO.FileStream("ultradocksettings.xml", System.IO.FileMode.Open);
UltraDockManager1.LoadFromXML(file);
file.Close();

(VB)

        Dim file As New System.IO.FileStream("ultradocksettings.xml", IO.FileMode.Open)
        UltraDockManager1.LoadFromXML(file)
        file.Close()

製品について

Ultimate UI for Windows Forms