'宣言 Public Overloads Sub LoadFromXml( _ ByVal stream As Stream, _ ByVal categories As CalendarLookCategories _ )
public void LoadFromXml( Stream stream, CalendarLookCategories categories )
ストリームが他の情報を含むことができるため、ストリームはUltraCalendarLook情報の先頭に配置する必要があります。
Imports System.Diagnostics Imports Infragistics.Win Imports Infragistics.Win.UltraWinSchedule Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click Try Dim stream As New FileStream("C:\\Layout.xml", FileMode.Open) If (Not stream Is Nothing) Then stream.Seek(0, SeekOrigin.Begin) Me.UltraCalendarLook1.LoadFromXml(stream, CalendarLookCategories.All) stream.Close() End If Catch Debug.WriteLine("Error encountered while loading stream!") End Try End Sub
using System.Diagnostics; using Infragistics.Win; using Infragistics.Win.UltraWinSchedule; private void button9_Click(object sender, System.EventArgs e) { try { FileStream stream = new FileStream("C:\\Layout.xml", FileMode.Open); if (stream != null) { stream.Seek(0, SeekOrigin.Begin); this.ultraCalendarLook1.LoadFromXml(stream, CalendarLookCategories.All); stream.Close(); } } catch { Debug.WriteLine("Error encountered while loading stream!"); } }