Click here to Skip to main content
12,249,797 members (58,132 online)
Click here to Skip to main content

Stats

55.2K views
2K downloads
96 bookmarked
Posted

Visual Expression Builder for Dynamic Linq

, 2 Feb 2012 CPOL
Let your users create their own Linq filters with this MVVM WPF tool you can include in your application
.svn
all-wcprops
dir-prop-base
entries
prop-base
ClassDiagram.png.svn-base
ScreenShot.png.svn-base
props
text-base
ClassDiagram.png.svn-base
ClassDiagram1.cd.svn-base
DoNotFilterOnAttribute.cs.svn-base
DynamicLinqExpressionBuilder.csproj.svn-base
DynamicLinqExpressionBuilder.sln.svn-base
DynamicLinqUserControl.xaml.cs.svn-base
DynamicLinqUserControl.xaml.svn-base
ExpressionList.cs.svn-base
ScreenShot.png.svn-base
tmp
prop-base
props
text-base
bin
Debug
DynamicLinqExpressionBuilder.dll
ClassDiagram.png
ClassDiagram1.cd
Properties
.svn
all-wcprops
entries
prop-base
props
text-base
AssemblyInfo.cs.svn-base
tmp
prop-base
props
text-base
ScreenShot.png
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.Navigation;
using System.Windows.Shapes;

namespace ChabadOnCampus.DynamicLinq
{
    /// <summary>
    /// Interaction logic for DynamicLinqUserControl.xaml
    /// </summary>
    public partial class DynamicLinqUserControl : UserControl
    {
        public DynamicLinqUserControl()
        {
            InitializeComponent();
        }

        private void CommandBinding_CanExecute(object sender, CanExecuteRoutedEventArgs e)
        {
            e.CanExecute = true;
        }

        private void CommandBinding_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            var vm = DataContext as ExpressionList;
            var param = e.Parameter as ExpressionVM;
            if (vm != null && param != null) vm.Remove(param);
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Rabb Moshe Plotkin
United States United States
Co-director of Chabad Student Center @ SUNY New Paltz
Lecturer of Computer Science @ SUNY New Paltz

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160426.1 | Last Updated 2 Feb 2012
Article Copyright 2010 by Rabb Moshe Plotkin
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid