Mini Kabibi Habibi
Imports Microsoft.VisualBasic
Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Text
Imports System.Windows
Imports System.Windows.Controls
Imports System.Windows.Data
Imports System.Windows.Documents
Imports System.Windows.Input
Imports System.Windows.Media
Imports System.Windows.Media.Imaging
Imports System.Windows.Navigation
Imports System.Windows.Shapes
Imports System.Collections
Imports DevExpress.Xpf.NavBar
Imports System.Data
Imports System.IO
Imports DevExpress.Xpf.DemoBase
Imports System.Windows.Markup
Namespace NavBarDemo
Partial Public Class DataBinding
Inherits NavBarDemoModule
Public Sub New()
InitializeComponent()
End Sub
End Class
Public Class CategoryIDToGroupConverter
Inherits MarkupExtension
Implements IValueConverter
#Region "IValueConverter Members"
Public Function Convert(ByVal value As Object, ByVal targetType As Type, ByVal parameter As Object, ByVal culture As System.Globalization.CultureInfo) As Object Implements IValueConverter.Convert
Dim rows() As DataRow = NWindData.Categories.Table.Select("CategoryID = " & System.Convert.ToString(value))
If rows.Count() > 0 Then
Return rows(0)(CStr(parameter))
End If
Return Nothing
End Function
Public Function ConvertBack(ByVal value As Object, ByVal targetType As Type, ByVal parameter As Object, ByVal culture As System.Globalization.CultureInfo) As Object Implements IValueConverter.ConvertBack
Throw New NotImplementedException()
End Function
#End Region
Public Overrides Function ProvideValue(ByVal serviceProvider As IServiceProvider) As Object
Return Me
End Function
End Class
End Namespace