本文整理匯總了VB.NET中System.Windows.Markup.XamlReader類的典型用法代碼示例。如果您正苦於以下問題:VB.NET XamlReader類的具體用法?VB.NET XamlReader怎麽用?VB.NET XamlReader使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了XamlReader類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。
示例1: Button
' Create the Button.
Dim originalButton As New Button()
originalButton.Height = 50
originalButton.Width = 100
originalButton.Background = Brushes.AliceBlue
originalButton.Content = "Click Me"
' Save the Button to a string.
Dim savedButton As String = XamlWriter.Save(originalButton)
' Load the button
Dim stringReader As New StringReader(savedButton)
Dim xmlReader As XmlReader = XmlReader.Create(stringReader)
Dim readerLoadButton As Button = CType(XamlReader.Load(xmlReader), Button)