Mini Kabibi Habibi
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Collections;
using DevExpress.Xpf.NavBar;
using System.Data;
using System.IO;
using DevExpress.Xpf.DemoBase;
using System.Windows.Markup;
namespace NavBarDemo {
public partial class DataBinding : NavBarDemoModule {
public DataBinding() {
InitializeComponent();
}
}
public class CategoryIDToGroupConverter : MarkupExtension, IValueConverter {
#region IValueConverter Members
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) {
DataRow[] rows = NWindData.Categories.Table.Select("CategoryID = " + System.Convert.ToString(value));
if(rows.Count() > 0)
return rows[0][(string)parameter];
return null;
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) {
throw new NotImplementedException();
}
#endregion
public override object ProvideValue(IServiceProvider serviceProvider) {
return this;
}
}
}