using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
using System; using System.Collections. Generic ; using System.Linq; using System.Text; using System.Windows.Data; using Linq2Sql; using System.Xml.Linq; namespace WpfGuiProject { // Category. - Category. public sealed class CategoryValueConverter : IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is Category) { Category x = (Category) value ; return (x).Categories.Where(n => n.ParrentCategoryId == x.CategoryId).OrderBy(n => n.CategoryName); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } // XElement. - XElement, // Category. public sealed class XmlConverter :IValueConverter { public object Convert ( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ( value is XElement ) { XElement x = ( XElement ) value ; return x.Elements( "Category" ); } else { return null ; } } public object ConvertBack( object value , Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } } * This source code was highlighted with Source Code Highlighter .
* This source code was highlighted with Source Code Highlighter .
- < ResourceDictionary xmlns = "http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns: x = "http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns: linq2Xml = "clr-namespace: System.Xml.Linq; assembly = System.Xml.Linq"
- xmlns: linq = "clr-namespace: Linq2Sql; assembly = Linq2Sql"
- xmlns: local = "clr-namespace: WpfGuiProject" >
- <! - Template for hierarchical display of instances of the TreeTable class IN THE CASE OF CONNECTING TO THE DATABASE ->
- < HierarchicalDataTemplate x: Key = "key1" DataType = "{x: Type linq: Category}" >
- <! - I specify the data source on the basis of which the partition tree should be formed ->
- < HierarchicalDataTemplate.ItemsSource >
- < Binding Path = "." >
- <! - I specify a converter that allows you to get a list of child elements of type Category, in relation to this ->
- < Binding.Converter >
- < local: CategoryValueConverter />
- </ Binding.Converter >
- </ Binding >
- </ HierarchicalDataTemplate.ItemsSource >
- <! - I create a visual representation of the element displayed in the section tree ->
- < DockPanel >
- < TextBlock Text = "{Binding Path = CategoryName}" >
- < TextBlock.ToolTip >
- < Binding Path = "Description" />
- </ TextBlock.ToolTip >
- </ Textblock >
- <! - Number of books placed directly in the section ->
- < TextBlock Name = "txtLeft" Text = "(" Grid . Column = "1" />
- < TextBlock Name = "txtCount" Text = "{Binding Path = Books.Count}" Grid . Column = "2" />
- < TextBlock Name = "txtRight" Text = ")" Grid . Column = "3" />
- </ DockPanel >
- </ HierarchicalDataTemplate >
- <! - Template for displaying instances of the class Book in the event of connecting to the database ->
- < DataTemplate DataType = "{x: Type linq: Book}" >
- < TextBlock Text = "{Binding Path = BookName}" >
- < TextBlock.ToolTip >
- < Binding Path = "ToolTipText" />
- </ TextBlock.ToolTip >
- </ Textblock >
- </ DataTemplate >
- <! - Template for hierarchical data display in case of connecting to XML-file ->
- < HierarchicalDataTemplate x: Key = "key2" DataType = "{x: Type linq2Xml: XElement}" >
- <! - I specify the data source on the basis of which the partition tree should be formed ->
- < HierarchicalDataTemplate.ItemsSource >
- < Binding Path = "." >
- <! - I specify a converter that allows you to get a list of child elements of type Category, in relation to this ->
- < Binding.Converter >
- < local: XmlConverter />
- </ Binding.Converter >
- </ Binding >
- </ HierarchicalDataTemplate.ItemsSource >
- <! - I create a visual representation of the element displayed in the section tree ->
- < TextBlock Text = "{Binding Path = Attribute [CategoryName] .Value}" >
- < TextBlock.ToolTip >
- < Binding Path = "Attribute [ToolTipText] .Value" />
- </ TextBlock.ToolTip >
- </ Textblock >
- </ HierarchicalDataTemplate >
- <! - Template for displaying instances of the class Book in the event of connecting to an XML file ->
- < DataTemplate x: Key = "key3" DataType = "{x: Type linq2Xml: XElement}" >
- < Grid >
- < Grid.RowDefinitions >
- < RowDefinition />
- < RowDefinition Height = "Auto" />
- </ Grid.RowDefinitions >
- < TextBlock Text = "{Binding Path = Attribute [BookName] .Value}" >
- < TextBlock.ToolTip >
- < Binding Path = "Attribute [ToolTipText] .Value" />
- </ TextBlock.ToolTip >
- </ Textblock >
- </ Grid >
- </ DataTemplate >
- </ ResourceDictionary >
* This source code was highlighted with Source Code Highlighter .
- < Window x: Class = "WpfGuiProject.MainWindow"
- xmlns = "http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns: x = "http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns: linq = "clr-namespace: Linq2Sql; assembly = Linq2Sql"
- xmlns: local = "clr-namespace: WpfGuiProject"
- Title = "Hierarchical display of data using the binding" Height = "350" Width = "525" >
- <! - Connect the resource file ->
- < Window.Resources >
- < ResourceDictionary >
- < ResourceDictionary.MergedDictionaries >
- < ResourceDictionary Source = "Dictionary1.xaml" />
- </ ResourceDictionary.MergedDictionaries >
- </ ResourceDictionary >
- </ Window.Resources >
- <! - We create the visual contents of the window ->
- < Grid >
- < Grid.ColumnDefinitions >
- < ColumnDefinition Width = "50 *" />
- < ColumnDefinition Width = "Auto" />
- < ColumnDefinition Width = "50 *" />
- </ Grid.ColumnDefinitions >
- < Grid.RowDefinitions >
- < RowDefinition Height = "Auto" />
- < RowDefinition Height = "100 *" />
- < RowDefinition Height = "Auto" />
- </ Grid.RowDefinitions >
- <! - Display the tree structure ->
- < TreeView Name = "treeStructure" Margin = "2" Grid . Row = "1" />
- <! - Display notes for the item selected in the hierarchy ->
- < GroupBox Header = "Note" Margin = "2" Grid . Row = "2" >
- < TextBlock Name = "selectedNodeDescription" TextWrapping = "Wrap" Text = "{Binding ElementName = treeStructure, Path = SelectedItem.Description}" />
- </ Groupbox >
- < GridSplitter Width = "5" HorizontalAlignment = "Center" VerticalAlignment = "Stretch" Grid . Column = "1" Grid . RowSpan = "3" />
- < ListBox Name = "listBooks" Margin = "2" Grid . Column = "2" Grid . RowSpan = "2" ItemsSource = "{Binding ElementName = treeStructure, Path = SelectedItem.Books}" />
- < GroupBox Header = "Note" Margin = "2" Grid . Column = "2" Grid . Row = "2" >
- < TextBlock Name = "selectedBookDescription" TextWrapping = "Wrap" Text = "{Binding ElementName = listBooks, Path = SelectedItem.Description}" />
- </ Groupbox >
- <! - Provide the user to select the data source of interest. This block must be placed AFTER the XAML markup, which defines
- treeStructure element. This requirement is due to the fact that the XAML markup of the RadioButton elements contains the registration
- Checked events, the body of which, in turn, contains code using the treeStructure element, and according to the rules of XAML documents, the element cannot be used
- before it is determined ->
- < GroupBox Header = "Data Source" Margin = "2" >
- < StackPanel Margin = "2" >
- < RadioButton Name = "rbDatabase" Content = "MS SQL Server Database " IsChecked = "True" Checked = "Change_DataSource" />
- < RadioButton Name = "rbXmlFile" Content = "XML file" IsChecked = "False" Checked = "Change_DataSource" />
- </ StackPanel >
- </ Groupbox >
- </ Grid >
- </ Window >
* This source code was highlighted with Source Code Highlighter .
- <? xml version = "1.0" encoding = "utf-8" ? >
- < MyXmlDocument >
- < Category CategoryName = "Computer literature" Description = "Various computer literature" ToolTipText = "My section" >
- < Category CategoryName = "Windows applications" Description = "This OS is most popular" ToolTipText = "My axis" >
- < Category CategoryName = "MS Office 2007" Description = "Office Suite" ToolTipText = "My Office" />
- < Category CategoryName = "Autodesk Products" Description = "Various CAD" ToolTipText = "My Choice" >
- < Category CategoryName = "AutoCAD" Description = "Most Common CAD" ToolTipText = "My CAD" >
- < Book BookName = "AutoCAD 2010. N.N. Poleshchuk" Description = "My book for this CAD" ToolTipText = "Reference" />
- < Book BookName = "AutoCAD 2007, user's bible. (I don’t remember the author)" Description = "Another my book on this CAD system" ToolTipText = "Old book" />
- </ Category >
- < Category CategoryName = "Revit" Description = "new generation of CAD (BIM)" ToolTipText = "Not yet my CAD" />
- </ Category >
- </ Category >
- < Category CategoryName = "Linux applications" Description = "Free OS" ToolTipText = "Interesting, but not very common" />
- </ Category >
- < Category CategoryName = "Classic" Description = "Classic Literature" ToolTipText = "Useful for General Development" >
- < Category CategoryName = "Stories and Stories" Description = "Verses by Russian Authors" ToolTipText = "For the Soul" >
- < Book BookName = "Captain's daughter. AS Pushkin" Description = "School course" ToolTipText = "I read once ..." />
- </ Category >
- < Category CategoryName = "Poetry" Description = "Stories and stories of domestic authors" ToolTipText = "This is also for the soul" />
- </ Category >
- </ MyXmlDocument >
* This source code was highlighted with Source Code Highlighter .
- 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;
- // Add links to the namespaces we need
- using Linq2Sql;
- using System.Xml.Linq;
- namespace WpfGuiProject
- {
- /// <summary>
- /// Interaction logic for MainWindow.xaml
- /// </ summary>
- public partial class MainWindow: Window
- {
- XElement xml;
- public MainWindow ()
- {
- Initializecomponent ();
- xml = XElement .Load ( @ ".. \ .. \ XMLFile1.xml" );
- }
- // This method is all the logic for specifying the data source to be displayed in the window
- private void Change_DataSource ( object sender, RoutedEventArgs e)
- {
- if (rbDatabase.IsChecked == true ) // Database is selected as a data source
- {
- listBooks.ItemTemplate = null ;
- treeStructure.ItemsSource = new MyTestDbDataContext (). Categories.Where (n => n.ParrentCategoryId == null );
- treeStructure.ItemTemplate = (HierarchicalDataTemplate) FindResource ( "key1" );
- // Customize Note Binding
- DescriptionBinding (selectedNodeDescription, "SelectedItem.Description" , treeStructure);
- DescriptionBinding (selectedBookDescription, "SelectedItem.Description" , listBooks);
- // Set up the book display binding
- Binding bind = new Binding ( "SelectedItem.Books" ) {Source = treeStructure};
- listBooks.SetBinding (ItemsControl.ItemsSourceProperty, bind);
- }
- else // XML file is selected as a data source
- {
- treeStructure.ItemsSource = xml.Elements ( "Category" );
- treeStructure.ItemTemplate = (HierarchicalDataTemplate) FindResource ( "key2" );
- // Customize Note Binding
- DescriptionBinding (selectedNodeDescription, "SelectedItem.Attribute [Description] .Value" , treeStructure);
- DescriptionBinding (selectedBookDescription, "SelectedItem.Attribute [Description] .Value" , listBooks);
- // Set up the book display binding
- listBooks.ItemTemplate = (DataTemplate) FindResource ( "key3" );
- Binding bind = new Binding ( "SelectedItem.Elements [Book]" ) {Source = treeStructure};
- listBooks.SetBinding (ItemsControl.ItemsSourceProperty, bind);
- }
- }
- /// <summary>
- /// Configure data mapping binding
- /// </ summary>
- /// <param name = "textBlock"> A text object that should display the text of the note </ param>
- /// <param name = "pathValue"> Binding Path value </ param>
- /// <param name = "source"> link to the source object from which data is read through the Path property </ param>
- void DescriptionBinding (TextBlock textBlock, string pathValue, Control source)
- {
- textBlock.SetBinding (TextBlock. TextProperty, new Binding (pathValue) {Source = source});
- }
- }
- }
Source: https://habr.com/ru/post/94231/
All Articles